1752795 Members
6230 Online
108789 Solutions
New Discussion юеВ

LVM

 

LVM

Hi,
1.I have created a mirrored disk on one of my VGs say vg01.
Now if I delete the Directories in /dev/vg01/ is all my lvol entries..
a)How do I recover my lv?
b)If at this point I want to delete my Vg how will I do it.

2. I created a VG say VG02...
After all teh configuration... Due to some reason the VG doesnt get activated. It say it is conflictiong with config.
AS it is not activating..hence I cant even remove it.

How do I restore or delelte my VG configurations.
2 REPLIES 2
Stefan Farrelly
Honored Contributor

Re: LVM

1. a) to recover your lvols you can either recover these files (in /dev/vg01/) from a backup tape, or recreate them manually using mknod - if you remember how many lvols were in there ? eg. for each lvol do;
mknod /dev/vg01/lvol1 c 64 0x000001 lvol1
mknod /dev/vg01/rlvol1 b 64 0x000001 rlvol1

and increase the 0x000001 to 2 for lvol2 etc.

1. b) if you want to delete your vg simply do;
vgchange -a n vg01
vgexport vg01
(as long as no lvols are mounted).

2). It sounds like you have a /dev/vgXX/group file with the same number. Check them all;
ll /dev/vg*/group
all should have unique numbers (0x010000, 0x020000 etc.)
You may need to recreate vg02's group file (mknod /dev/vg02/group c 64 0x0X0000) before you can activate it.

Im from Palmerston North, New Zealand, but somehow ended up in London...
Eugeny Brychkov
Honored Contributor

Re: LVM

Conflicting with config? Does server have MC/SG installed? If yes then try to activate vg in read-only mode (-a r)
Eugeny