Operating System - HP-UX
1753951 Members
7985 Online
108811 Solutions
New Discussion юеВ

Moving disk array to another system

 
SOLVED
Go to solution
John Hietala_1
Occasional Contributor

Moving disk array to another system

I have a disk array on a system with a volume group and logical volume defined. I want to move this disk array to another system and maintain the volume group and logical volumes. How do I do this?
4 REPLIES 4
Patrick Wallek
Honored Contributor
Solution

Re: Moving disk array to another system

On the current system with the array attached:

# vgexport -m vg??.map -p -v -s /dev/vg??

Or if you want to make sure the VG doesn't exist on the source system, just omit the '-p' option.

Then on the new system.

Copy the vg??.map from the source system.

# mkdir /dev/vg??
# mknod /dev/vg??/group c 64 0x0?0000
# vgimport -m vg??.map -v -s /dev/vg??
# vgchange -a y /dev/vg??

Then add the appropriate entries to /etc/fstab, mount them up and you are ready to go.
Steven E. Protter
Exalted Contributor

Re: Moving disk array to another system

I'd do a backup before I start.

Maybe vgexport the vg and vgimport the vg on the target server.

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
Sridhar Bhaskarla
Honored Contributor

Re: Moving disk array to another system

Hi,

You will need to do the following steps in a nut shell.

1. Create map files on system A.

vgexport -v -s -m /tmp/vgxx.s.map vgxx
vgexport -v -m /tmp/vgxx.map -f /tmp/vgxx.disks vgxx

Repeat the above for all the volume groups.

Copy vgxx.s.map, vgxx.map, vgxx.disks and /etc/fstab onto system B into /tmp.

2. Move the Array.

Unmount all the filesystems on system A. Edit /etc/lvmrc and make AUTO_VG_ACTIVATE to 0. Enable only the VGs required to be active inn it. Shutdown the system. Physically disconnect the array and move it to the other
3. Import the VGs on system B.

Shutdown system B if the disk array is scsi. Fiber can be attached online.

#ioscan -f
#insf

Create directories and group files for the volume groups

#mkdir /dev/vgxx
#mknod /dev/vgxx/group c 64 0x0?0000

(Use a valid uniq number in the minor portion "?" of mknod)
#vgimport -s /tmp/vgxx.s.map vgxx
#vgchange -a y vgxx

Repeat the above for all the VGs. vgxx.disks can tell you the disks configured under each VG on system A. It will help identify the missing disks.

Merge /tmp/fstab and /etc/fstab for the logical volumes corresponding to the new volume group. Create mount points and do
'mount -a' to get the filesystems mounted.

Backout:

Once you found system B is successfully working, export the sparce VGs on system A.

vgexport vgxx

And restore your old /etc/lvmrc.

-Sri


You may be disappointed if you fail, but you are doomed if you don't try
A. Clay Stephenson
Acclaimed Contributor

Re: Moving disk array to another system

The easiest method is to use the -s flag of vgexport. This write an identifier to the mapfile that the vgimport command can then use.

On the old system:
vgchange -a n /dev/vg02
vgexport -m /tmp/vg02.map -s /dev/vg02
Down the array and disconnect.

FTP/rcp/tar the /tmp/vg02.map file to the new system:


On the new system:
Connect and power-up the array.
mkdir /dev/vg02
cd /dev/vg02
mknod group c 64 0x020000

Make sure that you choose a unique minor device number for the group node. By convention, vg00 gets 0x000000, vg01 gets 0x010000, vg10 gets 0x0a0000, ... but that's just a convention.

ioscan -fn
insf
vgimport -m /tmp/vg02.map -s /dev/vg02
vgchange -a y /dev/vg01

This method allows you to import the array without worrying about SCSI paths but it may not choose the most optimum SCSI pathing but that can easily be corrected later, if necessary. You next mkdir your mountpoints, add entries to /etc/fstab for any filesystems, and mount the filesystems.
If it ain't broke, I can fix that.