-   Linux - Hardware (
-   -   cannot mount lvm volume -- 'vgscan --mknodes' does nothing! (

jtmoon 04-02-2007 06:27 PM

cannot mount lvm volume -- 'vgscan --mknodes' does nothing!

I created a volume group and a logical volume group with help from this HOWTO

The problem is after rebooting, I cannot find any /dev entries and I cannot create those /dev entries.

Here is a quick review of my steps:
pvcreate /dev/sda
pvcreate /dev/sdb
vgcreate my_volume_group /dev/sda /dev/sdb
lvcreate -L800G -nmy_logical_volume my_volume_group
mke2fs /dev/my_volume_group/my_logical_volume

Everything is nice so far (I played around with the new filesystem and such).
Most importantly I have this /dev entries:
Then I reboot my system.

Then I try to get the /dev/my_volume_group/my_logical_volume entry back but I never can!
I have tried several permutations of these commands:
$ vgscan
Reading all physical volumes. This may take a while...
Finding all volume groups
Finding volume group "my_volume_group"
Found volume group "my_volume_group" using metadata type lvm2

$ vgmknodes --verbose
Set umask to 0077
Finding all logical volumes

$ vgcfgrestore my_volume_group
$ lvscan -a
Finding all logical volumes
inactive '/dev/my_volume_group/my_logical_volume' [801.00 GB] inherit

Nothing ever creates /dev/my_volume_group/my_logical_volume
And it appears all the physical members of the volume group are present and recognized by the *scan commands.

- J Tom Moon 79

jtmoon 04-02-2007 06:57 PM

use vgchange
here's the answer!

$ vgchange -a y
Found volume group "my_volume_group"
Creating my_volume_group-my_logical_volume
Loading my_volume_group-my_logical_volume
Resuming my_volume_group-my_logical_volume (253:0)
Activated logical volumes in volume group "my_volume_group"
1 logical volume(s) in volume group "my_volume_group" now active

Found this here: (look in the start function).

I would not have guessed to use vgchange because here is what the lvm umbrella command says about it:
vgchange "Change volume group attributes"
I guess "active" or "inactive" status count as attributes (see the output of lvscan in my post above).

oh well... at least I am unblocked.
-J Tom Moon 79

All times are GMT -5. The time now is 11:49 PM.