How to determine slot assignments for disks - fdddd
Finding the disk slots from inside an OS when using generic hardware can be difficult. The attached script, fdddd, can be used to show the slot mappings for disks, for hardware that supports enclosure data for slot maps:
nmc@myhost:/$ option expert_mode=1
nmc@myhost:/$ !bash
You are about to enter the Unix ("raw") shell and execute low-level Unix command(s). Warning: using low-level Unix commands is not recommended! Execute? Yes
root@myhost:/volumes# cd
root@myhost:~# ftp or scp fdddd file into this directory
root@myhost:~# ./fdddd -h
USAGE: fdddd [-s] diskname [...]
-s # create NexentaStor slotmap output
where diskname is of the form c#t#d# or /dev/rdsk/c#t#d#s#
root@myhost:~# ./fdddd c0t5000C50021293D93d0
c0t5000C50021293D93d0 server-id= chassis-id=500605b0000272bf serial=9WK157DB0000C1022MF2 part=SEAGATE-ST31000424SS revision=0005 ses-enclosure=0 bay=3 disk=0
You can also run fdddd to generate a slotmap file for import. The slot assignment must be an integer for NexentaStor 3.x, so the enclosure number is multiplied by 1000 and added to the bay number.
root@myhost:~#
./fdddd -s c0t5000C50021293
D93d05000c50021293d93:00003
root@myhost:~#
./fdddd -s c0t5000C50021293 > slotmap.file
root@myhost:~#
exit
nmc@myhost:/$setup lun slotmap -f /root/slotmap.file
nmc@myhost:/$ setup lun slotmap show
LUN Slot# DeviceId
c0t5000C50021293D93d0 3 id1,sd@n5000c50021293d93