Manual Page Result
0
Command: sdrec | Section: 4 | Source: Digital UNIX | File: sdrec.4.gz
sdrec(4) Kernel Interfaces Manual sdrec(4)
NAME
sdrec - Structure defining a subdisk record
SYNOPSIS
#include <sys/types.h> #include <sys/vol.h>
#define NAME_LEN 14 #define COMMENT_LEN 40 #define SD_PATH_LEN
32 #define UTIL_NUM 3 #define UTIL_LEN 14 #define NAME_SZ
(NAME_LEN + 1) #define COMMENT_SZ (COMMENT_LEN + 1) #define
SD_PATH_SZ (SD_PATH_LEN + 1) #define UTIL_SZ (UTIL_LEN + 1)
struct volseqno { ulong_t seqno_lo, seqno_hi; }; typedef struct volse-
qno volseqno_t; typedef struct volseqno volrid_t;
struct sdrec {
struct sd_tmp sd_tmp; /* non-persistent fields */
struct sd_perm sd_perm; /* persistent fields */ };
Fields for the sd_perm structure:
char sd_name[NAME_SZ]; /* subdisk record name */
char sd_path[SD_PATH_SZ]; /* subdisk block device path
*/ char sd_pl_name[NAME_SZ]; /* associated plex name */
char sd_comment[COMMENT_SZ]; /* comment field */ char
sd_putil[UTIL_NUM][UTIL_SZ]; /* persistent util fields */ ulong_t
sd_pflag; /* persistent flags */ volseqno_t sd_up-
date_tid; /* trans id of last update */ voff_t
sd_dev_offset; /* offset within bdev */ voff_t
sd_pl_offset; /* offset of subdisk in plex */ voff_t
sd_dm_offset; /* offset relative to disk */ voff_t
sd_len; /* byte length of subdisk */ volrid_t
sd_rid; /* unique identifier */ volrid_t
sd_plex_rid; /* record ID of plex */ volrid_t
sd_dm_rid; /* disk media record ID */
Fields for the sd_tmp structure:
char sd_tutil[UTIL_NUM][UTIL_SZ]; /* non-persistent util
fields*/ dev_t sd_dev; /* block device of
subdisk */ long sd_lock; /* 1 if record is
locked */ ulong_t sd_tflag; /* non-persistent
flags */ char sd_da_name[NAME_SZ]; /* disk access name
*/ char sd_dm_name[NAME_SZ]; * /* disk media name */ char
sd_device_tag[NAME_SZ]; /* device tag */
DESCRIPTION
The sdrec structure is used internally by LSM. This structure used to
communicate subdisk record information between the volume configuration
daemon, vold, and programs using the Logical Storage Manager library to
query for configurations and to make configuration changes.
The two structures contained in the sdrec structure differentiate ele-
ments of the subdisk record that are persistent and that are non-per-
sistent. The division of fields between sd_tmp and sd_perm structures
is somewhat historical, however the sd_perm structure contains informa-
tion that is stored persistently (for example, fields that are recov-
ered unchanged after a system reboot), or is directly derivable from
persistent subdisk record information. The sd_tmp field, on the other
hand, contains fields that can be modified without the changes being
stored persistently.
The uses of the various subdisk fields are defined as follows: The sub-
disk name. This field cannot be changed directly, although it can be
changed by calling lsm_rename. This is a 64-bit record ID assigned to
the subdisk record, which is unique within the disk group for the dura-
tion of existence for the disk group. This does not change as a result
of a lsm_rename, even though the record name changes. The path to the
underlying block device. After creation (or if any of the disk identi-
fier fields is set for creation), this field is derived from the block
device path for the public region of the disk that the subdisk is de-
fined on. This field can be empty if the disk media record is cur-
rently in the REMOVED or NODAREC state. The name of the associated
plex. This field is empty if the subdisk is not associated. This is a
read-only field. A null-terminated comment string associated with the
record. The contents are arbitrary except that they cannot contain a
new line. An array of three null-terminated strings that can be used
as scratch pads by utilities. These fields are preserved across re-
boots. By convention, the first field is reserved for usage types; the
second field for higher-level applications, such as the Visual Adminis-
trator; and the third field for local site administrators. Flags asso-
ciated with the subdisk that are preserved across reboots. The persis-
tent flag that can be set is: The contents of the underlying block de-
vice may not be retained across a reboot. This flag can be set for de-
vices such as RAM disks that are cleared or left in indeterminate
states as a result of a power failure or a reboot. This flag is in the
pflag field for historical reasons. This field is now derived from the
VOLATILE flag from the underlying disk. The transaction ID of the last
update to this record. This field is assigned when changes to a disk
group are committed. The offset into the underlying disk device from
the start of the public region to the start of the subdisk. This is
set on creation of the subdisk and cannot be changed afterwards. This
value is in sectors. The offset into the underlying disk device from
the start of the partition containing the public region to the start of
the subdisk. This can differ from the value in sd_dm_offset if the
public region does not start at the beginning of its partition. The
association offset of the subdisk within its associated plex. This is
a read-only field that is set automatically when a subdisk is associ-
ated. This value is in sectors. The length of the subdisk. The sub-
disk length cannot be changed while the subdisk is associated. This
value is in sectors. The record ID of the associated plex, or zero if
the subdisk is not associated with a plex. The record ID of the disk
media record that the disk is defined on. An array of three null-ter-
minated strings that can be used as scratch pads by utilities. These
fields are cleared on reboot. By convention, the first field is re-
served for usage types; the second field for higher-level applications,
such as the Visual Administrator; and the third field for local site
administrators. The device node for the block device on which the sub-
disk resides. This is the value that would be returned in the st_rdev
field from a stat() of the block device containing the subdisk. This
is set to NODEV if the disk media record is in the REMOVED or NODAREC
state. This is a read-only field. A boolean value that is 1 if the
subdisk is locked in the caller's current transaction, and 0 otherwise.
This is a read-only field. A bitmask of flags that is cleared after a
reboot. Flags defined in this field are: The subdisk is associated
with a plex or volume whose corresponding device node has been opened
or mounted. This flag is maintained by the kernel. This flag is set
by the kernel or by vold to indicate that the subdisk is associated
with a plex as a log subdisk. This is a read-only flag. The disk ac-
cess record name used to access the physical disk media underlying the
subdisk. This is empty if the disk media record is in the REMOVED or
NODAREC state. The name of the underlying disk media record. The
da_device_tag field from the underlying disk access record, or empty of
the disk media record is in the REMOVED or NODAREC state.
RELATED INFORMATION
volintro(8), volmake(4), plexrec(4), sdrec(4). delim off
sdrec(4)