Operating System - HP-UX
1849279 Members
6057 Online
104042 Solutions
New Discussion

Re: Looking for a proceedure to change LUNs

 
SOLVED
Go to solution
Erik_Smith
Advisor

Looking for a proceedure to change LUNs

HPUX11.11

I have 4 Luns and 2 FC cards

luns are all configured to volume group /dev/vgeprod

they luns are going to be moved to new hardward paths, thus getting new special files. So would this proceedure work?

1 unmount the filesystems on vgeprod.
2 deactivate vgeprod
(have SAN group make config change)
3 ioscan to change LUNs to new path.
4 vgextend new devices to vgeprod
5 vgreduce old devices from vgeprod
6 activate vgeprod
7 mount filesystems
6 REPLIES 6
Tim Nelson
Honored Contributor

Re: Looking for a proceedure to change LUNs

You are pretty close and should test just in case. I do not do it often enough say with 100%.

deactivate vg(s)
vgexport ( with map files )
ioscan
insf
vgscan
vgimport vg(s) ( with map files )

The vgscan should pick up the vgids on the disks then the import with no device options should pick up the correct new device files.

Mridul Shrivastava
Honored Contributor

Re: Looking for a proceedure to change LUNs

vgscan may not be a better option if there are large number of disk storage connected to the server since scan whole disks may take considerable time.

Since only 4 LUNS are involved I would suggest the following:

unmount
vgexport -v -m /dev/vgeprod

Once the changes has been made

insf -e
ioscan -fn (note down the disk device names for the vg vgeprod it won't be tough since only 4 LUNS are involved)
vgimport -v -m /dev/vgeprod

Make sure that you specify all the disk device names associated with this vg while executing vgimport.
Time has a wonderful way of weeding out the trivial
Sandy Chen
Honored Contributor
Solution

Re: Looking for a proceedure to change LUNs

Hi Erik,

I think using a mapfile will be simpler in your case,

1. create a mapfile using vgexport -s -p -v -m /tmp/vgeprod.mapfile
2. vgexport the vg, vgexport /dev/vgeprod
3. ioscan and insf for new lun H/W path
4. remove the old LUN h/w path with rmsf
5. mkdir /dev/vgeprod
6. mknod /dev/vgeprod c 64 0x??0000
7. vgimport from mapfile you have created: vgimport -s -v -m /tmp/vgeprod.mapfile /dev/vgeprod
8. mount filesystem

Please do remember that if have multiple link, you will have to reconfigure the primary/alternate link for load balancing

Regards,
Sandy
I never think of the future. It comes soon enough.
Erik_Smith
Advisor

Re: Looking for a proceedure to change LUNs

thanks for the suggestions,

Sandy, could you elaborate on steps 5 and 6, no one else mentioned these steps. Also what are the ?? referring to ?

Thanks
TTr
Honored Contributor

Re: Looking for a proceedure to change LUNs

Sandy's reply is the most accurate one but it assumes that you have a basic LVM familiarity.

As steps 1a and 1b you should do

1a. deactivate the vgeprod "vgchange -a n ..."
1b. write down the minor number that vgeprod is using right now " ll /dev/vgeprod/group". This is where you get the 0x??0000 for step 6 or you can use any other unused number.

Step 6 should be
mknod /dev/vgeprod/group c 64 0x??0000
Step 7, the -s option might not work, you will need the new hardware paths of the LUNs to vgimport from.
Erik_Smith
Advisor

Re: Looking for a proceedure to change LUNs

Thanks for the responses, it worked perfectly as follows! Points have been assigned.

ll /dev/vgeprod - note 0x??0000 number
Unmount filesystems
deactivate volume group
create a mapfile using vgexport -s -p -v -m /tmp/vgeprod.mapfile
vgexport the vg, vgexport /dev/vgeprod
ioscan and insf for new lun H/W path
remove the old LUN h/w path with rmsf (optional)
mkdir /dev/vgeprod
mknod /dev/vgeprod c 64 0x??0000
vgimport from mapfile you have created: vgimport -s -v -m /tmp/vgeprod.mapfile /dev/vgeprod
mount filesystem