Volume Management Files

Volume management consists of the following elements.

  • The /usr/sbin/vold volume management daemon.

  • The /etc/vold.conf configuration file that is used by the vold daemon to determine which devices to manage.

  • The /etc/rmmount.conf file that is used to configure removable media mounts and actions in /usr/lib/rmmount.

  • The volume daemon logs messages in the /var/adm/vold.log file.

The /etc/vold.conf File

The default /etc/vold.conf file is shown below.


# @(#)vold.conf 1.25     99/11/11 SMI
#
# Volume Daemon Configuration file
#

# Database to use (must be first)
db db_mem.so

# Labels supported
label cdrom label_cdrom.so cdrom
label dos label_dos.so floppy rmdisk pcmem
label sun label_sun.so floppy rmdisk pcmem

# Devices to use
use cdrom drive /dev/rdsk/c*s2 dev_cdrom.so cdrom%d
use floppy drive /dev/rdiskette[0-9] dev_floppy.so floppy%d
use pcmem drive /dev/rdsk/c*s2 dev_pcmem.so pcmem%d forceload=true
use rmdisk drive /dev/rdsk/c*s2 dev_rmdisk.so rmdisk%d

# Actions
eject dev/diskette[0-9]/* user=root /usr/sbin/rmmount
eject dev/dsk/* user=root /usr/sbin/rmmount
insert dev/diskette[0-9]/* user=root /usr/sbin/rmmount
insert dev/dsk/* user=root /usr/sbin/rmmount
notify rdsk/* group=tty user=root /usr/lib/vold/volmissing -p
remount dev/diskette[0-9]/* user=root /usr/sbin/rmmount
remount dev/dsk/* user=root /usr/sbin/rmmount

# List of file system types unsafe to eject
unsafe ufs hsfs pcfs udfs

The syntax for the /etc/vold.conf file is shown below.


# Database to use
db database

# Labels supported
label label_type shared_object device

# Devices to use
use device type special shared_object symname [ options ]

# Actions
insert regex [ options ] program program args
eject regex [ options ] program program args
notify regex [ options ] program program args

# List of file system types unsafe to eject
unsafe fs_type fs_type
					

You can safely modify only the Devices to use and Actions fields. You should not make changes to any of the other fields.

If you modify the vold.conf file, you must send vold a HUP signal to tell it to reread vold.conf, as shown below.

# ps = -ef _ grep vold
    root   252     1  0 10:38:29 ?        0:02 /usr/sbin/vold
  winsor   500   422  0 11:08:38 pts/4    0:00 grep vold
# kill -HUP 252
#

If a system has additional diskette drives, volume management automatically creates two subdirectories in /vol/dev for each additional drive—one to provide access to any file systems that might be written on the media inserted into these drives, and the other to provide access to the raw device itself. For a second diskette drive, volume management creates directories named diskette1 and rdiskette1. For a third diskette drive, it creates directories named diskette2 and rdiskette2. And so on for additional drives.

NOTE

If you want additional CD-ROM drives on a system, you must edit the /etc/vold.conf file and add the new devices to the Devices to use list.


The syntax for a Devices to use entry is shown below.

use device type special shared-object symname options
					

Table 127 describes each of the fields for the Devices to use syntax.

Table 127. Device Control Syntax Descriptions
Field Supported Default Values Description
device cdrom, floppy, pcmem, rmdisk The removable media device.
type drive The type of device—multiple or single media support.
special /dev/dsk/c0t6, /dev/diskette, /dev/rdsk/c*s2, /dev/rmdisk/jaz, /dev/rmdisk/zip Path name of the device to be used in the /dev directory.
shared-object /usr/lib/vold/ shared-object-name Location of the code that manages the device.
symname cdrom0, cdrom1, floppy0, rmdisk, jaz0, zip0 The symbolic name that refers to this device. The symname is placed in the device directory.
options user=nobody

group=nobody

mode=0666
The user, group, and mode permissions for the inserted media.

The special and symname parameters are related. If special contains any shell wildcard characters—for example, if it has one or more asterisks or question marks in it—then the symname field must have a %d at its end. In this case, the devices that match the regular expression are sorted, then numbered. The first device has a 0 for the %d, the second device has a 1, and so on. If the special specification does not have any shell wildcard characters, then you must explicitly specify a number at the end of the symname parameter.


The syntax for an Action entry is shown below.

insert | eject | notify regex [options] program program_args
					

Table 128 describes each of the fields for the Actions syntax.

Table 128. Actions Syntax Descriptions
Field Description
insert | eject | notify The media event prompting the event.
regex This sh(1) regular expression is matched against each entry in the /vol file system that is being affected by this event.
options (Optional) Specify what user or group name is to be used to run this event.
program The full path name of an executable program to be run when regex is matched.
program_args Arguments to the program.

The /etc/rmmount.conf File

The default /etc/rmmount.conf file is shown below.


# @(#)rmmount.conf 1.10     00/02/14 SMI
#
# Removable Media Mounter configuration file.
#

# File system identification
ident udfs ident_udfs.so cdrom floppy rmdisk
ident hsfs ident_hsfs.so cdrom
ident ufs ident_ufs.so cdrom floppy rmdisk pcmem
ident pcfs ident_pcfs.so floppy rmdisk pcmem

# Actions
action cdrom action_filemgr.so
action floppy action_filemgr.so
action rmdisk action_filemgr.so

# Mount
mount * hsfs udfs ufs -o nosuid

Volume Management Files

This section lists the files and shared libraries used by volume management. The following example shows the files in the /usr/lib/vold directory.


paperbark% ls -1 /usr/lib/vold
db_mem.so.1
db_nis.so.1
dev_cdrom.so.1
dev_cdtest.so.1
dev_floppy.so.1
dev_pcmem.so.1
dev_rmdisk.so.1
dev_test.so.1
eject_popup
label_cdrom.so.1
label_dos.so.1
label_sun.so.1
label_test.so.1
volcancel
volmissing
volmissing_popup
volstat
paperbark%

The following example lists the files in the /usr/lib/rmmount directory.


paperbark% ls -1 /usr/lib/rmmount
action_dvdvideo.so.1
action_filemgr.so.1
action_workman.so.1
paperbark%

Volume Management Log Messages

If you encounter problems with volume management, check the /var/adm/vold.log file for information. The following example shows the contents of the vold.log file.


paperbark% more /var/adm/vold.log
Thu Nov 16 08:18:25 2000 warning: either couldn't find a driver for cdrom
 "/dev/rdsk/c*s2", or it's already managed
Thu Nov 16 08:18:25 2000 warning: either couldn't find a driver for floppy
 "/dev/rdiskette[0-9]", or it's already managed
Thu Nov 16 08:18:26 2000 warning: either couldn't find a driver for rmdisk
 "/dev/rdsk/c*s2", or it's already managed
Thu Nov 16 10:41:44 2000 warning: either couldn't find a driver for cdrom
 "/dev/rdsk/c*s2", or it's already managed
Thu Nov 16 10:41:44 2000 warning: either couldn't find a driver for floppy
 "/dev/rdiskette[0-9]", or it's already managed
Thu Nov 16 10:41:44 2000 warning: either couldn't find a driver for rmdisk
 "/dev/rdsk/c*s2", or it's already managed
Sat Nov 18 13:32:44 2000 warning: either couldn't find a driver for cdrom
 "/dev/rdsk/c*s2", or it's already managed
Sat Nov 18 13:32:44 2000 warning: either couldn't find a driver for floppy
 "/dev/rdiskette[0-9]", or it's already managed
Sat Nov 18 13:32:45 2000 warning: either couldn't find a driver for rmdisk
 "/dev/rdsk/c*s2", or it's already managed
Mon Nov 20 08:59:02 2000 warning: either couldn't find a driver for cdrom
 "/dev/rdsk/c*s2", or it's already managed
Mon Nov 20 08:59:02 2000 warning: either couldn't find a driver for floppy
 "/dev/rdiskette[0-9]", or it's already managed
Mon Nov 20 08:59:03 2000 warning: either couldn't find a driver for rmdisk
 "/dev/rdsk/c*s2", or it's already managed
paperbark%  

If you want to display debugging messages from the volume daemon, you can start the daemon by typing /usr/sbin/vold -v -L 10. With these options, the volume daemon logs quite a bit of information in /var/adm/vold.log.

Another way to gather debugging information is to run the rmmount command with the debug option. To do so, edit /etc/vold.conf and change the lines that have /usr/sbin/rmmount to include the -D option, as shown in the following example.

insert /vol*/dev/diskette[0-9]/* user=root /usr/sbin/rmmount -D

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.36.174