How to Add Disks on a CX/UX 7.1 system Once the hardware engineer has physically installed the disks on the system, the following steps should be performed to configure, format, partition and mount the disks. You should have already decided upon the number and size of the disk partitions on each disk, and the names for the mounted file systems. Note that on CX/UX, the maximum partition size is 2 Gb. 1. Log in as root and edit your current configuration file in the directory /usr/src/uts/machine/cf. This is the file that was set up for making your kernel (CX/UX System Administration Guide, Chapter 3). If you don't know what that is, you can find it by doing the following: # uname -v This will return the unix version information. For illustration purposes, let's say it returns: unix2-22-99 Find the correct configuration file by doing the following: # grep unix2-22-99 * This will return the name of the file which contains this version. Then edit that file to add the disk(s). 2. In the section on "Disk Drives", approximately halfway into the file, you must remove the '#' to enable the disk drives that you just connected to your system. Note that there are different controller types. Select the correct ones to enable. For example, you have three disk drives on the ISE controller. The disk section should look like this: # Disk Drives # # Modify the lines below to correspond to disk drives which actually # exist on your system. Each disk specification should have a unique # disk unit number 0 to 31. Change the specification to reflect the # disk controller that the drive is configured on, and set the correct # drive # (SCSI ID for SCSI interface disks) # # SCSI disk drives configured on an Integral SCSI interface disk dsk0 at is0 drive 0 disk dsk1 at is0 drive 1 disk dsk2 at is0 drive 2 # disk dsk3 at is0 drive 3 # SCSI disk drives configured on an HSA # disk dsk2 at hs0 drive 0 # disk dsk1 at hs0 drive 1 # disk dsk2 at hs0 drive 2 # disk dsk3 at hs0 drive 3 # disk dsk4 at hs1 drive 0 # disk dsk5 at hs1 drive 1 # disk dsk6 at hs1 drive 2 # disk dsk7 at hs1 drive 3 [... same for the SMD and Cougar adapter drives ...] If you are going to add the disk on a different controller, then you must modify the controller line to reflect the address of the new controller. For example, if you added an HSA adaptor, you must complete the line for the first hs device: # Retain those lines below which represent a HSA or HDC that is # actually configured on your system. Change the "csr" value # to indicate the HVMEbus slot number that the HSA or HDC is # actually configured in. # controller hs0 at vba? csr ? vector hsintr This is an example of a configured HSA controller: controller hs0 at vba0 csr 0x08 vector hsintr and here is how a disk attached to that controller would be defined: # SCSI disk drives configured on an HSA disk dsk3 at hs0 drive 0 NOTE: ensure that the dsk number is unique for every drive in the system, regardless of controller type. Once you have made these changes, write and quit the editor. 3. You must now create the device nodes for the disks. Change directory to /dev and run: ./MAKEDEV is# ./MAKEDEV hs# [if you have enabled this controller] where # is the dsk number used when adding the device, for example, if adding dsk2, then use is2 (or hs2). This will create the correct device nodes in /dev/dsk and /dev/rdsk. 4. Rebuild and reboot CX/UX by following the procedure on page 3-25 of the CX/UX System Administration Guide as shown in Figure 3-12, specifically: # config configfile # make # cp /unix /unix.old # unlink /unix # cp ../unix /unix (version is in configfile) # cp /etc/master /etc/master.old # cp configfile /etc/master # shutdown +2 (only if in multiuser, to go to single user mode) # ln -f /unix /unix # sync # sync # halt 5. Reboot the system to multiuser mode. 6. Run hwstat to verify that the new disks are attached to the system. If you added dsk1 and dsk2, they will be displayed. 7. Format the new disks as follows: - For disk 2: # format 2 The current format information for the disk is displayed, followed by the format prompt, "format: " To get a list of commands, enter ?. The commands most likely to be used are "partition" and "unit". You can use the smallest number of letters required for a unique command. For example: To set the size units, by default in kilobytes, to megabytes, enter: format: units m OR format: u m Then check the partition sizes with: format: partition OR format: p To change the size of the partitions, you should start by zeroing out all the partitions. DO NOT ZERO OUT PARTITION 7. It contains the geometry block and other partition information. For example, you have a 4.2 Gb disk, and you want to make 3 partitions, the first two 1.1 Gb each, the third one the maximum size of 2 Gb. You would enter the following: format: p 0 0 format: p 1 0 format: p 2 0 and so on until they were all zero. Then change the units to Mb: format: u m and set partitions 0, 1, and 2 to the proper sizes: format: p 0 1100 format: p 1 1100 format: p 2 2000 format: p The last command ('p') will print the new partition sizes. When you are satisfied that the format is correct, update the geometry block with: format: w and quit format with: format: q Please see format(1M) for complete details. 8. Now that the disk has been partitioned, the file systems must created with newfs(1M). Typically, it is run without options: # newfs /dev/rdsk/2s0 # newfs /dev/rdsk/2s1 # newfs /dev/rdsk/2s2 Please see newfs(1M) and mkfs(1M) for complete details. 9. Next, the file systems much be checked for integrity: # fsck -y /dev/rdsk/2s0 # fsck -y /dev/rdsk/2s1 # fsck -y /dev/rdsk/2s2 10. In order to mount the file systems, mount points (directories) must be created in the root file system. For example, we will create the mount points dsk2s0, dsk2s1, and dsk2s2: # mkdir /dsk2s0 /dsk2s1 /dsk2s2 11. Once the mount points are created, the file system can be mounted: # mount /dev/dsk/2s0 /dsk2s0 # mount /dev/dsk/2s1 /dsk2s1 # mount /dev/dsk/2s2 /dsk2s2 Note that if data is stored in the directory while the file system is mounted, it will not be seen in the directory when the file system is not mounted. Conversely, if you put data in the directory while it is not mounted, it will not be seen once it is mounted. 12. To mount the file systems automatically each time you boot to multiuser mode, edit the /etc/fstab file and add the following lines: # File system directory type options freq pass /dev/dsk/2s0 /dsk2s0 4.2 rw 1 2 /dev/dsk/2s1 /dsk2s1 4.2 rw 1 3 /dev/dsk/2s2 /dsk2s2 4.2 rw 1 4 For more details about the /etc/fstab, see fstab(4).