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.
Essentially:
%pre ... lvm vgscan lvm vgchange -a y ... if [ -d /dev/vol0 ]; then # do stuff fi 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?