Identifying useable block devices

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

 



Hi,

when looking at the udev properties of a device mapper node, how can I
decide whether this is a block device that the user can use for creating
filesystems on, etc?

For example, when creating a thinly provisioned logical volume with these
steps

 # vgcreate TEST /dev/loop1
 # lvcreate TEST --thinpool pool -L 80
 # lvcreate -T TEST/pool -n thin -V 100

I end up with a lot of devices:

 # ls /dev/mapper/TEST-*
 /dev/mapper/TEST-pool        /dev/mapper/TEST-pool_tmeta  /dev/mapper/TEST-thin
 /dev/mapper/TEST-pool_tdata  /dev/mapper/TEST-pool-tpool

How can a program tell that only /dev/mapper/TEST-thin can really be
used as a block device, and the rest should be ignored?

Is there a way to do this by looking at "udevadm info", for example?

(What seems to work is skipping all nodes that have
DM_UDEV_IGNORE_DISK_RULES_FLAG set to true.  Is this maybe even
documented somewhere?)

Thanks!

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/




[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux