volume.is_mounted wrong for luks partitions
Kay Sievers
kay.sievers at vrfy.org
Mon Apr 17 08:15:31 PDT 2006
On Sun, Apr 16, 2006 at 02:34:21PM -0400, David Zeuthen wrote:
> On Sun, 2006-04-16 at 14:29 -0400, David Zeuthen wrote:
> > Another thing is that we really want to get away from looking at
> > symlinks and use e.g. dm_task_get_deps to figure out that the device
> > mapper volume really stems from the LUKS encrypted physical volume.
>
> Replying to myself, actually it seems that the latest kernels have this
> bit of info
>
> # tree /sys/block/dm-0
> /sys/block/dm-0
> |-- dev
> |-- holders
> |-- range
> |-- removable
> |-- size
> |-- slaves
> | `-- sda2 -> ../../../block/sda/sda2
> |-- stat
> `-- uevent
>
> # tree /sys/block/sda/sda2/
> /sys/block/sda/sda2/
> |-- dev
> |-- holders
> | `-- dm-0 -> ../../../../block/dm-0
> |-- size
> |-- start
> |-- stat
> `-- uevent
>
> Now just need to figure out when this was introduced (does anyone know?)
2 weeks ago :)
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6a4d44c1f1108d6c9e8850e8cf166aaba0e56eae
> and whether it's sufficient to look at the slaves/ subdirectory. Then
> write a small patch to use this :-)
It should be fine, to show the dependency, yeah.
Thanks,
Kay
More information about the hal
mailing list