Operating System - HP-UX
1833162 Members
4110 Online
110051 Solutions
New Discussion

Re: How to Add a New Hard Disk to an existing vol Group vg01

 
Basheer Azeemuddin
Occasional Advisor

How to Add a New Hard Disk to an existing vol Group vg01

I have a vol grp vg01 (4GB Hard Disk). 1 Gb is assigned to /u and 3GB assigned to /image.
I want to increase the size of /image, becuase it is almost full (95%).

How Can add a new disk so that I can increase size of /image
Thanks in advance
Basheer
4 REPLIES 4
Craig Rants
Honored Contributor

Re: How to Add a New Hard Disk to an existing vol Group vg01

Basheer,
This is from a the HP white paper about LVM work.

III) How to add a disk to a Volume Group
Note The following examples is using the disk c1t6d0 and the volume
group vg01

1) Prepare the disk
pvcreate /dev/rdsk/c1t6d0

Note if the disk was previously used in another VG use the
following command instead:

pvcreate -f /dev/rdsk/c1t6d0

Note: Use caution when using pvcreate -f as this will
overwrite the existing volume group information on the disk.

2) Add the disk to the Volume Group
vgextend /dev/vg01 /dev/dsk/c1t6d0

Good Luck,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
A. Clay Stephenson
Acclaimed Contributor

Re: How to Add a New Hard Disk to an existing vol Group vg01

Hi:

This is fairly easy.

1) Use pvcreate to prepare a new physical disk.
2) Use vgextend to add the disk to the volume group.
3) Use lvextend to extend the logical volume.

4) Unless you have OnlneJFS, you must umount the filesystem.
5) Use extendfs to extend the filesystem.
6) Remount the filesystem (unless you have OnlineJFS).

If you are unfamiliar with these operations, you can simply use SAM->Disks and Filesystems.
If it ain't broke, I can fix that.
Roger Baptiste
Honored Contributor

Re: How to Add a New Hard Disk to an existing vol Group vg01

hi,

Make sure you have a new disk(or lun) visible and unused from the system.
ioscan -nfCdisk should give you the disks
seen by the system.
If you have selected say /dev/dsk/cxtydz,
make sure it not used by doing
pvdisplay /dev/dsk/cxtydz -> it should not return anything.

then do pvcreate /dev/dsk/cxtydz

vgextend /dev/vg01 /dev/dsk/cxtydz

Now you should be free to extend /image as follows
bdf /image -> note the lv to which it is mounted.

then,
lvextend -L /dev/vg01/lvname

if you have online JFS , try
fsadm -F /dev/vg01/rlvname

if you don't have online JFS
umount /image
extendfs -F /dev/vg01/rlvname

HTH
raj
Take it easy.
Frederic Sevestre
Honored Contributor

Re: How to Add a New Hard Disk to an existing vol Group vg01

Hi,

Add the disk to your system
pvcreate /dev/rdsk/cxtydz

Then add he disk to the volume group
vgextend vgxx /dev/dsk/cxtydz

Extend the logical volume
lvextend -L /dev/vgxx/lvolxx
to find the LV name : bdf /image

Extend the file system
If you have OnLine JFS :
fsadm -F vxfs -b /image
If you don't have it
umount /image
extendfs /dev/vgxx/rlovxx
mount /image

Fr??d??ric
Crime doesn't pay...does that mean that my job is a crime ?