PowerPath: "pprootdev on" command fails because hd5 logical volume is too small
Summary: With AIX 7.2, the size of the boot record, when PowerPath is not enabled on rootvg, is close to 32 MB. When PowerPath is enabled on rootvg, the boot record might exceed 32 MB and if hd5 is only one Physical Partition (PP) large and if the PP size is 32 MB, the boot record cannot be written. This KB proposes a method to increase the size of hd5 so that it can contain the boot record when enabling PowerPath on rootvg (pprootdev on). ...
Symptoms
pprootdev on command fails with the following errors:
dd: 0511-053 The write failed. : There is a request to a device or address that does not exist. 35509+1 records in. 554+1 records out. 0301-161 bosboot: dd failed to copy bootimage. 0301-165 bosboot: WARNING! bosboot failed - do not attempt to boot device. pprootdev: bosboot has failed. The configuration change has not been saved to the boot device.
Cause
The PowerPath script pprootdev on calls the bosboot command to create a new boot image and store it into the boot logical volume specified. With PowerPath enabled, the boot image can have a size >32 Mb. The logical volume has a size of one Physical Partition (PP), but if the PPSIZE of rootvg is 32 Mb then the volume size will be 32 Mb which is too small to store the boot image.
The size of a PP depends on the size of the disk itself. The larger the disk is, the larger the size of a PP.
Resolution
Three different methods exist to increase the size of a logical volume. Volume hd5 is assumed in the examples below:
Method 1 - adding a Physical Partition (PP) to hd5
The partitions hd5 is on must be contiguous, and in the first 4 GB of the hard disk. If you want to know if there are any free partitions available next to hd5, run the following command:
# lspv -M hdisk0 (hdisk0 = rootvg disk) hdisk0:1 hd5:1 hdisk0:2-15 hdisk0:16 fslv00:1 hdisk0:17 fslv00:2
-
Use
extendlvcommand to add a second partition to hd5. For this example, we would create a file called "Map" for example, and in the file we would have only one line with hdisk0:2. Then we would runextendlv -m Map hd5 1. This would extend hd5 by one PP starting at hdisk0:2. This would guarantee that the extend is contiguous. -
Run
pprootdev oncommand (if you run into the issue after runningpprootdev on, this second attempt to runpprootdev onwill fail because the previous one partially succeeded. This means that you will probably have to create a new copy of your boot disk to repeat the whole procedure again… and extend hd5 LV BEFORE runningpprootdev on).
Method 2 - changing hd5 layout in rootvg with alt_disk_copy utility
-
Run
mkszfilecommand. This command creates a file /image.data which is the layout of rootvg. -
Edit the image.data file and adjust LPs and LV_MIN_LPS for hd5 (we need one more PP. Therefore, if LPs and LV_MIB_LPS are set to 1, change these values to 2)
Example:
lv_data: VOLUME_GROUP= rootvg VOLUME_GROUP= rootvg LV_SOURCE_DISK_LIST= hdisk4 LV_SOURCE_DISK_LIST= hdisk4 LV_IDENTIFIER= 00f98edf00004c00000001860d2daee6.1 LV_IDENTIFIER= 00f98edf00004c00000001860d2daee6.1 LOGICAL_VOLUME= hd5 LOGICAL_VOLUME= hd5 VG_STAT= active/complete VG_STAT= active/complete TYPE= boot TYPE= boot MAX_LPS= 512 MAX_LPS= 512 COPIES= 1 COPIES= 1 LPs= 1 LPs= 2 STALE_PPs= 0 STALE_PPs= 0 INTER_POLICY= minimum INTER_POLICY= minimum INTRA_POLICY= edge INTRA_POLICY= edge MOUNT_POINT= MOUNT_POINT= MIRROR_WRITE_CONSISTENCY= on/ACTIVE MIRROR_WRITE_CONSISTENCY= on/ACTIVE LV_SEPARATE_PV= yes LV_SEPARATE_PV= yes PERMISSION= read/write ==> PERMISSION= read/write LV_STATE= closed/syncd LV_STATE= closed/syncd WRITE_VERIFY= off WRITE_VERIFY= off PP_SIZE= 128 PP_SIZE= 128 SCHED_POLICY= parallel SCHED_POLICY= parallel PP= 1 PP= 1 BB_POLICY= non-relocatable BB_POLICY= non-relocatable RELOCATABLE= no RELOCATABLE= no UPPER_BOUND= 32 UPPER_BOUND= 32 LABEL= primary_bootlv LABEL= primary_bootlv MAPFILE= MAPFILE= LV_MIN_LPS= 1 LV_MIN_LPS= 2 STRIPE_WIDTH= STRIPE_WIDTH= STRIPE_SIZE= STRIPE_SIZE= SERIALIZE_IO= no SERIALIZE_IO= no FS_TAG= FS_TAG= DEV_SUBTYP= DEV_SUBTYP=
-
Clone rootvg using the command:
alt_disk_copy -i /image.data -d hdiskY(hdiskY is the target disk) -
Reboot the server to activate the cloned disk (with new PP size)
-
Run
pprootdev oncommand
Method 3 - re-creating hd5
As previously mentioned, the partitions hd5 is on must be contiguous, and in the first 4 GB of the hard disk. If you want to know if there are any free partitions available next to hd5, run the following command:
# lspv -M hdisk0 (hdisk0 = rootvg disk) hdisk0:1 hd5:1 hdisk0:2 fslv00:1 hdisk0:3 fslv00:2
-
In the above example, there is no free PP after the first one used by hd5. Using an
extendlvwill not work since the extra PP will not be contiguous. Since hd5 only contains the boot record and this contents can be generated with abosbootcommand, we can completely re-create hd5.# rmlv -f hd5 (hdisk0 = rootvg disk) # mklv -y hd5 -t boot -u2 rootvg 2 hdisk0
-
We can then check with an
lspv -M hdiskXXthat the newly created hd5 now has two consecutive PP.# lspv -M hdisk0 (hdisk0 = rootvg disk) hdisk0:1 hdisk0:2 fslv00:1 hdisk0:3 fslv00:2 .... hdisk0:13 hd5:1 hdisk0:14 hd5:2
The pprootdev on command should now succeed, assuming that the hd5 LV was created within the first 4 GB (this is what the documentation says, but this depends on the AIX release and with AIX 7.2 TL5, the limit is higher). Therefore, and before running a pprootdev on, run a bosboot! If the bosboot cannot find hd5, it means that it is too far away from the beginning of the disk and pprootdev on will fail as well: The change must be undone (rmlv -f hd5; mklv -y hd5 -t boot -u1 rootvg 1 hdiskX) and method 2 must be used.