[CentOS] Kickstart and lvm

Fri Apr 8 13:08:25 UTC 2011
Lars Hecking <lhecking at users.sourceforge.net>

I've written some %pre code to grab a few files off a logical volume, if it
exits, before the disk gets formatted, but can't get get it to work correctly.


lvm vgscan
lvm vgchange -a y
if [ -d /dev/vol0 ]; then
  # do stuff
lvm vgremove -f vol0

The problem is that /dev/vol0 does not exist after lvm vgchange. I added a
few debug statements (lvm pvdisplay, lvm vgdisplay, lvm lvdisplay, ls -l /dev)
that confirm the existance of all logical volumes, but there's no sign of
the volume group under /dev. What am I missing?