Operating System - HP-UX
1753543 Members
5533 Online
108795 Solutions
New Discussion юеВ

replace drive with larger one in C3700 and copy data

 
SOLVED
Go to solution
Matt Thornback
Occasional Contributor

replace drive with larger one in C3700 and copy data

I have a C3700 with 2 drives: an 8GB with the OS (HP-UX 11i) and a 36GB which contains only CAD software and data. Each drive is a seperate volume group.

The CAD drive is running low on space so I need to replace it with a larger drive. The C3700 is located at a customer's site where I don't have access to any other systems and I cannot add a third drive to the C3700. My plan was to remove the drive from the C3700 and add it to a J5600 at my site along with the new drive. Then move the data to the new drive, remove both from the J5600, and add the new drive into the C3700, replacing the old one.

Does this plan sound right or should I be doing something differently?

If I do in fact have the logical steps correct, what are the specific steps/commands I need to safely do this?
9 REPLIES 9
Peter Godron
Honored Contributor

Re: replace drive with larger one in C3700 and copy data

Matt,
plan sounds ok, but before you start I would suggest a full backup of the 36Gb drive. That way you have the alternative of restoring from backup.
I assume you have a current backup method?!
erics_1
Honored Contributor

Re: replace drive with larger one in C3700 and copy data

Matt,

I assume you're going vgimport the mapfile of the CAD disk volume group? If so, make certain the vg itself can fully utilize the capacity of the newer drive. Look at vgdisplay output to see what max pe per pv is.

Senthil Kumar .A_1
Honored Contributor
Solution

Re: replace drive with larger one in C3700 and copy data

Hi,

Since you havent given me any unix device file related data, lets make assumtions for a starter.

My assumption.

C3700:

vg00 <- /dev/dsk/c0t0d0 8gb
vg01 <- /dev/dsk/c0t0d1 36gb
FS is /dev/vg01/lvol1 is mounted on /app and is 35GB approx


J5600:

vg00 <- /dev/dsk/c2t0d0 8gb boot
new disk <- /dev/dsk/c2t1d0 (large disk,73GB)


Now actual work.

A] On C3700

1) unmount the used FS.

umount /dev/vg01/lvol1

2) deactivate the vg

vgchange -a n /dev/vg01

3) export vg01

vgexport /dev/vg01

4) Shutdown C3700 and disconnect the 36GB HDD.


B] on J5600

1) First create a VG with large disk. assuming that vg01 doesnot exist, I give the following steps for creating vg01,

mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x010000
pvcreate /dev/rdsk/c2t1d0
vgcreate /dev/vg01 /dev/dsk/c2t1d0
lvcreate -L 70000 vg01
newfs /dev/vg01/rlvol1
mkdir /tmpmnt1
mount /dev/vg01/lvol1 /tmpmnt1



2)shutdown and connect the 36 GB HDD to J5600

3)identify the 36 GB disk.

ioscan -funC disk
Lets assume it has recognized as /dev/dsk/c2t3d0

4)import the VG

mkdir /dev/vg02
mknod /dev/vg02/group c 64 0x020000
vgimport -v /dev/vg02 /dev/dsk/c2t3d0
vgchange -a y /dev/vg02
vgdisplay /dev/vg02
mkdir /tmpmnt2
mount /dev/vg02/lvol1 /tmpmnt2

5) copy the data..

cp -rp /tmpmnt2/* /tmpmnt1

6)unmount the FS and export vg01
umount /tmpmnt1
vgchange -a n /dev/vg01
vgexport /dev/vg01

7) shutdown and remove the large disk



BACK to C3600

1) connect the large disk and start the system.

2) ioscan -funC disk

lets assume it has recognized as /dev/dsk/c0t2d0

3) Recreate vg01

mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x010000
vgimport -v /dev/vg01 /dev/dsk/c0t2d0

vgchange -a y /dev/vg01

4) mount /dev/vg01/lvol1 /app

5) verify

bdf /app

:) -- So we are back on business...

Regards,
Senthil Kumar .A

P.S : best of luck for such a interesting exercise. Other forumers please free to correct my instruction if discribancy found.
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Pete Randall
Outstanding Contributor

Re: replace drive with larger one in C3700 and copy data

Matt,

1. vgexport the 36Gb drive from the C3700
vgexport -s -m /tmp/vg01map /dev/vg01
2. vgimport the 36Gb drive to the J5600
mkdir /dev/vg02
mknod /dev/vg02/group c 64 0x020000
vgimport -s -m /tmp/vg02map /dev/vg02
3. create a new vg with the larger drive
pvcreate /dev/rdsk/c1t0d0
vgcreate /dev/vg03 /dev/dsk/c1t0d0
4. create necessary lvols/file systems on new VG.
5. copy the data from smaller vg to larger
I would suggest using your favorite backup/restore utility

That, in a nutshell, ought to do it.


Pete

Pete
Matt Thornback
Occasional Contributor

Re: replace drive with larger one in C3700 and copy data

Peter,
I was under the impression that there was a backup in place but I just found out there isn't one! Well, that's another issue I'll have to sort out.

Eric,
That's what I was hoping to do but didn't know the exact commands. I assume the volume group was created with default options so I probably won't be able to extend it, right? If that's the case is my only option to create a new VG, new LV, and copy the data?
erics_1
Honored Contributor

Re: replace drive with larger one in C3700 and copy data

Matt,

You've been given good instructions above to create a new vg for this new disk. Once you have it and the older disk mounted on the J5600, copy the data. Export a new mapfile to the C3700 and mount it under the original mountpoint. Make sure to update /etc/fstab to point the mount to the correct place.

Eric
Senthil Kumar .A_1
Honored Contributor

Re: replace drive with larger one in C3700 and copy data

Hi in my earlier post, Please include the following command aswell in step B].4

mount /dev/vg01/lvol1 /tmpmnt1

Because after reboot the mount will be lost..

Regards,
Senthil Kumar .A
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Matt Thornback
Occasional Contributor

Re: replace drive with larger one in C3700 and copy data

Thank you everyone for your quick responses!

Now, I'll have to do some reading on LVs and mapfiles just to make sure I understand rather than blindly following instructions ;)

Also, as I recently found out that there is no backup, I'll need to setup a backup strategy before I can proceed with the upgrade.

Thanks again for all your help and I'll be sure to update this thread if I come across any problems when I get around to doing the disk upgrade.

Matt
Pete Randall
Outstanding Contributor

Re: replace drive with larger one in C3700 and copy data

Matt,

Just a hint: mapfiles are un-necessry if your logical volumes follow standard naming conventions, i.e. lvol1, lvol2, etc.


Pete

Pete