[linux-lvm] How LVM root volumes gets mounted at boot time ?

Peter Rajnoha prajnoha at redhat.com
Fri Aug 8 06:34:07 UTC 2014

On 08/07/2014 08:20 PM, Vivek Satpute wrote:
> Thanks a lot Peter for replying.
> I know that */sys/devices/virtual**/block/dm-0  *SysFsPath would get
> created by block-layer when corresponding block device gets created. 
> Actually I am looking for how below dependencies is getting created for
> LVM volume by systemd:
> [root at host]# systemctl show dev-rhel_host-root.device
> Id=dev-rhel_host-root.device
> Names=dev-rhel_host-root.device
> *Following=sys-devices-virtual-block-dm\x2d0.device
> *
> [...]
> *SysFSPath=/sys/devices/virtual/block/dm-0*
> *
> *
> /dev/rhel_host/root (path of LVM volume) is actually a symbolic link
> pointing to /dev/dm-0, then how systemd recognize that
> device dev-rhel_host-root.device
> follows *sys-devices-virtual-block-dm\x2d0.device ?*
> *

Systemd can read this information from udev events (or udev database records).
The information about all existing symlinks and their names, the dev node name
("kernel name") and related sysfs link is all recorded in udev database so systemd
just makes the .device unit out of this information.


More information about the linux-lvm mailing list