Flashnux

GNU/Linux man pages

Livre :
Expressions régulières,
Syntaxe et mise en oeuvre :

ISBN : 978-2-7460-9712-4
EAN : 9782746097124
(Editions ENI)

GNU/Linux

RedHat 9.0

(Shrike)

devlabel(8)


DEVLABEL

DEVLABEL

NAME
SYNOPSIS
DESCRIPTION
ACTIONS
OPTIONS
FILES
METHODOLOGY
USAGE
LIMITATIONS
UUID NAMING CONVENTION
AUTHOR

NAME

devlabel − Consistent/persistent storage device access through symlinking

SYNOPSIS

devlabel [action] [options]

DESCRIPTION

devlabel is a script which manages symlinks to storage devices on your system. This is accomplished by utilizing the inherent unique identifiers (UUID) that each device *should* have in order to maintain a correctly pointing symlink in the event that the device name changes (eg. /dev/sdc1 becomes /dev/sdd1). By adding entries using devlabel its users can instead reference all devices by their symlink and no longer care what the true name of their device is. Similary, consistent raw device access can also be guaranteed through use of devlabel as it treats entries in the format of /dev/raw/raw# as a special form of symlink so that each raw device can consistently be bound to the correct storage device.

devlabel works with both IDE and SCSI storage and has been integrated into the hotplug system to allow USB, IEEE1394 (firewire) and PCI detection and consistency.

ACTIONS

reload

Affirms the mappings of symlinks to storage devices. If a device cannot be found by its UUID, the existing symlink will be deleted. If the device name has changed, it will update the symlink. Both start and restart are synonyms for this command.

add [-d device] [-s symlink]

Adds the entry symlink -> device and determines the UUID. Alternatively, you can add by UUID if the correct UUID of the device is known. For this type of add you specify the [-s symlink] and the [-u UUID] Note that you must use the option [--partnum partition#] to specify which partition of the device with that UUID should have a symlink pointed to it. If no partnum is specified, the symlink is pointed just to the name of the disk itself.

remove [-s symlink]

Removes the entry symlink

status

Returns the current status of all symlinks that are set to be configured. If the symlink is a raw device, it will return what major/minor combination it is bound to.

printid [-d device]

Returns the identifier that devlabel finds for the device in question.

OPTIONS

-d <device>

The name of the device to be used for the specified action.

-s <symlink>

The name of the symlink to be used.

-u <uuid>

The UUID of the device to be used. The -u option is currently only recognized during an add command.

--partnum <partition#>

The partition number parameter is only supported in conjunction with the -u <uuid> option while doing an add command. Since UUIDs are currently disk specific and not partition specific, devlabel must be told through this parameter which partition of the disk to have the symlink pointed at. If no value is given, the symlink will be pointed at just the disk (e.g. /dev/sdc instead of /dev/sdc5).

--automount

This option is only available during an add. If specified, it will cause this device to be automatically mounted every time devlabel is restarted if, within /etc/fstab , a corresponding entry is found for that symlink. If no entry is found, nothing will happen. Automount is stored as an option in the 4th field of the /etc/sysconfig/devlabel configuration file.

-q

Quiet.

FILES

/etc/sysconfig/devlabel

The file containing all symlinks/rawdevices bindings to be made. This file should not be edited by hand. Instead, the devlabel program should be used to manipulate it.

METHODOLOGY

To determine the unique identifier associated with a SCSI device, devlabel uses the program /usr/bin/scsi_unique_id. If this program cannot determine a unique identifier for your block device then the device cannot be used with devlabel.

Unique identifiers for SCSI devices are read from Page83 and Page80 of your SCSI block device as based on the SCSI standard. This program will look for identifiers in the order of: page 83 type 3, page 83 type 2, page 83 type 1, page 80, and then lastly page 83 type 0.

Unique identifiers for IDE devices are taken from /proc/ide/hd#/identify.

Both IDE and SCSI identifiers will be prefaced with their identifier type and concluded with the model name of the storage device. This entire string constitutes the device’s UUID.

Note that all partitions from the same device will have the same unique identifier but will be distinguishable from each other by their partition number.

If two or more storage devices on your system return the same UUID, none of them may be used with devlabel

USAGE

Hotpluggable storage devices which show themselves as SCSI devices internally (eg. USB, firewire, but not PCMCIA) should have carefully chosen symlink names (eg. /dev/smartcardreader) as the UUIDs pulled from these devices are most likely being supplied by the connection hardware and not by the actual storage media itself.

If symlinks setup by devlabel are to be used within /etc/fstab , these symlinks must be located on the root partition so that they are accessable by /etc/rc.d/rc.sysinit during the boot-up process.

LIMITATIONS

Devlabel does not currently handle interdisk renaming events. These events occur when one partition within a disk gets deleted and all of the partitions after it shift down a number (e.g. when /dev/sda6 is deleted, /dev/sda7 becomes /dev/sda6). Currently IA-64 systems utilize the Intel Extensible Firmware Interface (EFI) Spec for partition specific identifiers which would make this functionality possible, but until the spec becomes more widely used, its usage will not be adopted (or worthwhile) within devlabel.

UUID NAMING CONVENTION

UUIDs are prefaced with a tag to alert devlabel as to where the identifier came from. Currently, devlabel supports SCSI firware identifiers and IDE identifiers.

S83.3

SCSI Page 83, Type 3 identifier

S83.2

SCSI Page 83, Type 2 identifier

S83.1

SCSI Page 83, Type 1 identifier

S80

SCSI Page 80 identifier (Serial Number)

S83.0

SCSI Page 83, Type 0 identifier

I

IDE identifier as found in words 11-20 of /proc/ide/<device>/identify

AUTHOR

Gary Lerhaupt (gary_lerhaupt@dell.com)



devlabel(8)