cfgmgr and hdisk number allocation

Hi - can anybody tell me what the default behaviour is for cfgmgr when it allocates hdisk numbers to newly discovered disks in the ODM ? I want to add a disk from our FAStT700 SAN disk array and import it on our p-series (AIX 5.2). Problem is we import and export Flashcopy devices fror scripted backups there too.

If my Flashcopies are mounted when I introduce the new disk, I'm guessing it will just get the next available id (in our case hdisk27). However, if I subsequently disable the Flashcopies (hdisks17-26) then reintroduce them at a later date, will they still get id's 17-26 or will the system start numbering them from hdisk28 ?? If so I might have to change all our scripts.

Essentially I just need to know does the system always use the lowest available id; or just the next (incremental) one to the one it just allocated ?

Thanks in advance.

the flashcopy devices should still exist in your system as "defined" when you remove them from your system (check with lsdev -Ccdisk) when they are defined its ok and they keep their hd number even if they are deleted and there are new disks

if they are not defined, check your "disable" script
you have to remove them with rmdev -l and not with rmdev -dl which removes them completely from the odm

I second funksen.
Once AIX has seen a device, unless you rmdev -'d'l or diag -a and delete them, they will persist as defined devices and AIX will not reuse the device names.

thats exactly what I wanted to say, my english is not the best :slight_smile:

Thanks a million guys; I think you have got to the 'nub' of this particular problem. Our FC scripts currently call rmdev with a '-d' flag when they disable the FC volumes, completely removing the definitions each time. I guess this needs changing.

Do you have any links or good examples of FC enable/disable scripts for AIX ? I'm thinking ours may be lacking in other areas too.

Don't worry Funksen; I understood exactly what you were saying - thanks again.

Hello again,

Further to my original post; I'm looking at our existing Flashcopy scripts and the related changes prior to adding our new disks. Can anybody ratify the following scripted processes (in principal) ?

Recreate Flashcopies :

(Shutdown database - quiesce i/o)

  1. SMcli -n "FAStT700" -c 'recreateFlashcopy logicalDrive ["FC VOL 1-1"];
  2. SMcli -n "FAStT700" -c 'create mapping logicalDrive="FC VOL 1-1" logicalUnitNumber=xx host="AIX HOST";
    3.hot_add (actually cfmgr -l deviceclass)
  3. chdev -l hdiskxx -a pv=clear;
  4. recreatevg -y fc_vgname hdiskxx hdiskxx hdiskxx etc
  5. mount /fc_filesystem

Disable Flashcopies :

  1. umount /fc_filesystem
  2. varyoffvg fc_vgname
  3. export fc_vgname
  4. rmdev -l hdiskxx (omitting -d which we run currently)
  5. Smcli -n "FAStT700" -c 'delete mapping logicalDrive="FC VOL 1-1" host ="AIX HOST";
  6. SMcli -n "FAStT700" -c 'disableFlashCopy logicalDrive ["FC VOL 1-1"];

Do I need to do 'chdev -l hdiskxx -a pv=yes' after the clear (step 4) in the recreate to switch the pv from defined to available again; or will the 'hot_add' do that anyway?

Also we got an error with a dirty jfs2 superblock the other night when we mounted the FC volumes. I was wondering about (a) adding a 'sync;sync;sync' call before creating the FCs to flush the buffers and (b) adding a full fsck of the FC volumes before they are mounted; I'm not sure what the policy is on this ??

Thanks in advance.