1838135 Members
3095 Online
110124 Solutions
New Discussion

LVM disk replace

 
SOLVED
Go to solution
Wengxms BF
New Member

LVM disk replace

I have a rp5470 server and a rp5430 server!
The rp5470 server have two disks mirrored!
The rp4530 server have only one disk contain user data and OS.
Yesterday rp5430 server down(mother board bad). I want to put the disk to rp5470 to get userdata.
How can I do?
For I'm an begeiner, a detail progress is high appreciated!
Thanks a lot!
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: LVM disk replace

Assuming the disk is compatable(likely), you should be able to use vgimport to import the logical volumes into an new volume group.

Shut down server, move the disk(no shut down for hot swap). If you don't shut it down ioscan to get the disk recognized.

Be careful about mixing SE and LVD disks. Check the specs at http://partsurfer.hp.com


SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Norman_21
Honored Contributor

Re: LVM disk replace

Hello

Are you adding a disk or replacing it.
to add a disk to a volume group in the rp5470 server:

# pvcreate /dev/rdsk/cxtxdx
# vgextend /dev/vg00 /dev/dsk/cxtxdx

mount the file system!
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
Rajeev  Shukla
Honored Contributor
Solution

Re: LVM disk replace

OK,
Connect the disk to rp5470 and vgimport the disk into a new volume group and mount the lv if they are file systems.
1. Use ioscan and locate the new disk, say /dev/dsk/cxdxtx
2. mkdir /dev/vgrp5430
check for a free minor number, say "0x050000" is free
3. mknod /dev/vgrp5430/group c 64 0x050000
4. vgimport /dev/vgrp5430 /dev/dsk/cxdxtx(new disk connected from rp54300)
5. You'll see it will import all the lvols created on that disk(the only difference is you'll have to locate which one is which as names will change and all of them will be in the sequence of lvol1, lvol2 lvol3 etc...)
6. activate the vg using vgchange -a y /dev/vgrp5430
6. create a direcory say /rp5430 and under it create all the directories that were in the old system and mount all lvols you'll see you'r data.
I think you'll have to do fsck as well.
That should give you you'r old data.

Cheers
Rajeev
Norman_21
Honored Contributor

Re: LVM disk replace



congrats Rajeev for the crown!

"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
Rajeev  Shukla
Honored Contributor

Re: LVM disk replace

Hey XMAN,
Thank you, thank you very much