1. The disk can be recoginised by running an ioscan on you system.
ioscan -funC disk
Diskinfo will tell you the type and size.
2. Create a physical volume on the new disk:
/etc/pvcreate <raw_disk_device>
3. Add the disk to the appropriate volume group:
/etc/vgextend <volume_group><block_disk_device>
4. Find the total number to the filesystem that is to be increased:
/bin/bdf -l | grep <filesystem> | awk '{print $1}'
5. Obtain the logical volume of the filesystem that is to be increased:
/bin/bdf -l | grep <filesystem> | awk '{print $1}'
6. Unmount the filesystem so that you can adjust it:
/etc/umount <filesystem>
7. Add the new disk to the filesystem:
/etc/lvextend -l <physical_extents><block_volume_device><block_disk_device>
(the number of physical extents is obtained from step #2)
8. Extend the filesystem on the logical volume to cover the new disk:
/usr/sbin/extendfs <raw_logical_volume>
9. Mount the filesystem:
/etc/mount <filesystem>
10. Verify the new size of the filesystem:
/bin/bdf -l | grep <filesystem> | awk '{print $2}'
Example: A new 9GB disk with SCSI ID 6 is added to hpserv3 (existing disk is SCSI
ID5), and the /home partition will be extended to use the entire disk
hpserv3# pvcreate /dev/rdsk/c0t6d0. If disk has been used before you will encounter
an error message add the -f
Physical volume "/dev/dsk/cot6d0" has been successfully created.
hpserv3# vgextend /dev/vg00 /dev/dsk/c0t6d0
Volume group "/dev/vg00" has been successfully extended.
hpserv3# pvdisplay /dev/dsk/c0t6d0 | grep "Total PE" | awk '{print $3}'
2071
hpserv3# bdf -l | grep /home | awk '{print $1}'
/dev/vg00/lvol5
hpserv3# umount /home. If an error message is encountered with device is busy.
Common out the entry in /etc/fstab then reboot.
hpserv3# lvextend -l 2071 /dev/vg00/lvol5 /dev/dsk/c0t6d0
Logical volume "/dev/vg00/lvol5" has been successfully extended
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
hpserv3# extendfs /dev/vg00/rlvol5
Max number of sectors extendible is 7864320
Extend file system /dev/vg00/rlvol5 to have 7864320 sectors more.
Warning: 560 sector(s) in last cylinder unallocated
Extended super-block backups (for fsck -b#) at:
1028648, 1038672, 1048696, 1058720, 1068744, 1078768, 1088792, 1098816, 1108840
(K)
8816008, 8826032, 8836056, 8846080, 8856104, 8866128, 8876152, 8886176,
hpserv3# mount /home
hpserv3# bdf -l | grep /home | awk '{print $2}'
8695841