sdsadmin(1M) — Series 300/400/700 Only
NAME
sdsadmin − create and administer Software Disk Striping arrays
SYNOPSIS
Make an SDS Array Using Command-Line Options:
sdsadmin [-f] -m [-T type] [-L label] [-P partition_size] [-S stripesize] disk1 [disk2] ...
Make an SDS Array Using a Configuration File:
sdsadmin [-f] -m [-L label] -C description_file disk1 [disk2] ...
Import an SDS Array:
sdsadmin -i disk1 [disk2] ...
Check an SDS Array:
sdsadmin -c lead_device
List Information about an SDS Array:
sdsadmin [-l] device
Destroy SDS Configuration Data on a Device:
sdsadmin [ -f ] -d device1 [device2] ...
Undestroy SDS Configuration Data on a Device:
sdsadmin -u device1 [device2] ...
DESCRIPTION
Use sdsadmin to:
• Create a Software Disk Striping (SDS) array,
• Import an existing array to a system that is configured differently,
• Perform miscellaneous utility functions on an existing array.
For a complete discussion of how to configure and administer SDS arrays, refer to the manual, Improving Performance with Software Disk Striping.
Software Disk Striping arranges data distribution on arrays of up to eight separate, identical disks so that they are functionally equivalent to one large disk. Each array can be divided into up to eight partitions.
SDS arrays can improve I/O performance because individual disks can process requests in parallel. SDS arrays also provide convenient management for disk partitions that are larger than a single disk, thus allowing very large file systems (up to 4 Gbytes (gigabytes)). Creating an SDS array on one disk does not improve performance, but does allow a single disk to have multiple partitions.
Each SDS array partition is striped symmetrically across disks in the array. Striping, instead of placing blocks 1 through n on a single disk, distributes data such that block 1 is on the first disk, block 2 is on the second disk, and so forth. Stripesize refers to the size of data blocks in each SDS partition, and is not related to the individual SCSI disk device internal (hardware) block size (typically 512 bytes).
The first disk in an SDS array is called the lead device, and is used as a handle to access partitions in an SDS array. See EXAMPLES below for information on how sdsadmin creates device special files to access partitions in an SDS array.
Options
sdsadmin recognizes the following options and command-line arguments:
disk Block or character device special file associated with a particular physical disk.
device Block or character device special file associated with any device in an SDS array (either a physical disk or any partition in the array).
-f Force an operation (used only with -m or -d option). This option overrides the disk device check and request for confirmation before proceeding when creating a new array or destroying existing array data on a device. Creating an SDS array on one or more disks that already belong to an array (disk contains SDS array data) or which contain an HP-UX file system is usually considered an error.
If this option is not used and the standard input device is a tty, sdsadmin asks for confirmation before creating an array on any disk containing an HP-UX file system; If standard input is not a tty, sdsadmin prints an error message and aborts without creating the array.
Use the -f option with extreme caution. Creating an SDS array on a device that is already a member of another SDS array, or which contains an HP-UX file system effectively destroys all existing data on the device.
-m Create (make) a new SDS array on the specified disk or disks. An array consists of 1 to 8 identical disks (same manufacturer, model number, capacity, interface type, etc.), and the first disk specified becomes the lead device of the new SDS array.
To create SDS arrays, use command-line options (easier to execute) or using a configuration file (easier to determine at a later date what was done when the array was created). When using the command line, sdsadmin uses the specified type, label, partition size, and stripesize or their default values if not specified. When using a configuration file (-C option), configuration values are taken from the array description file or set to their default if they are not specified in the file. Using an array description file is more flexible because different partition sizes and stripe sizes can specified for each partition in the array. See SDS Array Description Files below for more information, including default values.
sdsadmin verifies that all disks to be used in the new SDS array are the same size, checks that the specified configuration parameters are valid, then writes data describing the new array configuration to each disk of the array.
For best performance, connect disks in the SDS array to two or more interfaces instead of using a single interface bus. sdsadmin then automatically interleaves the disks among available interfaces to create an optimal bus configuration. See the -i option for more information about optimal bus configurations.
When creating an SDS array, sdsadmin creates the necessary device files for each partition of the array in directories /dev/dsk (block special files) and /dev/rdsk (character special files). See EXAMPLES below for more information about device file creation. A message is printed to the standard output listing device files that can be used to access each partition in the new array.
sdsadmin also adds a new disktab entry for the SDS array to file /etc/disktab (see disktab(4)). The type field (see below) of the SDS array is used to name the disktab entry. If an entry of the same name already exists and is not identical to the new entry, sdsadmin prints an error message and aborts without creating a new array.
-T type Specify the type name for a new SDS array. This option is allowed only when using the -m option. See SDS Array Description Files below for a detailed description of the type parameter. When creating a new SDS array, specifying the type is optional. If no type is specified, sdsadmin assigns a type based on the characteristics of the SDS array. This option is not allowed when using the -C option.
-L label Specify the label for a new SDS array. This option is allowed only when using the -m option. See SDS Array Description Files below for a detailed description of the label parameter. When creating a new SDS array, a label is optional.
-P partition_size
Specify the partition size for a new SDS array. The total space in the SDS array is divided into partitions, each having the requested size. The last partition may be smaller than the requested size, depending on the total space available. Since an array can be divided into at most eight partitions, the partition size should be at least one-eighth of the total space in the SDS array. Otherwise, some space may remain unused. See SDS Array Description Files below for a detailed description of the size parameter, including the special keyword max. The default partition size is max (approximately 4 Gbytes or the capacity of the array, whichever is smaller). This option is not allowed when using the -C option.
-S stripesize Specify the stripe size for each partition of a new SDS array. This option is allowed only when using the -m option. For best results, stripesize should be the same as the file-system block size (not related to disk hardware block size). Default stripesize is 16384 bytes. See SDS Array Description Files below for a detailed description of the stripesize parameter. This option is not allowed when using the -C option.
-C description_file
Specify the SDS array description file that describes the parameters of the new SDS array. This option is allowed only when using the -f, -m, and -L options. See SDS Array Description Files below for a detailed description of the SDS array description file. If an SDS array label is specified on the command line, it takes precedence over any label specification in the SDS array description file, thus making it possible to use the same description file to create multiple arrays while giving each array a unique name.
-i Import an existing array. The configuration data stored on each disk in an SDS array includes the absolute device location (major and minor number) of all devices in the array. If an array is to be moved to different bus addresses than when it was originally created, the array must be imported to the new configuration.
To import an array, first connect all disks in the array to their new locations. When an SDS array is created, sdsadmin automatically orders the disks to create an optimal configuration. However, when importing an array sdsadmin cannot change the order of the disks, as this would corrupt the data contained on the array. Consequently, care should be used to ensure that the disks are connected in an optimal configuration. The performance of an SDS array is generally best when the disks of the array are interleaved rather than being connected to a single interface bus. For example, when installing a four-disk array on two busses, connect disk 1 to bus 1, disk 2 to bus 2, disk 3 to bus 1, and disk 4 to bus 2. sdsadmin issues a warning when disks are not connected in an optimal configuration. The array will still function, but performance may not be as good as if the disks were connected in an optimal configuration.
Once the devices in an SDS array are connected to the system, use sdsadmin -i to update the SDS array configuration information. Simply specify the device files corresponding to the new device locations on the command line (in any order, but see the previous paragraph for information about properly interleaving disks on two or more busses). The SDS configuration data on each disk of the array is updated to reflect the new device locations.
As with the -m option, sdsadmin creates the necessary device files to access the SDS array. An informational message is printed to the standard output that indicates what device files may be used to access each partition of the array. If necessary, sdsadmin also adds a new entry to /etc/disktab for the imported SDS array. If a disktab entry for the SDS array already exists but is not correct for the SDS array being imported, sdsadmin prints an error message and aborts the import operation.
-c lead_device Check that the SDS array configuration information stored on lead_device is correct, and that all other disks in the array are present and accessible. lead_device is the block or character device special file associated with the lead device of an SDS array (either the physical disk or any partition of the array). If any errors are encountered, an appropriate error message is printed to the standard-error output. Warning messages are printed to the standard-error output if the device file specified is not the lead device of the SDS array, or if the devices are connected in a bus configuration that is not optimal. See description of the -i option for more information about optimal bus configurations.
-l Print (to standard output) information about the SDS array. The device file given can specify any disk that is a member of the SDS array. The information includes:
• label (if any) of the array
• type of the array
• Which disk in the array the given disk is (1..8)
• The unique identifier assigned to this array (see below)
• Device addresses of all disks in the array
• Data on each partition of the array, including:
• stripesize of the partition (if applicable)
• size of the partition
If the -l option is used to print information about the lead device of an SDS array, the data on the partitions will also include the names of the block and character device special files that are used to access each partition of the SDS array.
When an SDS array is created, sdsadmin assigns a unique 32-bit identifier to the array. This value is stored on each disk in the array, and provides verification that the disks are all members of the same array. Even when two arrays have the same label and type, sdsadmin can distinguish between the disks of the two arrays.
-d Destroy the SDS configuration data stored on the given device(s). This option effectively destroys all data that is contained on the SDS array, and allows the disk to be used for other purposes. Only the SDS configuration data on the listed devices is destroyed, but all data on the array is lost. To destroy the SDS configuration data on all devices in an SDS array, use sdsadmin -d on all devices in the SDS array.
If the standard input device is a tty and the -f option has not been used, sdsadmin requests that the destroy operation be confirmed by printing a confirmation question to standard output then reading a response from the tty. If the response begins with a y the SDS data on the disk is destroyed. Any other response causes sdsadmin to abort the operation.
This option should be used with extreme caution. Once SDS configuration data on any disk in an SDS array has been destroyed, all data stored on the SDS array is lost.
-u Undestroy the SDS configuration data stored on the given device(s). If the device has not been used to store other data since running sdsadmin -d, the SDS configuration data that was originally stored on the device is restored. If all disks of the array that were destroyed are successfully undestroyed, existing data stored on the array is again accessible. If the SDS configuration data cannot be restored, an error message is printed to the standard error output.
SDS Array Description Files
To create more complex SDS arrays than can be created simply by using the -T, -P, and -S options, sdsadmin requires an SDS array description file. The file is supplied to sdsadmin by using the -C option.
Before creating an SDS array description file, decide first how the SDS array should be configured. Factors to consider are: number of disks, number of partitions, and the size and stripe size of each partition. Once SDS array configuration is determined, the next step is to create an SDS array description file that sdsadmin uses to create the SDS array. Refer to the manual Improving Performance with Software Disk Striping for more information on determining array configuration and creating SDS array description files.
An SDS description file is an ordinary text file that can be created with any standard editor such as vi (see vi(1)). The file consists of (keyword, value) pairs that describe attributes of the SDS array. The file can also contain comments. A comment begins with the # character and continues to the end of the current line.
Description file keywords are defined as follows:
type The value of this field is used in the generation of disktab entries for the SDS array (appended to the prefix HP_). It is also used as the value for the product id field returned by diskinfo(1M). The type field may contain up to 16 characters from the set of letters (A-Z a-z), numbers (0-9), hyphen (-), period (.) and underscore (_).
type can be any value, subject to the above limitations and provided the value does not already exist in the file /etc/disktab. Choosing a type name that reflects how the SDS array is configured is often helpful.
If you do not specify a type for the SDS array, sdsadmin assigns a default type composed of the product id of the lead device followed by xnumber_of_disks-number_of_partitions. For example, an SDS array of three HP97560 disks that has been divided into 2 partitions would have a default type value of 97560x3-2.
label This optional field is used to label SDS arrays, and serves only as an identification mechanism. When used, the label field contains up to 16 characters from the set of letters (A-Z a-z), numbers (0-9), hyphen (-), period (.) and underscore (_).
label can be any value, subject to the above limitations. The label provides a convenient means for distinguishing between multiple SDS arrays. It is suggested that you always specify a label for SDS arrays, but this is not a requirement.
partition This keyword indicates the partition to which the subsequent stripesize and size keywords refer. The partition number can be any value from 1 to 8. It is not necessary that contiguous values be used. For example, partitions 1 and 3 can be defined without defining partition 2.
stripesize This field defines the stripe size for the current partition. Valid stripe sizes are 4096, 8192, 16384, 32768, and 65536 bytes. The default stripesize for multiple disk SDS arrays is 16384 bytes.
Specifying stripesize for a single-disk SDS array is not allowed because single-disk SDS arrays are not striped.
If the specified stripe size is larger than 16384 bytes, and the partition is to contain an HP-UX file system, be sure to read the information in the NOTES section, below, regarding newfs(1M) and disktab(4) limitations.
See Choosing the Right Stripe Size, below for more information regarding the correct stripe size to use for a given application.
size This field indicates the size (in bytes) for the current partition. The special value max indicates 4294967295 bytes (approximately 4 Gbytes), or all remaining space available in the SDS array, whichever is smaller. A size must be specified for each partition of an SDS array.
Partitions being used as swap space or as raw devices must not exceed 2 Gbytes (many applications cannot access devices larger than 2 Gbytes).
Partitions used as HP-UX file systems are limited to 4 Gbytes.
The exact size of partitions in an SDS array may or may not match the requested size. sdsadmin adjusts the partition size to meet implementation defined constraints. Partitions smaller than 4 Gbytes are rounded up to a value that is a multiple of the number of disks multiplied by 1 megabyte. For example, partition sizes on a 4-disk array are always a multiple of 4 Mbytes. 4-Gbyte partitions are trimmed such that they are really only 4 Gbytes − 3072 bytes.
Numeric values for the stripesize and size fields can be followed by the letters K, M, or G which respectively represent a multiplication factor of 1024 (Kbytes), 1048576 (Mbytes) or 1073741824 (Gbytes), respectively.
Here is an example SDS array description file:
# Example SDS array description file.
# This array’s type is ’BIGx4-3’, indicating it has 4 large disks
# (HP 97560 containing 1.3 Gbytes each) divided into 3 partitions
#
# This array has been labeled ’example-1’, to distinguish it
# from other arrays.
#
type BIGx4-3
label example-1
partition 1
size max
partition 2
size 900M
stripesize 32k
partition 3
size max
stripesize 4k
The example SDS array has been given a type value of BIGx4-3. The choice of this name is arbitrary. Use any string here (subject to the limitations specified in the description of the type keyword). However, remember that the value of this field is used to name the disktab entry for the SDS array, so it must not be the same as any existing value in /etc/disktab. If type is not specified, sdsadmin chooses a default value based on the type of the lead device. Since the lead device is an HP97560, the default type that would be used if not explicitly specified would be 97560x4-3.
The example SDS array has been labeled with the string example-1. The choice of this name is arbitrary, since it is used only to identify given SDS arrays in a multiple-array environment. If a given SDS array has a label, its value is reported by sdsadmin when the -l option is used.
This SDS array description file defines an SDS array that is divided into three partitions. Since the keyword max is used for the size of partition 1, the first partition is approximately 4096 Mbytes (4 Gbytes) in size. Since no stripesize was specified, the first partition is striped using the default stripe size of 16384 bytes. The second partition is set at 900 Mbytes, and striped in 32-Kbyte chunks.
The keyword max is also used for the size of partition 3. However, since there are only about 172 Mbytes of space remaining in this SDS array, the third partition is 172 Mbytes in size (remember that the array consists of four HP97560 disks, each of which has a capacity of about 1.3 Gbytes). The third partition is striped in 4-Kbyte chunks.
Choosing the Right Stripe Size
The correct stripe size to use on each partition of an SDS array depends on many factors. If you will use the partition as an HP-UX file system, choose a stripe size identical to the file system primary block size. Generally, the larger the file system block size, the better the performance. However, using a large file system block size can consume more disk space, especially if the file system contains many small files.
When using a partition for swap space, use a stripe size of 16384 bytes, the optimum stripe size for swap space.
When using the partition for other purposes, such as an application that accesses the device directly, the correct stripe size depends on how the application uses the device. Only with knowledge of the internals of the application or through experimentation can you determine the optimum stripe size.
EXAMPLES
This example shows configuring an SDS array by specifying the parameters on the command line. Assume a single cabinet contains three HP97560 disks (approximately 1.3 Gbytes each). The disks are connected to the SCSI interface in EISA slot 1 at addresses 6, 5 and 4. To treat these three disks as one larger and faster device, create an SDS array from them using the command:
sdsadmin -m /dev/dsk/c41d6s0 /dev/dsk/c41d5s0 /dev/dsk/c41d4s0
In this example, we have specified the minimum number of parameters necessary to create an array. The array type defaults to 97560x3-1 since the lead device is an HP97560 disk and three disks have been combined into 1 partition. The partition size and stripesize default to the values max and 16384 bytes, respectively. Since the -L option was not used, this SDS array is not labeled.
The new SDS array has one partition with a capacity of approximately 3876 Mbytes. The data is striped across the three disks, using the default stripesize of 16384 bytes.
If necessary, sdsadmin adds a disktab entry for this new SDS array to the file /etc/disktab and creates block and character device files to access the one partition of the SDS array. In this example, the names of the device files would be /dev/dsk/c41d6s1 and /dev/rdsk/c41d6s1.
To use a larger stripesize and provide a label for the array, use the command:
sdsadmin -m -L example -S 32k /dev/dsk/c41d6s0 \
/dev/dsk/c41d5s0 /dev/dsk/c41d4s0
The SDS array still has one large partition, but is labeled as example, and the data is striped using a stripesize of 32 Kbytes rather than the default stripesize of 16 Kbytes.
This last example shows configuring an SDS array with the -C description file option. Assume that four HP97560 disks are connected to two SCSI interfaces. Two are connected to the interface in EISA slot 1 (at addresses 6 and 5), and the other two are connected to the interface in EISA slot 2 (also at addresses 6 and 5). Using the example SDS description file from above (typed and saved in a file named example), to create an array use the command:
sdsadmin -m -C example /dev/dsk/c41d6s0 /dev/dsk/c41d5s0 \
/dev/dsk/c42d6s0 /dev/dsk/c42d5s0
Note that the disks have been specified in an order that does not create an optimal bus configuration. However, sdsadmin corrects this by reordering the devices so that they are properly interleaved among the available busses.
Device File Creation
As part of initializing the disks to be used as an SDS array, sdsadmin creates device files in /dev/dsk (block-special files) and /dev/rdsk (character special files) for each partition in the array. In the previous example, the device file /dev/dsk/c41d6s0 refers to the lead device of the array. Since the array has three partitions, sdsadmin creates the following device files:
/dev/dsk/c41d6s1 block special, partition 1
/dev/dsk/c41d6s2 block special, partition 2
/dev/dsk/c41d6s3 block special, partition 3
/dev/rdsk/c41d6s1 character special, partition 1
/dev/rdsk/c41d6s2 character special, partition 2
/dev/rdsk/c41d6s3 character special, partition 3
These device special files can now be used to access each partition of the SDS array as if each was a single device. To view these device special files at any time after creating the array, use sdsadmin -l on the lead device of the array.
NOTES
Since the maximum file-system block and fragment size that can be represented by disktab(4) is 16384 bytes, to create a file system with larger block and fragment sizes the desired sizes must be specified using the -b and -f options of the newfs command (see newfs(1M)).
A small amount of space is reserved at the beginning of each disk of an SDS array to store the SDS configuration information. For single-disk SDS arrays, the reserved amount is 16384 bytes. For SDS arrays of multiple disks, the reserved amount is about 0.1 percent of the capacity of a single disk in the SDS array.
WARNINGS
A hardware failure on a single disk in an SDS array results in loss of all data stored on all disks in the SDS array. As with any disk, regular backups of data stored on an SDS array is strongly recommended.
Use the -f option with extreme caution. Data loss results if you create an SDS array on a device that is already a member of another SDS array or if you create an SDS array on a device that contains an HP-UX file system.
Use the -d option with extreme caution. Removing the SDS configuration data from any device of an SDS array causes all data stored on that array to be lost.
Once an SDS array has been configured, it is not possible to change array configuration without losing the data that is stored on it. To reconfigure an array, the data from each partition must be backed up to another storage area, then restored after the SDS array has been reconfigured.
Partitions being used as swap space or as raw devices must not exceed 2 Gbytes (many applications cannot access devices larger than 2 Gbytes).
Partitions used as HP-UX file systems are limited to 4 Gbytes.
AUTHOR
sdsadmin was developed by HP.
FILES
/etc/disktab
/dev/dsk/*
/dev/rdsk/*
SEE ALSO
vi(1), diskinfo(1M), mknod(1M), newfs(1M), disktab(4).
Improving Performance with Software Disk Striping.
Hewlett-Packard Company — HP-UX Release 9.03: April 1994