Operating System - HP-UX
1752818 Members
4604 Online
108789 Solutions
New Discussion юеВ

Re: Putting bigger discs in server

 
SOLVED
Go to solution
MarkSyder
Honored Contributor

Putting bigger discs in server

Hi everybody.

I'm supporting a server which has four disc slots. The first three have 1 x 9Gb disc (vg00) and 2 x 18Gb discs (vg01 and vg02). The server is running HP-UX 10.20.

I've just been given 2 x 73Gb discs to put in this server. Rather than waiting till I get in a mess and then asking for help, I thought it a good idea to prepare a plan of action then post it here so people who've done this before can give me the appropriate commands I need to run and warn me of any potential pitfalls.

Plan of action:

1. Put a 73Gb disc in slot 4 (already done successfully and identified with ioscan).

2. Set up a new volume group on this disc and transfer the contents of vg01 and vg02 on to it, with certain filesystems increased in size.

3. The 2 x 18Gb discs will now be empty, so I intend removing the disc from slot 3 and putting the other 73Gb disc in its place.

4. Install HP-UX 11i on the 18Gb disc in slot 2. Set the server up to boot from this disc.

5. Remove the 9Gb disc from slot 1 and replace it with the 18Gb disc removed at stage 3.

6. Install Mirrordisk and make the two 18Gb discs identical.

What I need to know in advance is:

1. What commands do I use to transfer the contents of vg01 and vg02 to the new disc? I expect to be using vgexport and vgimport, but these are not commands I've used before and I would appreciate guidance.

2. What volume group name will the new disc use? Will it default to vg03 (the first available) or will vgimport allow me to make this disc vg01?

3. Is HP-UX selective about the order in which it finds the volume groups? I.e. is it acceptable for me to have vg01 in slot 4 and vg02 in slot 3?

Please be patient while you wait for your points. I can't start on stage 2 till Friday afternoon, after the users have gone home early. I'll be giving out points next Monday.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
38 REPLIES 38
Geoff Wild
Honored Contributor

Re: Putting bigger discs in server

Looks like a good plan.

1. To transfer - use vxdump/vxrestore:

vxdump -0 -f - -s 1000000 -b 16 /mountpointfromolddisk | (cd /tempmountpointnewdisk ; vxrestore rf -)&

2. vg can be named anything you like.

3. vg's can be in any slot you want - doesn't matter.

vgexport - do that to old vg's after they have been copied....

Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Pete Randall
Outstanding Contributor
Solution

Re: Putting bigger discs in server

Mark,
Vgexport/vgimport don't move data from one disk to another - the data remains on the same disk and is dis-connected from one system and re-connected to another.

You need to create a new VG and reload it from some sort of backup. If you wish, you can re-use vg01 as long as you've backed up and gotten rid of the original vg01 first.

The order of the volume groups is not significant.


Pete

Pete
bhavin asokan
Honored Contributor

Re: Putting bigger discs in server

see the following procedure,


1. Put a 73Gb disc in slot 4 (identify with ioscan).

2. Set up a new volume group with this disc.

3. create the logical volumes on the new vg(total number of logical volumes on new vg=number of logical volumes on vg01+number of logical volumes on vg02 ).the lv sizes should be equal to or more than that of that of corresponding lv in vg01 and vg02.

4. create filesystem on the lvs with newfs.

5. mount the lvols to temperory mount points.

6.go to the specific directory (mount point) use the following command to transfer data.

find . -depth |cpio -pdmluva /destination

provided /destination is the temperory mount point of your new lv .

7 . compare the data on both mount points.
unmount both lvs. mount the newlv on the proper mount point.

8. repeat this for all lvs.

9.vgexport old vg01 and vg02.

you can use dd command also to copy the old lvol to new disks logical volume.

before doing any activity of installation create ignite backup of root vg. create map files of all vgs by vgexport .create conf files by vgcfgbackup.


after installation of hp-ux you can vgimport the vg with map file.


vg can be named anything you like

vg's can be in any slot you want .it dosen't depends on the slots.

regds,







MarkSyder
Honored Contributor

Re: Putting bigger discs in server

Thanks everyone.

These are very useful posts and will be suitably rewarded after I've done the work.

I particularly like the look of the find/cpio command to copy data from the old lvol to the new, but have one question about it:

I have checked all the recommended options on the man cpio page and -l states "Whenever possible, link files rather than copying them". Surely I don't want to use this? I want to copy the files so I can re-use the discs with the old lvols on them. If I link, won't I end up with links to non-existent files? Or does link in this context not mean what I think it means?

Mark
The triumph of evil requires only that good men do nothing
Robert-Jan Goossens_1
Honored Contributor

Re: Putting bigger discs in server

Mark,

The find/cpio command.

# find /orig_mountpoint | cpio -pcmudv /copy_mountpoint

Good luck,
Robert-Jan
Pete Randall
Outstanding Contributor

Re: Putting bigger discs in server

Mark,

I've always been puzzled by that phrasing as well. I can say that I've done the cpio thing many times (options: pdumxl) and the only thing that can mess things up on occasion is permissions. You can start getting yourself into a real mess when a few dozen files don't get copied and you have to go back and get them individually. For me, unless it's a fairly small number of files, I find a backup/restore to be far more reliable.


Pete

Pete
MarkSyder
Honored Contributor

Re: Putting bigger discs in server

What a relief - I wasn't allowed to post at all yesterday (page not found).

Backup/restore: interesting. I thought at first of a tape backup, but tapes are slow. The lvols I'm creating are twice the size of the old ones. That leaves plenty of room for a tar file of the old lvol plus the untarred version. Anything wrong with that plan?

Also, the suggestion of setting up a temporary mountpoint in the new lvol and subsequently renaming it: the wording of that suggestion implies I can do that before I've run vgexport. Is that right? Simply umount both lvols, change the name of the mountpoint in the new lvol, then mount it?

And when the time comes, what is the exact syntax of vgexport?

Mark
The triumph of evil requires only that good men do nothing
Ravi_8
Honored Contributor

Re: Putting bigger discs in server

Hi Mark

I would do creating a ignite backup (make_tape_recovery) and restoring on new 73GB disks
never give up
Robert-Jan Goossens_1
Honored Contributor

Re: Putting bigger discs in server

Mark,

Just a thought, if you can live with an other volume group name (vg03) you do not have to use vgexport/vgimport, just create a new volume group, create new logical volumes and mount them on temp mountpoints. Copy the data from the original filesystems, unmount the original filesystems and mount the new filesystems on the old mountpoints.

Regards,
Robert-Jan