Recipes for adding disks to a Data ONTAP 8 Simulator
Miroslav Klivansky
NetApp Technical Marketing Engineer
Part 1: Background
Data ONTAP 8 provides a user mode system shell for rare diagnostic tasks. While most of the CPU cycles are spent in various Data ONTAP kernel modules, a user space exists and is used to run some processes and for diagnostics. The simulator takes advantage of this user space to implement simulated disks. These disks are kept as files in a special directory. The default simulator comes with 28 simulated disks of 1GB each. It is possible to increase the simulated disk count to 56 simulated disks. Any disk files above the first 56 are ignored. The following procedures will provide step-by-step instructions for doubling the disk count to 56 disks and making the disks available for use.
During these procedures we will unlock the diagnostic user account to gain access to the system shell, use the diag account to create the new simulated disks, and then reboot the simulator to have the new disks recognized. The high-level process is same for both 7-Mode and Cluster-Mode, but the command syntax differs. You can perform the procedure either through the console or through SSH.
Part 2: Adding Disks to a 7-Mode Simulator
1. We need to unlock the diag user and assign it a password:
priv set advanced
useradmin diaguser unlock
useradmin diaguser password
2. Now log in to the system shell using the diag user account:
systemshell
login: diag
password: <password>
3. First, we need to fix a glitch in how one of the utility programs was compiled. The following set of commands create a symbolic link to a shared library that's needed by the utility.
cd /lib
sudo mount -u -o rw /
sudo ln -s libc.so.6 libc.so.7
sudo mount -u -o ro /
4. Add the directory with the simulator disk tools to the path:
setenv PATH "${PATH}:/sim/bin"
echo $PATH
5. Go to the simulated devices directory:
cd /sim/dev
ls ,disks/
6. At this point you will see a number of files which represent the simulated disks. Notice that these files start with "v0." and "v1.". That means the disk are attached to adapters 0 and 1, and if you count the disk files you'll see that there are 14 of them on each adapter. This is similar to the DS14 shelf topology with each shelf attached to its own adapter. We will now add two more sets of 14 disks to the currently unused adapters 2 and 3:
makedisks.main -h
sudo makedisks.main -n 14 -t 23 -a 2
sudo makedisks.main -n 14 -t 23 -a 3
ls ,disks/
The first invocation of the command prints usage information. The remaining two commands tell the simulated disk creation tool to create 14 additional disk ("-n 14") of type 23 ("-t 23") on adapters 2 and 3 (e.g., "-a 2"). Data ONTAP 8.0.1 supports simulated disks 1GB or smaller. Even if you see larger disks listed in the usage information, please resist the temptation to add them to the simulator. It will only cause Data ONTAP to panic on boot and force you to recreate the simulator from scratch.
7. Now we're done with the system shell. We need to reverse some of the earlier steps and reboot the simulator so that it sees the new disks:
exit
useradmin diaguser lock
priv set admin
reboot
8. After the reboot complete, log back in and take ownership of all the new disks:
disk show -n
disk assign all
disk show -v
You should now see 56 disks of 1GB each listed in the simulator. The new disks should be listed as already zeroed and ready to use inside an aggregate.
Part 3: Adding Disks to a Cluster-Mode Simulator
These are the steps for adding disks to a single Cluster-Mode simulator. For a system with multiple nodes, you will need to perform this sequence for each node.
1. We need to unlock the diag user and assign it a password:
security login unlock -username diag
security login password -username diag
2. Now log in to the system shell using the diag user account:
set -privilege advanced
systemshell local
login: diag
password: <password>
3. First, we need to fix a glitch in how one of the utility programs was compiled. The following set of commands create a symbolic link to a shared library that's needed by the utility.
cd /lib
sudo mount -u -o rw /
sudo ln -s libc.so.6 libc.so.7
sudo mount -u -o ro /
4. Add the directory with the simulator disk tools to the path:
setenv PATH "${PATH}:/sim/bin"
echo $PATH
5. Go to the simulated devices directory:
cd /sim/dev
ls ,disks/
6. At this point you will see a number of files which represent the simulated disks. Notice that these files start with "v0." and "v1.". That means the disk are attached to adapters 0 and 1, and if you count the disk files you'll see that there are 14 of them on each adapter. This is similar to the DS14 shelf topology with each shelf attached to its own adapter. We will now add two more sets of 14 disks to the currently unused adapters 2 and 3:
makedisks.main -h
sudo makedisks.main -n 14 -t 23 -a 2
sudo makedisks.main -n 14 -t 23 -a 3
ls ,disks/
The first invocation of the command prints usage information. The remaining two commands tell the simulated disk creation tool to create 14 additional disk ("-n 14") of type 23 ("-t 23") on adapters 2 and 3 (e.g., "-a 2"). Data ONTAP 8.0.1 supports simulated disks 1GB or smaller. Even if you see larger disks listed in the usage information, please resist the temptation to add them to the simulator. It will only cause Data ONTAP to panic on boot and force you to recreate the simulator from scratch.
7. Now we're done with the system shell. We need to reverse some of the earlier steps and reboot the simulator so that it sees the new disks:
exit
security login lock -username diag
system node reboot local
8. After the reboot complete, log back in and take ownership of all the disks. The example below is for a brand new system where all but disks in the root aggregate are unowned:
storage disk show
storage disk modify -disk <NODENAME>:v4.* -owner <NODENAME>
storage disk modify -disk <NODENAME>:v5.* -owner <NODENAME>
storage disk modify -disk <NODENAME>:v6.* -owner <NODENAME>
storage disk modify -disk <NODENAME>:v7.* -owner <NODENAME>
storage disk show
You should now see 56 disks of 1GB each listed in the simulator. The disks should be listed as already zeroed and ready to use inside an aggregate.