12.9. Mass Storage Devices

12.9.1. Device Nodes and Links (Solaris)

Mass storage devices have two types of device nodes, block and raw, which are created in the client's device directory. A link to the block device is created in the client's dev/dsk directory and a link to the raw device is created in the dev/rdsk directory.

Device links have a suffix denoting their slice number. Slice s2 is known as the backup slice, signifying the complete disk. Other slices are numbered accordingly on the file system on the disk. For UFS disks, slice numbers are derived from the disk label. For FAT disks, slices (partitions in this case) are numbered starting from s0. Disk operations such as format or eject should be directed at slice s2. Partition operations such as mount or fstyp should be directed at the individual slice concerned. See Section 12.9.5, “Mass Storage Devices and Idle Sessions” for examples.

12.9.2. Device Nodes and Links (Linux)

Mass storage device nodes are block special nodes. They are created in the dev/dsk directory. Note that for mass storage devices, device nodes are not created in the devices directory and no device links are created.

Device nodes are named with a partition identifier suffix. The device node representing the whole disk does not have such a suffix. For example:

  • disk3p2 represents partition 2 of disk3.

  • disk3 represents the whole disk.

Disk operations such as eject should be directed at the whole disk. Partition operations such as mount should be directed at individual partitions. See Table 12.2, “Commands for Common Disk Operation (Linux)” for examples.

12.9.3. Mount Points

When a mass storage device is plugged into the client, if it has an OS-recognizable file system, it is automatically mounted on a directory under the user's mount parent directory. The mount parent directory is located in $DTDEVROOT/mnt/. The user can also locate mount points by using the -l option of the utdiskadm command.

% utdiskadm -l

12.9.4. Device Ownership and Hotdesking

When the user's session disconnects from the client, the user loses access rights to the mass storage device, and all pending I/O to the device halts. This situation can cause the data on the device to be corrupted. Users should use utdiskadm -r to unmount all file systems safely before hotdesking or unplugging the disk from the client. They should also close all references to files and directories in the mount point to ensure that the device in question is not busy.

12.9.5. Mass Storage Devices and Idle Sessions

If you are using Remote Hotdesk Authentication (RHA), Non-Smart Card Mobility (NSCM), or smart card-based authentication, long I/O operations might fail when using mass storage devices on Sun Ray Clients.

If these types of sessions become idle due to keyboard and mouse inactivity long enough to activate the screen lock, the session is detached. The user loses access to the storage device, causing any I/O in progress to halt, and data may become corrupted.

To avoid this situation, the following options are available:

  • Maintain keyboard or mouse activity

  • Increase the screen lock idle time sufficiently to allow I/O operations to complete

  • Disable the screen lock program

  • Disable the NSCM or RHA policies

  • Find an alternative way to perform the I/O operation more securely, for example, plug the device directly into the Sun Ray server in a locked server room

Note

Some of these options have security and convenience implications that should be carefully weighed against the timeout issue to determine what is best for your site.

12.9.6. Commands for Common Disk Operation (Solaris)

Table 12.1, “Commands for Common Disk Operation (Solaris)” is a summary of common disk operations and the commands used to perform them. Refer to the Solaris documentation and man pages for more information on the individual commands.

Table 12.1. Commands for Common Disk Operation (Solaris)

Operation

Command

Device Name Argument Examples (SPARC)

Device Name Argument Examples (x86)

Format

rmformat

Path of whole disk $UTDEVROOT/dev/rdsk/disk3s2

Path of whole disk $UTDEVROOT/dev/rdsk/disk3p0

Create file system

mkfs

Path of partition $UTDEVROOT/dev/rdsk/disk3s0

Path of partition $UTDEVROOT/dev/rdsk/disk3p1

Create UFS file system

newfs

Path of slice $UTDEVROOT/dev/rdsk/disk3s0

Path of slice $UTDEVROOT/dev/rdsk/disk3s0

Mount

utdiskadm -m

Partition name disk3s0

Partition name disk3p1

Unmount

utdiskadm -u

Mount point $DTDEVROOT/mnt/label1

Mount point $DTDEVROOT/mnt/label1

Prepare to unplug

utdiskadm -r

Device alias disk3

Device alias disk3

Eject media

utdiskadm -e

Device alias disk3

Device alias disk3

Check for media

utdiskadm -c

Device alias disk3

Device alias disk3

Create fdisk table

fdisk

Path of whole disk $UTDEVROOT/dev/rdsk/disk3s2

Path of whole disk $UTDEVROOT/dev/rdsk/disk3p0

Repair file system

fsck

Path of raw slice $UTDEVROOT/dev/rdsk/disk3s0

Path of raw partition $UTDEVROOT/dev/rdsk/disk3p1

Display file system

capacity

df -k

Mount point $DTDEVROOT/mnt/label1

Mount point $DTDEVROOT/mnt/label1

Display slice capacity

prtvtoc

Path of backup slice $UTDEVROOT/dev/rdsk/disk3s2

Path of backup slice $UTDEVROOT/dev/rdsk/disk3s2

List devices

utdiskadm -l

None

None

12.9.7. Commands for Common Disk Operation (Linux)

Table 12.2, “Commands for Common Disk Operation (Linux)” is a summary of common disk operations and the commands used to perform them.

Table 12.2. Commands for Common Disk Operation (Linux)

Operation

Command

Device Name Argument Examples

Create file system

mkfs

Path of partition $UTDEVROOT/dev/dsk/disk3p1

Mount

utdiskadm -m

Partition name disk3p1

Unmount

utdiskadm -u

Mount point $DTDEVROOT/mnt/label1

Prepare to unplug

utdiskadm -r

Device alias disk3

Eject media

utdiskadm -e

Device alias disk3

Check for media

utdiskadm -c

Device alias disk3

Create fdisk table

fdisk

Path of whole disk $UTDEVROOT/dev/dsk/disk3

Repair file system

fsck

Path of partition $UTDEVROOT/dev/dsk/disk3p1

Display file system

capacity

df -k

Mount point $DTDEVROOT/mnt/label1

List devices

utdiskadm -l

None