lvm2 volumes not available on boot
Hi.
I have what is probably a very simple question concerning lvm2. If I create an lvm2 volume, and reboot, I no longer see the volume. The system startup scripts do "vgchange -a y", but if I do this by hand, I get:
No volume groups found
On the other hand, if I manually type "pvscan", I see:
PV /dev/sdb1 VG scratch lvm2 [558.75 GB / 508.75 GB free]
Total: 1 [558.75 GB] / in use: 1 [558.75 GB] / in no VG: 0 [0 ]
... and then when I type "vgchange -ay", I get:
1 logical volume(s) in volume group "scratch" now active
I was under the impression that "vgchange -ay" should have picked up physical volumes as well? Since I don't see a pvscan command in the system startup scripts (RedHat Enterprise 4), I wonder what I might be doing wrong.
Thanks for any help you can provide..
Jason.
Quoted 5 lines · Jason Keltz
I have what is probably a very simple question concerning lvm2. If I
create an lvm2 volume, and reboot, I no longer see the volume. The system startup scripts do "vgchange -a y", but if I do this by hand, I get:No volume groups found
I observed this for my SuSE system, too. I found, LVM was compiled as a module, but it was not loaded when system startup initialized lvm :-( I managed to push loading of LVM into initrd. Thus it gets loaded very early and even may mount root from LVM. Either start mkinitrd manually with the informations to load LVM, or declare the LVM module within some config file to get it into initrd.
For SuSE it's in: /etc/sysconfig/kernel.
Dieter.
Quoted 7 lines · Dieter St�ken
Quoted 5 lines · Jason Keltz
I have what is probably a very simple question concerning lvm2. If I
create an lvm2 volume, and reboot, I no longer see the volume. The system startup scripts do "vgchange -a y", but if I do this by hand, I get:No volume groups found
Quoted 8 lines
I observed this for my SuSE system, too. I found, LVM was compiled as a module, but it was not loaded when system startup initialized lvm :-( I managed to push loading of LVM into initrd. Thus it gets loaded very early and even may mount root from LVM. Either start mkinitrd manually with the informations to load LVM, or declare the LVM module within some config file to get it into initrd.
For SuSE it's in:
/etc/sysconfig/kernel.
Hi.
Thanks for your quick response. I don't think in my case the problem is that the module isn't loaded .... Here are the lines in rc.sysinit:
if [ -x /sbin/lvm.static ]; then
if /sbin/lvm.static vgscan --mknodes --ignorelockingfailure >/dev/null
2>&1 ; then
action $"Setting up Logical Volume Management:"/sbin/lvm.static vgchange -a y --ignorelockingfailure
fi
fi
Before the vgscan is run, here are the loaded modules:
Module Size Used by dm_mirror 28577 0 dm_mod 59717 1 dm_mirror joydev 13953 0 button 10449 0 battery 12741 0 ac 8773 0 uhci_hcd 32729 0 ehci_hcd 31813 0 3w_9xxx 35909 0 e1000 99757 0 floppy 57937 0 ext3 118729 1 jbd 60761 1 ext3 ata_piix 13381 1 libata 57885 1 ata_piix sd_mod 20417 2 scsi_mod 116941 3 3w_9xxx,libata,sd_mod
... so "dm_mod" is actually loaded, and as far as I know, that's the lvm2 module. The output of those commands is then:
File descriptor 21 left open
No volume groups found
No volume groups found
Reading all physical volumes. This may take a while...
... and it doesn't seem to find any physical volumes, but if I use the same command after bootup:
# /sbin/lvm.static vgscan --mknodes --ignorelockingfailure Reading all physical volumes. This may take a while... Found volume group "scratch" using metadata type lvm2
??
Jason.
Quoted 21 lines · Jason Keltz
Before the vgscan is run, here are the loaded modules:
Module Size Used by dm_mirror 28577 0 dm_mod 59717 1 dm_mirror joydev 13953 0 button 10449 0 battery 12741 0 ac 8773 0 uhci_hcd 32729 0 ehci_hcd 31813 0 3w_9xxx 35909 0 e1000 99757 0 floppy 57937 0 ext3 118729 1 jbd 60761 1 ext3 ata_piix 13381 1 libata 57885 1 ata_piix sd_mod 20417 2 scsi_mod 116941 3 3w_9xxx,libata,sd_mod
Quoted 2 lines
... so "
dm_mod" is actually loaded, and as far as I know, that's the lvm2 module.
I also have two 3w_9xxx since a few weeks, works great!
If it becomes /dev/sdb, have a look into /sys/block/sdb and /proc/partitions if it appears correctly. Also, certain devices may be excluded from scanning via /etc/lvm/lvm.conf.
Does hotplug create /dev/sdb dynamically and in time during boot?
In the beginning I got problems, as the 3ware controller and my SATA backplane both may be configured to delay the disk spinup. This caused some timeout trouble.
Dieter.
Quoted 31 lines · Dieter St�ken
Quoted 21 lines · Jason Keltz
Before the vgscan is run, here are the loaded modules:
Module Size Used by dm_mirror 28577 0 dm_mod 59717 1 dm_mirror joydev 13953 0 button 10449 0 battery 12741 0 ac 8773 0 uhci_hcd 32729 0 ehci_hcd 31813 0 3w_9xxx 35909 0 e1000 99757 0 floppy 57937 0 ext3 118729 1 jbd 60761 1 ext3 ata_piix 13381 1 libata 57885 1 ata_piix sd_mod 20417 2 scsi_mod 116941 3 3w_9xxx,libata,sd_modQuoted 2 lines
... so "
dm_mod" is actually loaded, and as far as I know, that's the lvm2 module.I also have two 3w_9xxx since a few weeks, works great!
If it becomes
/dev/sdb, have a look into/sys/block/sdband/proc/partitionsif it appears correctly. Also, certain devices may be excluded from scanning via/etc/lvm/lvm.conf.
Quoted 5 lines
Does hotplug create
/dev/sdbdynamically and in time during boot?In the beginning I got problems, as the 3ware controller and my SATA backplane both may be configured to delay the disk spinup. This caused some timeout trouble.
/sys/block/sdb existed, but I think you're right re: disk spinup since I inserted a "sleep 5" into rc.sysinit before the call to vgscan and it works now!
Jason.