How to figure out which block device has been created by tcm_loop?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I got hard time to determine which block device was created when I was
using tcm_loop.

Normally I would just take a look at dmesg, see sda or sdb got
attached etc, but that's not a reliable way of doing it I guess.

I also found the device showed up in "udevadm monitor", but unable to
find a way to associate with the original device I created from TCM
either.

Here is the commands I've used to create the device(with tcmu-runner
running with file_handler demo code). I guess it's possible associate
with iscsi name somehow:

mkdir -p /sys/kernel/config/target/core/user_1/test
echo dev_size=1024000000 > /sys/kernel/config/target/core/user_1/test/control
echo dev_config=file//root/test >
/sys/kernel/config/target/core/user_1/test/control
echo 1 > /sys/kernel/config/target/core/user_1/test/enable

mkdir -p /sys/kernel/config/target/loopback/naa.60014059436855c1/tpgt_1
echo "naa.60014051153c198a" >
/sys/kernel/config/target/loopback/naa.60014059436855c1/tpgt_1/nexus
mkdir -p /sys/kernel/config/target/loopback/naa.60014059436855c1/tpgt_1/lun/lun_0
ln -s /sys/kernel/config/target/core/user_1/test
/sys/kernel/config/target/loopback/naa.60014059436855c1/tpgt_1/lun/lun_0/c68d79910b

Thanks for any ideas!

--Sheng
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux