7025-f50 disk add or replace

Adding a New Drive to a Live System
When you install a new drive in the hot swap subsystem, the amber light in
the carrier will flash and then go out. This indicates that the drive has been
identified and is not spinning. At this point, AIX does not know that the drive
is present in the system. To tell AIX that you have added a new drive, you
can use SMIT or type:
cfgmgr
from the command line. Running this command will cause AIX to find the
drive and spin it up. You will see the amber light come on and hear the
sound of the drive spinning up. Using the lspv command, you will be able
to see your new drive added. If the drive contains a volume group, you
access it from your system by running:
importvg -y VGname hdiskx
Otherwise, you can add the disk to an existing volume group by using smit
extendvg or create a new volume group by using smit mkvg.
Removing a Drive from a Live System
To be able to remove a hot swap drive from the system without causing
problems, you will have to tell AIX that you are removing the drive.
Removing a Disk from an Existing Volume Group: If you want to physically
remove the disk and it belongs to an existing volume group, you would
either remove the logical volumes which are present on the disk (you can
determine which logical volumes are present on a disk by using the lspv -l
hdiskx command), or migrate the physical partitions from the disk to other
disks in the same volume group. To remove a disk from an existing volume
group, you can use the following procedure:
1. Unmount all the file systems on the disk if you are removing the logical
volumes on the disk.
2. Remove all data from the drive by either removing the logical volumes
or by migrating the partitions on the disk to another disk in the same
volume group ( smit migratepv). If you are removing the logical volumes,
you may wish to back up the data prior to removal.
3. Remove the drive from the volume group:
reducevg VGname hdiskx
4. Remove the device from the ODM
rmdev -d -l hdiskx
When you run the rmdev command, the amber light on the drive will
switch off. If you run lspv, you will see that the disk is no longer defined
on the system.
5. Physically remove the drive from the system
Removing a Drive with Its Own Volume Group: To remove a drive which
has its own volume group, you can use the following procedure:
1. Back up any data that you require from the volume group.
2. Unmount all the file systems on the disk.
3. Varyoff the volume group by issuing:
varyoffvg VGname
4. Export the volume group by issuing:
exportvg VGname
5. Remove the device from the ODM by issuing:
rmdev -d -l hdiskx
6. Physically remove the device from the system.
rmdev -d -l hdiskx
When you run the rmdev command, the amber light on the drive will
switch off. If you run lspv, you will see that the disk is no longer defined
on the system.
5. Physically remove the drive from the system.Removing a Drive with Its Own Volume Group: To remove a drive which
has its own volume group, you can use the following procedure:
1. Back up any data that you require from the volume group.
2. Unmount all the file systems on the disk.
3. Varyoff the volume group by issuing:
varyoffvg VGname
4. Export the volume group by issuing:
exportvg VGname
5. Remove the device from the ODM by issuing:
rmdev -d -l hdiskx
6. Physically remove the device from the system.
Replacing a Previously Defined Drive
If you add a disk drive which was already configured to the system and was
removed using the procedures described above, then you can simply add
the new drive as described in “Adding a New Drive to a Live System” on
page 141.Replacing a Previously Defined Drive into the Same Bay: If a drive was
physically removed without first being logically removed from the operating
system, then AIX may have problems. If there were no writes to the disk
after the removal of the disk, then further action is not required. If a write
occurred after or during the removal of the drive and the drive has been
re-added, then you should perform the following:
1. Unmount all file systems on the disk.
2. fsck -y file systems on the disk.
3. Remount the file systems on the disk.Replacing a Previously Defined Drive into a Different Bay: If you place a
drive into a bay different than the one from which it was removed (the one
configured to the system by running the cfgmgr command) and you did not
remove the device from the ODM before physically removing the device, you

will have to clear up the ODM because there will be a duplicate entry for the
drive.
The following shows a scenario where there were three disks in the system
and two volume groups on two separate disks. The disk belonging to testvg
was physically removed without telling AIX.
Running the lspv command shows the three disks:
lspv
hdisk0 00000000a641877c rootvg
hdisk1 00000000b0a645b0 testvg
hdisk2 00000000a6274604 None
hdisk1 was removed from the system before telling AIX. The disk was
replaced into a different bay than it was removed from. The cfgmgr
command was run to configure the disk back into the system, and now lspv
shows:
lspv
hdisk0 00000000a641877c rootvg
hdisk1 00000000b0a645b0 testvg
hdisk2 00000000a6274604 None
hdisk3 00000000b0a645b0 testvg
There are now two entries for the testvg volume group, both with the same
physical volume identifier. This is incorrect and can be cleared up by
performing the following:
1. Unmount all file systems in the testvg volume group.
2. varyoffvg testvg
3. exportvg testvg
At this point, you may get the following error which you can ignore:
0516-024 /usr/sbin/lqueryvg: Unable to open physical volume.
Either PV was not configured or could not be opened. Run
diagnostics.
Running lspv now shows:
lspv
hdisk0 00000000a641877c rootvg
hdisk1 00000000b0a645b0 None
hdisk2 00000000a6274604 None
hdisk3 00000000b0a645b0 None
4. rmdev -d -l hdisk1
5. rmdev -d -l hdisk3
6. cfgmgr
Running lspv now shows the correct disks:
lspv
hdisk0 00000000a641877c rootvg
hdisk1 00000000b0a645b0 None
hdisk2 00000000a6274604 None
7. importvg -y testvg hdisk1
8. Mount all the file systems. You may have to run fsck -y on the file
systems first if they were written to while the disk was removed.
Replacing Mirrored Disks
In this section an outline of mirroring is given. Mirroring takes maximum
advantage of the hot swap subsystem.
The hot swap subsystem means that AIX has to be explicitly told about the
removal and addition of disks. In a normal AIX environment the system
would have been shut down and powered-off. The system would then
recognize the removal or addition of disks.Removing and Adding a Mirrored Disk: If you want to remove a disk which
is a mirror of other disks in its volume group, you can either remove the
logical volume ′s copies which are on the disk and follow the procedure
outlined in “Removing a Disk from an Existing Volume Group” on page 141,
or you can remove the disk without telling AIX. If you choose to remove the
disk without telling AIX, the volume group will stay on-line providing that
quorum has been maintained (more than 50% of the disks in the volume
group are still accessible after removing the disk) or if quorum checking has
been turned off. When you re-add the disk, perform the following procedure:
1. Unmount all the file systems which are mirrored on the disk.
2. Change the state of the disk in the volume group to active:
chpv -v -r hdiskx
chpv -v -a hdiskx
3. Synchronize all the partitions on the disk from their mirrors:
syncvg -v VGname or syncvg -p hdiskx
4. Remount all the file systems which are mirrored on the disk.
This will ensure that AIX correctly knows about the disk being re-added and
that all the partitions are correctly synchronized.
If the disk is part of the root volume group and the file systems which are on
the disk cannot be unmounted, then you can either wait for a reboot of the