sdsadmin(1M) — Series 700 Only
NAME
sdsadmin − create and administer Software Disk Striping arrays
SYNOPSIS
sdsadmin [-f] -m [-T type] [-L label] [-P partition_size] [-S stripesize] disk1 [disk2] ...
sdsadmin [-f] -m [-L label] -C description_file disk1 [disk2] ...
sdsadmin -i disk1 [disk2] ...
sdsadmin -c lead_device
sdsadmin [-l] device
sdsadmin [ -f ] -d device1 [device2] ...
sdsadmin -u device1 [device2] ...
DESCRIPTION
sdsadmin provides a means to:
• Make a Software Disk Striping (SDS) array,
• Import an existing array to a system with a different configuration,
• Perform miscellaneous utility functions on an existing array.
Software Disk Striping allows the use of disk arrays consisting of sets of 1 to 8 separate disks that appear to be one large disk. An array of disks can be divided into 1 to 8 partitions.
Using multiple disks in an SDS array can improve I/O performance because individual disks can process requests in parallel. SDS arrays also provide convenient management for disk partitions that may be larger than a single disk. Thus, very large filesystems (up to 4 Gbytes (gigabytes)) can be created. The degenerate case of an SDS array of one disk does not improve performance, but it does allow a single disk to have multiple partitions.
Each SDS array partition is striped symmetrically across the disks of the array. Striping means that instead of blocks 1 through n being on a single disk, they are distributed such that block 1 is on the first disk, block 2 is on the second disk, and so forth. The size of each block is referred to as the stripesize of the partition. Note that the stripe size of the partition is independent of the SCSI block size, which is equal to the block size of the individual disks in the array (typically 512 bytes).
The first disk of an SDS array is referred to as the lead device. The lead device is used as a handle to access partitions of an SDS array. See the EXAMPLES section below for information on how sdsadmin creates device special files to access partitions of an SDS array.
Command-Line Arguments
In the command SYNOPSIS above:
disk Block or character special device file associated with a particular physical disk.
lead_device Block or character special device file associated with the lead device of an SDS array (either the physical disk or any partition of the array).
device Block or character special device file associated with any device of an SDS array (either a physical disk or any partition of the array).
Additional information on SDS arrays is provided in the Improving Performance with Software Disk Striping manual. This guide discusses how to configure and administer SDS arrays.
Options
sdsadmin recognizes the following options:
-f Force an operation. This option is allowed only with the -m or -d options.
When creating an SDS array, it is usually considered an error if any of the disks specified already belong to an array (i.e., they already contain SDS array configuration data). The -f option overrides this check, allowing an array to be created on a disk that was previously a member of an array.
It is also an error to create an array if any of the disks specified contain an HP-UX file system. If the standard input device is a tty, sdsadmin asks for confirmation before creating an array on any disk containing an HP-UX filesystem. If standard input is not a tty, sdsadmin prints an error message and aborts without creating the array. The -f option overrides this check, allowing an SDS array to be created, even when one or more devices already contain an HP-UX filesystem.
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 containing an HP-UX filesystem.
When used with the -d option, the -f option prevents sdsadmin from asking for confirmation before destroying any SDS configuration data that is stored on the device.
-m Make a new SDS array on the specified disk(s). An array can consist of 1 to 8 disks. The first disk specified becomes the lead device of the new SDS array.
All devices are assumed to be disks of the same type (same model number, capacity, interface type, etc.). Performance degradation may result if disks of different types are used to create an array. Such configurations are not supported.
There are two ways to define a new SDS array. The easiest method is to define the SDS array using the command line. The type, label, partition size, and stripesize can be specified as arguments on the command line (see SDS Array Description Files below for a definition of each of these terms), but all of these arguments are optional. See the description of each parameter below for information describing default values.
The second method is to define the SDS array parameters in a description file which sdsadmin reads to determine how to create the SDS array. This method is more flexible than the first, allowing you to specify different sizes and stripe sizes for each partition of the SDS array. Description files are explained in the section SDS Array Description Files below.
sdsadmin verifies that all disks to be used in the new SDS array are the same size, and checks that the specified configuration parameters are valid. sdsadmin then writes data describing the new SDS array configuration to each disk of the array.
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. sdsadmin automatically interleaves the disks among the available busses to create an optimal bus configuration. See the description under the -i option for more information about optimal bus configurations.
As part of creating an SDS array, sdsadmin creates the necessary device files for each partition of the array. These are placed in the directories /dev/dsk (block special devices) and /dev/rdsk (character special devices). See EXAMPLES below for more information on the device files created for an SDS array. A message is printed to the standard output listing the device files that can be used to access each partition of the new SDS array.
In addition to creating device files for the new SDS array, sdsadmin adds a new disktab entry (see disktab(4)) for the SDS array to file /etc/disktab. 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 SDS 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 the section 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. 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 Check that the SDS array configuration information stored on the given disk is correct, and that all other disks in the array are present and accessible. 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 special device 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 filesystem, 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:
#
# This is an example SDS array description file. This array’s
# type is ’BIGx4-3’ to remind you that it has four large disks
# (HP 97560 which are 1.3G bytes each) and is 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 filesystem, choose a stripe size identical to the filesystem primary block size. Generally, the larger the filesystem block size, the better the performance. However, using a large filesystem 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 4096 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 devices) and /dev/rdsk (character special devices) 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 filesystem block and fragment size that can be represented by disktab(4) is 16384 bytes, to create a filesystem 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 filesystem.
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 8.07: November 1991