This section provides information about how to manage USB mass storage devices connected to a Sun Ray Client.
Mass storage devices have two types of device nodes, block and raw, which are created
in the client's dev
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 15.5.5, “Mass Storage Devices and Idle Sessions” for
examples.
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 15.2, “Commands for Common Disk Operation (Oracle Linux)” for examples.
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
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.
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
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.
Table 15.1, “Commands for Common Disk Operation (Oracle Solaris)” is a summary of common disk operations and the commands used to perform them. Refer to the Oracle Solaris documentation and man pages for more information on the individual commands.
Table 15.1. Commands for Common Disk Operation (Oracle Solaris)
Operation | Command | Device Name Argument Examples (SPARC) | Device Name Argument Examples (x86) |
---|---|---|---|
Format | rmformat |
Path of whole disk
|
Path of whole disk
|
Create file system | mkfs |
Path of partition
|
Path of partition
|
Create UFS file system | newfs |
Path of slice
|
Path of slice
|
Mount | utdiskadm -m |
Partition name |
Partition name |
Unmount | utdiskadm -u |
Mount point |
Mount point |
Prepare to unplug | utdiskadm -r |
Device alias |
Device alias |
Eject media | utdiskadm -e |
Device alias |
Device alias |
Check for media | utdiskadm -c |
Device alias |
Device alias |
Create | fdisk |
Path of whole disk
|
Path of whole disk
|
Repair file system | fsck |
Path of raw slice
|
Path of raw partition
|
Display file system capacity | df -k |
Mount point |
Mount point |
Display slice capacity | prtvtoc |
Path of backup slice
|
Path of backup slice
|
List devices | utdiskadm -l | None | None |
Table 15.2, “Commands for Common Disk Operation (Oracle Linux)” is a summary of common disk operations and the commands used to perform them.
Table 15.2. Commands for Common Disk Operation (Oracle Linux)
Operation | Command | Device Name Argument Examples |
---|---|---|
Create file system | mkfs |
Path of partition
|
Mount | utdiskadm -m |
Partition name |
Unmount | utdiskadm -u |
Mount point |
Prepare to unplug | utdiskadm -r |
Device alias |
Eject media | utdiskadm -e |
Device alias |
Check for media | utdiskadm -c |
Device alias |
Create | fdisk |
Path of whole disk
|
Repair file system | fsck |
Path of partition
|
Display file system capacity | df -k |
Mount point |
List devices | utdiskadm -l | None |
Oracle Linux does not immediately write data to disks. Failure to run utdiskadm -r before unplugging mass storage devices will cause loss of data and stale mount points. Make sure to run utdiskadm -r before unplugging any mass storage device.
% /opt/SUNWut/bin/utdiskadm -r device_name
This section provides troubleshooting information for mass storage.
Check the log file
/var/opt/SUNWut/log/utstoraged.log
for a
message about why device nodes were not created. Some mass
storage device types are not supported.
Check the log file
/var/opt/SUNWut/log/utmountd.log
for an
error message.
This condition occurs when the Sun Ray operating system does not recognize the storage devices's file system.
This condition occurs when a user still has an open reference to the mount point at the time the storage device is unplugged or the user's session is disconnected. The mount point becomes a stale mount point and persists until the system is rebooted or until the administrator removes it.
Use the following procedure to find and remove stale mount points.
Search for stale mount points:
# utdiskadm -s
For each stale mount point, close all references to the mount point.
For each stale mount point, terminate all processes that refer to the mount point.
Remove the mount point.
# umount stale_mount_path