lvm2 and initrd
    Elan Ruusamäe 
    glen at pld-linux.org
       
    Mon Jul  2 07:45:41 CEST 2012
    
    
  
hi
as lvm2 is hot topic today, i thought to write out another problem with it.
currently lvm2 on rootfs requires udev on initrd, or it will act buggy, 
for example (the way i discovered it), is that swap with label won't 
appear under /dev/disk/by-label
# blkid |grep swap
/dev/mapper/sys-swap: LABEL="swap" 
UUID="e6b1a0ff-3693-4241-84bb-07e82dd3ac7d" TYPE="swap"
# ls -l /dev/disk/by-label/*swap*
ls: cannot access /dev/disk/by-label/*swap*: No such file or directory
there are other problems, some warnings that can be ignored with no 
workload, but probably can cause corruption [1], so it works more or 
less ok in readonly mode (i.e you can boot, but can not make more 
changes to system). swap label otherwise works, as it "comes back" if i 
rename vg from os [2]. actually lvextend "works" too, but output does 
not look very hopeful [4]
upstream (actually systemd, but same dudes) said, if we want lvm2 on 
rootfs and rootfs is without udev support, "you're on your own", core 
problem is that lvm does not find it's config in the udev database after 
initramfs take-over.
even it's pretty easy to reproduce, i can provide pld th vm where it's 
broken. last version i tested is 2.02.94, and i think it was acceptable 
in 2.02.84-1, i.e before udev support was enabled [3]
anyone interested working that out (so that udev can be again optional 
for rootfs on lvm systems)?
[1] https://dl.dropbox.com/u/8879577/ss/systemd-cryptsetup.png
[2] http://carme.pld-linux.org/~glen/lvm-swap.log
[3] 
http://cvs.pld-linux.org/cgi-bin/viewvc.cgi/cvs/packages/lvm2/lvm2.spec?r1=1.176&r2=1.177& 
<http://cvs.pld-linux.org/cgi-bin/viewvc.cgi/cvs/packages/lvm2/lvm2.spec?r1=1.176&r2=1.177&>
[4] http://sprunge.us/CWge
-- 
glen
    
    
More information about the pld-devel-en
mailing list