Operating System - HP-UX
1829330 Members
2375 Online
109989 Solutions
New Discussion

New disk install questions

 
SOLVED
Go to solution
Anwar Aziz_1
Occasional Advisor

New disk install questions

Hello all,

I need to replace a disk (not root) on a server running 10.20. I havent done this for HPUX. This forum was very helpful as i was able to remember how to set up all the PV's and LV's properly.

These were the steps i was told to take:

1) Add 1st bigger drive, making sure to get the correct SCSI-ID.

* Is he refering to the jumper settings? Or what shows up on ioscan
------------------------------------
2) Boot up, use SAM to figure out what partitions are on the drive you
wish to remove.

* for arguments sake lets say /stand and /var are on the drive i am going to remove
-------------------------------------
3) Use SAM to add the 9Gb drive to your volume group (vg00).

------------------------------------------
4) Copy the data from 4Gb -> 9Gb (recreate partitions/directories, etc).

*what commands do I use to do this???
----------------------------------------
5) Shutdown, remove 4Gb, add remaining drive(s) (SCSI-ID!!!).
* he emphasizes the scsi-id. im a bit confused about that
------------------------------------------
6) Boot up again, use SAM to add drives to volume group.

---------------------------------------------


You guys here have a been a great help so far. Any one else have any tips about the above?

thanks again
6 REPLIES 6
Vicente Sanchez_3
Respected Contributor

Re: New disk install questions

Hi,

Don't forget a Make_Recovery tape.

To copy data from 4Gb to 9Gb you can use pvmove command, see an example in the man pages.

Regards, Vicente.
Steven E. Protter
Exalted Contributor
Solution

Re: New disk install questions

With regard to scsi id, this is usually controlled by the drive array. If you have an old HP-6000 drive array, there are SCSI id settings by dip switch on the unit.

Of course one of those old puppies probably would not handle a 9G drive.

Prior to starting, determine what is on the disk and back it up, probably with fbackup, even if you intend to use dd to transfer the data drive to drive. What if it doesn't work.

If /usr or /var is on the drive, you need to be in single user mode or lm mode to do the switch.

So lets say its hot swappable, the newer technology. If you have an open drive slot, just follow the instructions and stick the thing in. Your system will show solid green disk lights for a moment, and you might get an lbolt, but in this case, thats normal.

The drive bays internal to HP servers control the SCSI id and you don't have to fiddle with the drive. The drive, if obtained from HP should have correct pin settings, you should not have to touch it.

At that point you can use sam to add the drive. It will show up on ioscan instantly.

You can use pvcreate -f /dev/rdsk/cxtxdx with the last part being the device driver of the new disk to start the process of adding the drive to the system. x is a number btw, I just don't know what it will be on your system.

then you extend a volume group to include the drive.

vgextend vg01 /dev/dsk/cxtxdx

Now its in a volume group and you can lvcreate, and lvextend to build filesystems. Contact me if you need further assistance with that.

Good luck.

Steve
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
John Dvorchak
Honored Contributor

Re: New disk install questions

First thing to consider is that adding a larger drive to an existing volume group, may render a portion of the new disk unusable. By that I mean that if the volume group was created with 4 gig drives and you add a 9 gig drive, only 4 gigs will be usable.

When I am replacing a failed disk, I just replace it with a similar disk and scsi address setting (yes switch/jumper). The do a vgcfgrestore (man 1m vgcfgrestore)to the new disk, enable the vgchange -a y and restore the data, unless it was a mirror, then just do a vgsync to get it back running.
If it has wheels or a skirt, you can't afford it.
Thayanidhi
Honored Contributor

Re: New disk install questions

Hi,

I think you are too cautious.
If you are going to replace, use the same SCSI ID of the Disk which you are replacing.
1.Backup the data
2. do a pvdisplay & vgdisplay to find which VG/LV are on this PV.
3. Use LVM commands to remove the disk from the system logically
4. Shutdown the server (I believe it is an internal disk? If it is hot pluggable-no shutdown required)
5.Replace the disk
6. use LVM commands to restore the LVm configuration.

If you are unsure of the LVM commands, just post the pvdisplay output and related vgdisplay and related lvdisplay too.

TT
Attitude (not aptitude) determines altitude.
Anwar Aziz_1
Occasional Advisor

Re: New disk install questions

in reference to Thayanidhi's response:
I am cautious since I kinda dont know what Im doing :)

"If you are going to replace, use the same SCSI ID of the Disk which you are replacing."
If lets say the scsi-id is set to 5 does this mean the drive is in the 5th slot? If so then i would need to set the new drive's ID to 4 since slot 4 would be open. I would copy the data from the small drive to the bigger drive then take the small drive out and move the new drive from slot 4 to 5. Will this work?

1.Backup the data
- How do i do this exactly via command line?
I dont have access to a server until the day i need to do this so there is no way for me to man the commands.

Can I copy the data from one drive to another directly? TAR?
tar -cv /stand
tar - cv /swap
would that work?
tar -xv /stand
tar -xv /swap on the new drive?

2. do a pvdisplay & vgdisplay to find which VG/LV are on this PV.

3. Use LVM commands to remove the disk from the system logically
- vgremove???

4. Shutdown the server (I believe it is an internal disk? If it is hot pluggable-no shutdown required)
- not hot pluggable

5.Replace the disk

6. use LVM commands to restore the LVm configuration.
- can i do this through SAM?


Ive done this once or twice a couple of yrs ago and since then never looked at hpux again and I am having a lot of trouble picturing the steps.
Anwar Aziz_1
Occasional Advisor

Re: New disk install questions

bump