1753785 Members
7534 Online
108799 Solutions
New Discussion юеВ

Re: AutoRAID rebuild/LVM

 
Don Bentz
Regular Advisor

AutoRAID rebuild/LVM

In order to rebuild an entire 12H array (connected/used by only 1 server), I believe I need to:
1) lvremove all but 1 of the volumes in each of 2 volume groups there.
2) vgreduce specifying the last remaining logical volume.
3) vgremove the volume group.
And here's where I am not certain:
4) pvremove(?) the physical volumes to destroy the PVRA? (in order to avoid some of the other issues documented in this forum).
If these steps are accurate, I should be able to carve up LUNS, create physical volumes, volume groups, then logical volumes, and restore the data, right?
Insecurity is our friend. It keeps you dependent.
4 REPLIES 4
Andreas Voss
Honored Contributor

Re: AutoRAID rebuild/LVM

Hi,

i would do:
1) vgexport vgXX
2) arraycfg -d -L (for each LUN)
-------------------------
Now create new LUN's with arraycfg.
pvcreate -f
mkdir /dev/vgXX
mknod /dev/vgXX/group c 64 0xXX0000
vgcreate vgXX
lvcreate vgXX ...

Regards
James R. Ferguson
Acclaimed Contributor

Re: AutoRAID rebuild/LVM

Don:

Give that you want to start from scratch, and you have copied your data somewhere where it can be restored, do:

1. Unmount ('umount') each filesystem associated with a logical volume in quesstion and 'lvremove' all of the logical volumes that make up the volume group.

2. Remove all but one physical volume belonging to the volume group with 'vgreduce'.

3. 'vgremove' the volume group.

4. 'pvcreate', 'vgcreate' and 'lvcreate' appropriately.

See the man pages for each command mentioned above. They contain some good examples and guidelines.

...JRF...
Don Bentz
Regular Advisor

Re: AutoRAID rebuild/LVM

Whoops. I suppose I'll also have to remove the special device files "bound" to the LUNs before I can creat the new LUNs, right? What's the best (most effective) way to do this, SAM? rmsf? or the AutoRAID control panel?
Insecurity is our friend. It keeps you dependent.
Andreas Voss
Honored Contributor

Re: AutoRAID rebuild/LVM

Hi,

after removing all lvols and vgs you could do a rmsf -H
The hardware_path can be obtained by ioscan -fnC disk
(I don't think you have to do this because when you create new LUNS you will have back the same devices)
After that remove the LUNS with:
arraycfg -L -d
OR
reformat the AutoRAID (goes quicker):
arrayfmt -F
Now your AutoRAID is completely scratched.
Start with creating new LUNS with SAM or
arraycfg -L -a

Regards