0301-108 /usr/lib/boot/bin/mkboot_chrp: Unable to read file blocks. Return code: -1

root's picture

If you have one missing disk in rootvg, and also in the boot list, you may get the following error if you do not remove it from rootvg:

# bosboot -ad /dev/hdisk3

0301-108 /usr/lib/boot/bin/mkboot_chrp: Unable to read file blocks. Return code: -1

0301-158 bosboot: mkboot failed to create bootimage.

0301-165 bosboot: WARNING! bosboot failed - do not attempt to boot device.

Now, the story behind this error, in our situation.

The hdisk0 is declared missing:

# lsvg -p rootvg
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
[color=red]hdisk0            missing           546         360         109..15..18..109..109[/color]
hdisk3            active            546         366         109..21..18..109..109

The command dd is confirming that the disk is unusable:

Yes, with this command you can verify the availability of a disk.
# dd if=/dev/hdisk0 of=/dev/null count=10
dd: 0511-051 The read failed.
: There is an input or output error.
0+0 records in.
0+0 records out.

List the LVs from each hdisk to make sure you have them all mirrored.

If you have partitions only on hdisk0, be sure they are lost.

# lspv -l hdisk0
hdisk0:
LV NAME               LPs     PPs     DISTRIBUTION          MOUNT POINT
hd2                   18      18      00..00..18..00..00    /usr
hd4                   1       1       00..00..01..00..00    /
hd8                   1       1       00..00..01..00..00    N/A
paging00              4       4       00..00..04..00..00    N/A
hd6                   2       2       00..02..00..00..00    N/A
hd5                   1       1       01..00..00..00..00    N/A
hd1                   40      40      00..00..40..00..00    /home
hd3                   14      14      00..00..14..00..00    /tmp
hd9var                3       3       00..00..03..00..00    /var
lv_tempo              80      80      00..80..00..00..00    /tempo
[color=red]lg_dumplv             6       6       00..06..00..00..00    N/A[/color]
hd10opt               9       9       00..00..09..00..00    /opt
livedump              6       6       00..06..00..00..00    /var/adm/ras/livedump
hd11admin             1       1       00..00..01..00..00    /admin
# lspv -l hdisk3
hdisk3:
LV NAME               LPs     PPs     DISTRIBUTION          MOUNT POINT
hd2                   18      18      00..00..18..00..00    /usr
hd4                   1       1       00..00..01..00..00    /
hd8                   1       1       00..00..01..00..00    N/A
paging00              4       4       00..00..04..00..00    N/A
hd6                   2       2       00..02..00..00..00    N/A
hd5                   1       1       01..00..00..00..00    N/A
hd1                   40      40      00..00..40..00..00    /home
hd3                   14      14      00..00..14..00..00    /tmp
hd9var                3       3       00..00..03..00..00    /var
lv_tempo              80      80      00..80..00..00..00    /tempo
hd10opt               9       9       00..00..09..00..00    /opt
livedump              6       6       00..06..00..00..00    /var/adm/ras/livedump
hd11admin             1       1       00..00..01..00..00    /admin

As you can see above, you need to remove the sysdump device and you will have to create it on the other disk afterwards.

# sysdumpdev -l
primary              /dev/lg_dumplv
secondary            /dev/sysdumpnull
copy directory       /var/adm/ras
forced copy flag     TRUE
always allow dump    FALSE
dump compression     ON
type of dump         traditional
# lslv lg_dumplv
LOGICAL VOLUME:     lg_dumplv              VOLUME GROUP:   rootvg
# lslv -l lg_dumplv
lg_dumplv:N/A
PV                COPIES        IN BAND       DISTRIBUTION  
hdisk0            006:000:000   100%          000:006:000:000:000 
# sysdumpdev -p /dev/sysdumpnull
primary              /dev/sysdumpnull
secondary            /dev/sysdumpnull
copy directory       /var/adm/ras
forced copy flag     TRUE
always allow dump    FALSE
dump compression     ON
type of dump         traditional

# mklv -L lv_dumpp -y lv_dumpp -t sysdump rootvg 6 hdisk3
lv_dumpp

# sysdumpdev -p /dev/lv_dumpp
primary              /dev/lv_dumpp
secondary            /dev/sysdumpnull
copy directory       /var/adm/ras
forced copy flag     TRUE
always allow dump    FALSE
dump compression     ON
type of dump         traditional

Now unmirror rootvg and remove hdisk0.

You can ignore the errors - the disk is unusable and it is normal:

# unmirrorvg rootvg hdisk0
0516-1246 rmlvcopy: If hd5 is the boot logical volume, please run 'chpv -c <diskname>'
        as root user to clear the boot record and avoid a potential boot
        off an old boot image that may reside on the disk from which this
        logical volume is moved/removed.

0301-108 mkboot: Unable to read file blocks. Return code: -1
0516-1798 lchangevg: Cannot change quorum without losing quorum.
0516-732 chvg: Unable to change volume group rootvg.
0516-1144 unmirrorvg: rootvg successfully unmirrored, user should perform
        bosboot of system to reinitialize boot records.  Then, user must modify
        bootlist to just include:  hdisk3.

# lsvg -p rootvg
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            missing           546         540         110..103..109..109..109
hdisk3            active            546         366         109..21..18..109..109

As there is still one LV on this disk, you will have to use -d on reducevg command:

# lspv -l hdisk0
hdisk0:
LV NAME               LPs     PPs     DISTRIBUTION          MOUNT POINT
lg_dumplv             6       6       00..06..00..00..00    N/A
# reducevg rootvg hdisk0
0516-016 ldeletepv: Cannot delete physical volume with allocated
        partitions. Use either migratepv to move the partitions or
        reducevg with the -d option to delete the partitions.
0516-884 reducevg: Unable to remove physical volume hdisk0.
# [color=green]reducevg -d rootvg hdisk0[/color]
0516-914 rmlv: Warning, all data belonging to logical volume
        lg_dumplv on physical volume hdisk0 will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)? y
rmlv: Logical volume lg_dumplv is removed.
# lsvg -p rootvg           
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk3            active            546         366         109..21..18..109..109

Now you can safely run the bosboot command again and recreate the bootlist:

# bosboot -ad /dev/hdisk3

bosboot: Boot image is 41368 512 byte blocks.
# bootlist -om normal
hdisk0 
# bootlist -m normal hdisk3
# bootlist -om normal
hdisk3 blv=hd5

Do not forget to recreate the ipldevice according to the existing disk(s):

# ls -la /dev/ipldevice 
crw-------    2 root     system       20,  0 Oct 07 2009  /dev/ipldevice
# ls -la /dev/* | grep "20,  0"
brw-------    1 root     system       20,  0 Oct 07 2009  /dev/hdisk0
crw-------    2 root     system       20,  0 Oct 07 2009  /dev/ipldevice
crw-------    2 root     system       20,  0 Oct 07 2009  /dev/rhdisk0
# rm /dev/ipldevice
# ln /dev/hdisk3 /dev/ipldevice
# ls -la /dev/ipldevice        
brw-------    2 root     system       20,  3 Apr 30 15:45 /dev/ipldevice
# ls -la /dev/* | grep "20,  3"       
brw-------    2 root     system       20,  3 Apr 30 15:45 /dev/hdisk3
brw-------    2 root     system       20,  3 Apr 30 15:45 /dev/ipldevice
crw-------    1 root     system       20,  3 Oct 07 2009  /dev/rhdisk3

You are done!

Thou shalt not steal!

If you want to use this information on your own website, please remember: by doing copy/paste entirely it is always stealing and you should be ashamed of yourself! Have at least the decency to create your own text and comments and run the commands on your own servers and provide your output, not what I did!

Or at least link back to this website.