I am using losetup -a to see my loop devices, but it has a length limit (which is 62 characters). So I can't know for sure which loop device I really want.
Ex:
[root@r7byach]# losetup -a
/dev/loop0: [fc03]:33030504 (/storage5_vol1/6/ABCD116476-linux-ubuntu-10_04-64b-base-07150/*)
/dev/loop1: [0015]:4933 (/storage4/5/ABCD12345-linux-centos-5-64b-base-86836/hdc)
I can get the output on /dev/loop1 using
losetup -a|grep diskPath |cut -f1 -d:|cut -f3 -d/
But I can't get the device on loop0, since the name is not fully qualified.
How can I get the loop device regardless of this size limit?