Operating System - HP-UX
1832587 Members
3071 Online
110043 Solutions
New Discussion

Re: Adding two hard-drives and re-allocate space - how???

 
SOLVED
Go to solution
Anwar Aziz_1
Occasional Advisor

Adding two hard-drives and re-allocate space - how???

Hello all,

I was asked to add two drives to an hpux server and re-allocate volume sizes.

Is a reinstall of the OS requiered? recommended?

I havent touched HPUX in such a long time that i forgot most of the commands to do this (they will come back though)..at any rate i need some assistance with the process:
1) shutdown the server
2) open it up and add the drives
3) turn it on....

4a) reinstall and set the correct sizes of the file system here?
or
4b) what do i do if i dont need to reinstall???

Thanks, any help is greatly appreciated.
6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Adding two hard-drives and re-allocate space - how???

The first thing you need to do is ask some more questions. Are these going to boot drives? Should they be mirrored? Are they simply data drives that should be added to an existing volume group?

The good news is that this stuff can all be done using SAM->Disks & Filesystems (unless this is a boot disk replacement). If you are planning to add these drives to an existing volume group, you will almost certainly only be able to utilize as much space per new drive as was used in the smallest existing drive.

If it ain't broke, I can fix that.
Anwar Aziz_1
Occasional Advisor

Re: Adding two hard-drives and re-allocate space - how???

Thanks for tip on the questions. Those questions didnt even hit me.

For arguments sake lets just say that there are two 4GB drives on a box and you want to add two additional 9GB drives (not boot drives). But just 2 more drives because the file systems are running out of space.
What is the normal procedure and commands to do this once the drives have been installed physically.

Im not sure I followed the part where you said that the sizes can be no bigger than the smallest drive. Then should I have the 4GB root drive replaced by the 9 and then use the two 4's plus the extra 9 for drive space?
A. Clay Stephenson
Acclaimed Contributor

Re: Adding two hard-drives and re-allocate space - how???

If you are adding disks to an existing volume group, the number of extents per volume is set at the time vgcreate is run; unless overridden, vgcreate sizes the number of allocated physical extents (PE's) to fit the first disk used. If that disk is smaller than your new disks then you will be limited to that low number of PE's and some of your space on the new, larger disks will go unused and unavailable. This idoes not apply if you create a new volume group.

The commands needed to create a volume group are pvcreate, vgcreate, vgextend, lvcreate, possibly lvextend, and the mkfs (or newfs). You also have to run insf and use mknod to create the /dev/vgxx/group node.

You can man these commands for more details.

Because, you seem a little weak on HP-UX at the moment, I strongly urge you to use SAM. It will do all the tasks for you and quite nicely as well. Your best bet is probably to make a new volume group and create temporary filesystems mountpoints. You then can copy from the existing mountpoints to the new one using cpio -p and then rename the mountpoints is /etc/fstab.
If it ain't broke, I can fix that.
Anwar Aziz_1
Occasional Advisor

Re: Adding two hard-drives and re-allocate space - how???

the problem is that i was placed to do this drive upgrade yet i have no access to an hp server till they day i get to the client site.

i dont want to screw things up, but i havent played with hp-ux for about a year or so, which is why im rusty and asking questions as if this was the first time ive looked at the OS. i wasnt by any means a guru by i knew my way around the OS.

how long would you GUESStimate this process to take place? Thanks again, you've been a great help.
A. Clay Stephenson
Acclaimed Contributor

Re: Adding two hard-drives and re-allocate space - how???

This is another one of those "it depends" answers. If you are simply installing hot-plug drives then you don't even need to shutdown but if not then the hardware install should take no more than an hour including the time to shutdown and start the OS. The actual hardware installation should take no more than 20 minutes. The main "gotcha" is making certain that you have unique SCSI ID's and proper termination.

Using sam, you should be able to create a new volume group, extend the VG with the 2nd drive, create logical volumes, and filesystems in about 15 minutes if you are extremely careful and about 5 minutes if you are experienced. The biggest chunk of your time is going to be used to copy the data to the new filesystems using cpio. I would estimate 3GB/hr. as a very conservative value; fast equipment could greatly reduce that. The beauty of copying using cpio to temp mountpoints is that all of your original data is still there. There is no reason to free up space on the old VG's until you know you are okay and have a good backup.

Of course, the smart play is to have known good backs before you start so that you will never need them; that's one of God's little jokes.

If it ain't broke, I can fix that.
Anwar Aziz_1
Occasional Advisor

Re: Adding two hard-drives and re-allocate space - how???

Hi...im really sorry to beat this subject to death. But im in a real bind right now and I need to make sure i have the steps to get in there...add the drives, adjust the volume group sizes and never look at this again :)

I made the mistake of assuming that the job would only be to pop the new drives in and then run pvcreate, vgcreate, vgextend and that would be that.

This is what i know...G-class server with two 6gig drives installed is getting 2 additional disks (i think they are 18 gig drives)
-No mirroring.
-I think the drives are just being added to an existing VG.
I am having trouble following the part of using cpio.

I have never done anything like this in HPUX...my experience has been limited to installing checkpoint FW and running basic networking configs on this OS. I great appreciate the help you have provided me with up until this point and I appologize for being such a pest.