LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   cannot mount lvm volume -- 'vgscan --mknodes' does nothing! (http://www.linuxquestions.org/questions/linux-hardware-18/cannot-mount-lvm-volume-vgscan-mknodes-does-nothing-542787/)

jtmoon 04-02-2007 06:27 PM

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

I created a volume group and a logical volume group with help from this HOWTO http://tldp.org/HOWTO/LVM-HOWTO/recipethreescsi.html

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:
/dev/my_volume_group/my_logical_volume
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.

Ideas?
- 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: http://www.seul.org/~grumbel/tmp/lvm (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 06:54 AM.