<div dir="ltr">Thanks a much Peter. This really helped a lot :-)<div><br></div><div><br></div><div>Regards</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 8, 2014 at 12:04 PM, Peter Rajnoha <span dir="ltr"><<a href="mailto:prajnoha@redhat.com" target="_blank">prajnoha@redhat.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 08/07/2014 08:20 PM, Vivek Satpute wrote:<br>
> Thanks a lot Peter for replying.<br>
><br>
</div>> I know that */sys/devices/virtual**/block/dm-0  *SysFsPath would get<br>
<div class="">> created by block-layer when corresponding block device gets created.<br>
><br>
> Actually I am looking for how below dependencies is getting created for<br>
> LVM volume by systemd:<br>
><br>
> [root@host]# systemctl show dev-rhel_host-root.device<br>
> Id=dev-rhel_host-root.device<br>
> Names=dev-rhel_host-root.device<br>
</div>> *Following=sys-devices-virtual-block-dm\x2d0.device<br>
> *<br>
> [...]<br>
> *SysFSPath=/sys/devices/virtual/block/dm-0*<br>
> *<br>
<div class="">> *<br>
> /dev/rhel_host/root (path of LVM volume) is actually a symbolic link<br>
> pointing to /dev/dm-0, then how systemd recognize that<br>
> device dev-rhel_host-root.device<br>
</div>> follows *sys-devices-virtual-block-dm\x2d0.device ?*<br>
> *<br>
<br>
Systemd can read this information from udev events (or udev database records).<br>
The information about all existing symlinks and their names, the dev node name<br>
("kernel name") and related sysfs link is all recorded in udev database so systemd<br>
just makes the .device unit out of this information.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Peter<br>
</font></span></blockquote></div><br></div>