How to create dummy hdisk in AIX6.1

How to create a dummy disk to reserve an hdisk number?

Below you find a situation where the next LUN that is mapped to your system would get an hdisk number 0 (hdisk0):

 # lsdev -Cc disk

 hdisk1 Available 06-08-00-4,0 16 Bit LVD SCSI Disk Drive

 hdisk2 Available 06-08-00-5,0 16 Bit LVD SCSI Disk Drive

To avoid this you could reserve hdisk0 for a dummy disk, e.g.:

 # mkdev -l hdisk0 -c disk -t osdisk -s scsi -p scsi0 -w 0,10 -d

 hdisk0 defined

Now we see hdisk0 as defined:

 # lsdev -Cc disk

 hdisk0 Defined   06-08-00-0,10 Other SCSI Disk Drive

 hdisk1 Available 06-08-00-4,0  16 Bit LVD SCSI Disk Drive

 hdisk2 Available 06-08-00-5,0  16 Bit LVD SCSI Disk Drive

... and the next LUN would be mapped to hdisk3.

Unfortunately this trick only works for systems with a SAS controller assigned. With AIX 5.3 you still have the option to create a dummy SSA disk:

 # mkdev -l hdisk0 -p ssar -t hdisk -w dummy

 mkdev: 0514-519 The following device was not found in the customized

         device configuration database:

         name='ssar'

Don't be confused by the error - we have a hdisk0 now:

 # lsdev -Cc disk

 hdisk0 Defined                SSA Logical Disk Drive

 hdisk1 Available 06-08-00-4,0 16 Bit LVD SCSI Disk Drive

 hdisk2 Available 06-08-00-5,0 16 Bit LVD SCSI Disk Drive

This complicated procedure is not needed any more since AIX 7.1 and AIX 6.1 TL6 - a new command has been made available:

 # lspv

 hdisk0          00c8b12ce3c7d496                    rootvg          active

 hdisk1          00c8b12cf28e737b                    None

 # rendev -l hdisk1 hdisk99

 # lspv

 hdisk0          00c8b12ce3c7d496                    rootvg          active

 hdisk99         00c8b12cf28e737b                    None