cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a new Hard Disk

SOLVED
Go to solution
Sundar G
Frequent Advisor

Adding a new Hard Disk

Hi Admins,

I need to add a fresh raw hard disk to hpux 11i os on RP4440 server. Basically i want to extend existing volumes on this new Hard disk.
(say for ex /data, which is mirrored)
At the same time, I want to keep the mirroring of the same volume to be present in the new Hard disk.)

Can anyone tell me the steps & commands that i should follow.

Appreciate your help.

Sundar
5 REPLIES
Rick Garland
Honored Contributor

Re: Adding a new Hard Disk

Kinda of general high level steps listed here, how much detail are you looking for?

After installation of the HD and the system has restarted, an 'ioscan -fnC' command will output the new device with the corresponding device files. If the ioscan is saying NO_HW or is not reporting the device, something wrong with the physical install.

On the device (ioscan will report CLAIMED if all is well with the install) issue the pvcreate command against the device to enable the LVM on this device.

From here you can vgextend to the new device. Then with the mirror software make the mirror onto the new device.

Mel Burslan
Honored Contributor

Re: Adding a new Hard Disk

ioscan -f
insf -e
ioscan -fnC disk
(from the output, find out the device file of the newly created disk, i.e., cXtXdX string)
pvcreate /dev/rdsk/cXtXdX
vgextend vgXX /dev/dsk/cXtXdX (notice it is NOT rdsk anymore)
lvextend -L new_size /dev/vgXX/lvolX

now this lvextend command may fail if you have strict allocation policy is enabled for this lvolX. In which case you have to disable it as you do not have two separate drives to extend the volume onto. If it works, it will not mean much for the protection of your data as both mirrors will boe on the same drive. If this is the case, i.e., extending the lvolX worked, my suggestion is to backup your data on all logical volumes and re-create them in a more sensible manner (which means mirrors will be on a different physical volume than the original data), then restore your data from the backups.

If this is too complicated, please post what exactly you want to do and how your logical volumes are structured to get more detailed help.
________________________________
UNIX because I majored in cryptology...
Sundar G
Frequent Advisor

Re: Adding a new Hard Disk

Hi Berslan

I am sorry, the mirror right now, is taking place on a different disk . Similarly the new disk will have a seperate mirror disk.

can you suggest/rewrite the commands you listed according to the present situtation?

Thanks in advance.

- Sundar
Mel Burslan
Honored Contributor
Solution

Re: Adding a new Hard Disk

#Make sure system recognizes them first
ioscan -f
insf -e

#find the device files
ioscan -fnC disk

(from the output, find out the device fileS of the newly created diskS, i.e., cXtXdX stringS)

#Create physical volumes
pvcreate /dev/rdsk/cXtXdX
pvcreate /dev/rdsk/cYtYdY

#extend the volume group
vgextend vgXX /dev/dsk/cXtXdX
vgextend vgXX /dev/dsk/cYtYdY

lvextend -L new_size /dev/vgXX/lvolX


at this point, if your lvolX has been properly configured, it will first fill up the existing disks that it was sitting on (original and mirror together) then it will go on to the new disks again in original and mirror pair structure. You should not have to worry about what goes where. LVM should take care it for you unless you have a bizzare data distribution.

make sure when you run

lvdisplay /dev/vgXX/lvolX

you see the allocation policy is "strict". If not, you will need to recreate the logical volume. Steps of which are too long to list here for a small chance.


Hope this helps
________________________________
UNIX because I majored in cryptology...
Sundar G
Frequent Advisor

Re: Adding a new Hard Disk

Thanks a lot it worked