TITLE : Howto replace a hard drive that contains a single volume group. OS LEVEL : AIX DATE : 19/05/99 VERSION : 1.0 ---------------------------------------------------------------------------- In the following example, an RS6000 has 2 disks, the first contains rootvg and the AIX operating system files, and the second contains datavg and application files. The second disk is reporting errors in the errorlog and even though it is still running it will be replaced. lspv hdisk0 002104067be1ef0f rootvg hdisk1 00210406da6217f8 datavg 1, Find out details of the volume group:- lsvg datavg VOLUME GROUP: datavg VG IDENTIFIER: 00210406d76313c6 VG STATE: active PP SIZE: 4 megabyte(s) VG PERMISSION: read/write TOTAL PPs: 572 (2288 megabytes) MAX LVs: 256 FREE PPs: 571 (2284 megabytes) LVs: 1 USED PPs: 1 (4 megabytes) OPEN LVs: 0 QUORUM: 2 TOTAL PVs: 1 VG DESCRIPTORS: 2 STALE PVs: 0 STALE PPs 0 ACTIVE PVs: 1 AUTO ON: yes The output of this command will be needed to re-create the volume group later on. 2, Find out how many file systems are on the volume group :- lsvg -l datavg datavg: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT datalv jfs 500 500 1 open/syncd /data loglv00 jfslog 1 1 1 open/syncd N/A The output of this command will be needed to re-create the filesystems later on. Ensure that each filesystem is backed up using either tar, cpio or backup. 3, For each mount point listed in the "lsvg -l datavg" command, umount and remove the filesystem:- umount /data rmfs /data 4, Turn off the volume :- varyoffvg datavg 5, Remove the volume group from the system :- export datavg 6, Find out the scsi id of the disk that is being replaced :- lsdev -Cs scsi hdisk0 Available 04-A0-00-0,0 Other SCSI Disk Drive cd0 Available 04-A0-00-4,0 SCSI Multimedia CD-ROM Drive hdisk1 Available 04-A0-00-5,0 Other SCSI Disk Drive 7, Remove the disk drive from the system :- rmdev -l hdisk1 -d 8, Shutdown the system and replace the disk, ensure that the new disk is set for the same scsi id as the old disk. Reboot the system after replacing the disk, you may want to boot in "SERVICE" mode to check that the new disk is on the correct scsi id and can be seen by the system by running "CERTIFY" on the disk. 9, Check that the new disk can be seen by the system and is available:- lsdev -Cs scsi hdisk0 Available 04-A0-00-0,0 Other SCSI Disk Drive cd0 Available 04-A0-00-4,0 SCSI Multimedia CD-ROM Drive hdisk1 Available 04-A0-00-5,0 Other SCSI Disk Drive lspv hdisk0 002104067be1ef0f rootvg hdisk1 none None If the new disk does not report a "Physical volume identifier", then you need to make the hard drive a physical volume :- chdev -l hdisk1 -a pv=yes lspv hdisk0 002104067be1ef0f rootvg hdisk1 00210406dbbccbe1 None 10, Re-create the volume group on the new disk :- mkvg -y datavg -s 4 hdisk1 Where 4 is the "PP SIZE" of the volume group. (vg size of upto 4.064 Gig = 4 Meg PP size vg size of greater than 4.064 and upto 8.128 Gig = 8 Meg PP size vg size of greater than 8.128 and upto 16.256 Gig = 16 Meg PP size vg size of greater than 16.256 and upto 32.512 Gig = 32 Meg PP size etc). 11, For each mount point listing in the "lsgv -l datavg" command, recreate the logical volume, filesystem and mount the filesystem :- mklv -y datalv datavg 500 crfs -v jfs -d datalv -m /data -A yes mount /data Where /data is the "MOUNT POINT" datalv is the "LV NAME" 500 is the "LPs" 12, Restore the data to each filesystem.