Operating System - HP-UX
1834818 Members
2363 Online
110070 Solutions
New Discussion

move disk from one server to another

 
SOLVED
Go to solution
A.K.
Frequent Advisor

move disk from one server to another

Hello everyone !!!!
I have two D-class machines No 1 and No 2 with hot swappable disks.
Machine No 1 running HPUX 10.20 and Machine No 2 running HPUX 11.00
I need to move one of the disks from No 1 to No 2
The specific disk is mirrored and I am planning to use the copy (cancel the mirroring)
Since No 1 is production I cannot afford to take the vg???s on the specific disk offline
What will be the right procedure to do so?
Thanks,
A.K.
6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor

Re: move disk from one server to another

1.) Use the lvreduce -m 0 to remove the mirroring for EACH lvol specifying the physical disk that you want to remove the lvol mirror from.

e.g. lvreduce -m 0 /dev/vg01/lvol1 /dev/dsk/c1t8d0

Man lvreduce for details.

2) vgreduce the volume group specifying the disk that you want to remove.

3) Because this is a hot-pluggable disk, you can simply remove it at this point.

The smart play is to acquire another disk on the used market - should be very cheap. I just can't see running a production box (even for a short period) unmirrored. That's just asking for it.
If it ain't broke, I can fix that.
Michael Tully
Honored Contributor

Re: move disk from one server to another

I would not play with any disks in your current production server. Do yourself a favour and get a second hand disk for your 11.x system and mirror it there. It is times like this where if something were to go wrong, it will.
Anyone for a Mutiny ?
Sunil Sharma_1
Honored Contributor

Re: move disk from one server to another

Hi,

You can use the command lvreduce and vgreduce to do this without deactivating Volumegroup.
in this case disk will not be having any data.

do you want to remove the disk with data ?

SS
*** Dream as if you'll live forever. Live as if you'll die today ***
A.K.
Frequent Advisor

Re: move disk from one server to another

I guess I didn???t explain my self
So I will add that not to worry about the mirroring I have backups
I need to do this procedure because I need the data on this specific disk to be moved to the No 2 server with the HP 11.00
I need the procedure from how to cancel mirroring until loading of the disk to the other server and restore all the information reside on this disk
Thanks,
Tim Sanko
Trusted Contributor

Re: move disk from one server to another

Being a paranoid, I would never fool around with the production server.

Since you need the data, why not export it and use NFS?

I am also not allowed and have not been allowed to take production servers out of service for years. I sympathize with your situation.
S.K. Chan
Honored Contributor
Solution

Re: move disk from one server to another

I'm not sure if this would work, it's not like you're exporting the whole volume group over but rather a previous disk that used to be part of a mirrored root disk. You can try this BUT it may or may not work. Assuming the disk is c2t2d0.
On server 1
===========
# lvreduce -m 0 /dev/vg00/lvol1 /dev/dsk/c2t2d0
==> Repeat for all othe LVs
# vgreduce vg00 /dev/dsk/c2t2d0
==> Delete it from vg00
# lvlnboot -v
==> Check to make sure it's gone.
At this ponit before you physically move c2t2d0 over to server 2, try to import the disk back to server 1 itself. If it fails then at least you knowit's not worth trying to move the disk at all.
Still on server 1
=================
# mkdir /dev/vgtest
# mknod /dev/vgtest/group c 64 0x010000
# vgimport -v /dev/vgtest /dev/dsk/c2t2d0
# vgchange -a y /dev/vgtest
If the above works the next step is try to mount the lvols.
# mkdir /test
# mount /dev/vgtest/lvol1 /test
It all that works, you would have a better chance of moving it to server 2. Before you move it do this ..
# umount /test
# vgchange -a n /dev/vgtest
# vgexport -m /tmp/mapfile /dev/vgtest
==> Remove VG entry fr lvmtab and all its devices files
Now move the disk over to server 2 and on server 2 run ..
# mkdir /dev/vgtest
# mknod /dev/vgtest/group c 64 0x010000
# ioscan -fnC disk
==> Take note of the device path created for this disk, lets assume it's still c2t2d0. Copy /tmp/mapfile from server 1 to server 2.
# vgimport -m /tmp/mapfile /dev/vgtest /dev/dsk/c2t2d0
# vgchange -a y /dev/vgtest
It that works you can now mount the LVs.