Operating System - HP-UX
1847586 Members
3582 Online
110265 Solutions
New Discussion

New disk and old vg's and lv's

 
SOLVED
Go to solution
Stuart Lloyd_2
Advisor

New disk and old vg's and lv's

Disk1- vg00
Disk2- vg01
Disk3- vg02

Disk 2 died. I edited the /etc/lvmrc to not auto activate vg's. The lvmtab is toast as well. I try to use SAM and it locks up when trying to look at anything dealing with disks. Disks 1 and 3 are still in their original slots on my D380. Slot 2 is empty.
Question 1: How do I activate/mount vg02 and it's lv's so that they can be used while waiting for a new disk?
Question 2: When I get the new disk and get it inserted will SAM recognize it right away and allow me to create new vg's and lv's? Or do I have to do some fancy command line stuff first?

Thanks.
Charlie don't surf.
4 REPLIES 4
Mark Grant
Honored Contributor

Re: New disk and old vg's and lv's

vgchange -a y vg02 && mount -a

SAM should see the disk. You might want to take the oppurtunity to try some of the "fancy" command line things. It's not so hard and much more likely to work :)
Never preceed any demonstration with anything more predictive than "watch this"
RAC_1
Honored Contributor

Re: New disk and old vg's and lv's

You have problems with vg01. So tell me do you any problems with vg02. Just disable the auto activate for vg01 in /etc/lvmrc. You should not have any problems with vg00 and vg02.

You insert a new disk and system will recognise it. Then you can create a vg and lvs.

Anil
There is no substitute to HARDWORK
Patrick Wallek
Honored Contributor
Solution

Re: New disk and old vg's and lv's

To manually activate a VG you do:

# vgchange -a y /dev/vg??
where the ?? are the numbers in the vg name, in your case 02.

Then just mount the stuff from vg02 out of /etc/fstab. If you want it to try to mount everything you can do a 'mount -a' as described above. Anything dealing with VG01 will fail though.

When you get the new disk and put it in the slot about the only you need to do is:

# vgcfgrestore -n vg01 /dev/dsk/c0t8d0

(I am guessing at the device file, but on my D380s the second slot from the top is almost always c0t8d0. If yours is different substitute the correct device file name.)

Once that is done your new disk should now be set like the original VG01 disk. To use it you can now do:

# vgchange -a y vg01

# mount -a
(This will now mount everything that failed with VG01 above).

See now that command line stuff isn't that "fancy" or that difficult is it?
Armin Feller
Honored Contributor

Re: New disk and old vg's and lv's

Answer 1:
# vgchange -a y vg02
# mount -a (and ignore the errors regarding vg01)



Answer 2:
You should not use SAM, I would recommend following steps:

First insert the new disk
# vgexport vg01
(that will remove all infos of vg02 on the system)

# ll /dev/*/group
(and check for free minor numbers)

# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000 (if minor number 0x010000 is free)

# pvcreate [-f] /dev/rdsk/c... (to the new disk)
# vgcreate vg01 /dev/dsk/c...
# vgchange -a y vg01
# vgdisplay vg01

# lvcreate -n vg01
# lvextend -L /dev/vg01/ /dev/dsk/c...
# newfs -F vxfs /dev/vg01/r (you have to use the rlvol NOT lvol)

Create as much lvols as you need. Then mount them to the existing mount_point and restore the datas by a backup.

Armin