just do it
分类: 系统运维
2013-10-22 09:54:23
vxdisksetup - configure a disk for use with Veritas Volume Manager
/etc/vx/bin/vxdisksetup [-iefr] disk_address [attribute...]/etc/vx/bin/vxdisksetup [-ifr] disk_address format=cdsdisk [attribute...]
/etc/vx/bin/vxdisksetup [-ifr] disk_address format=simple [attribute...]
/etc/vx/bin/vxdisksetup [-iefr] disk_address format=sliced [attribute...]
The vxdisksetup command configures the disk for use by Veritas Volume Manager (VxVM). vxdisksetup is called by the vxdiskadd command as part of initial disk configuration. It is not typically necessary to call this command directly.Note: In release 4.0 of VxVM, the behavior of the vxdisksetup command has been changed so that it only creates auto-configured disks (with a disk access type of auto; see vxdisk(1M)), which can have one of the following formats:
cdsdisk The disk is formatted as a CDS disk that is suitable for moving between different operating systems. This is the default format (provided that the -i option is used to write the disk header). It is not suitable for boot disks. On disks smaller than one terabyte (Tb), slice 7 is created to hold the private and public regions with all other slices (apart from slice 2) zeroed out. On disks equal to or greater than one terabyte (Tb), slice 2 is created to hold the private and public regions with all other slices zeroed out. The private region is used by VxVM to store configuration information, and is followed by a public region from which subdisks can be allocated. Note: As the CDS format is applied to the entire disk and is unsuitable for boot disks, options and attributes that relate to partitions, slices or booting are not applicable. none The disk is unformatted. Note: This value may be displayed, but it cannot be set as a valid format. simple Slice 3 is created to hold the private and public regions with all other slices (apart from slice 2) zeroed out. The private region is used by VxVM to store configuration information, and is followed by a public region from which subdisks can be allocated. sliced Slices 3 and 4 are created to hold separate private and public region partitions with all other slices (apart from slice 2) zeroed out. This format can be applied to disks that can be used to boot the system. If the disk is not initialized as a boot disk, space is reserved on the disk to allow it to be converted to cdsdisk format if required. The disk_address argument passed to vxdisksetup directs the command to the device that corresponds to the disk being operated upon. The address should be provided in the form c#t#d#, which define a controller number (c#), a SCSI target ID (t#), and a SCSI logical unit number (d#). Each number is specified in decimal and can be multiple digits. If the disks are named using the enclosure based naming scheme, the address usually takes the form enclosurename_diskno. The name must reference a valid disk with partition devices under the /dev/vx/rdmp directory.
The /etc/default/vxdisk file can be used to set the default values of the format and privlen attributes for the vxdisk and vxdisksetupcommands. Values in this file override inbuilt values, and may themselves be overridden by values specified on the command line. For details, see the vxdisk(1M) manual page.
-e Allocates the private region at the end of the disk. Note: This option is not supported for cdsdisk and simple format disks. -f Forces a disk to be initialized even if it is a member of a deported disk group. -i Writes a disk header to the disk, initializes the private region of the disk and makes the disk directly usable (as a new disk in a disk group, for example). Note: A disk that is a member of an imported disk group cannot be initialized. The command also fails if the disk is a member of a deported disk group. The -f option can be used to override the latter restriction. -r Must be specified with the -f option to remove the UFS file system signature from a disk.
You can specify attributes to affect the layout strategy used by vxdisksetup.CAUTION: Take great care when using these attributes as they can render a disk unusable by VxVM.
config Sets up kernel logs or configuration databases on the disk. This attribute has the opposite effect to the noconfig attribute. This is the default behavior if the -i option is specified. Otherwise, the attribute is ignored. All lengths and offsets are rounded up to cylinder boundaries due to restrictions on the layout of partitions. noconfig Prevents setting up kernel logs or configuration databases on the disk. The size of the default private region is set to 160 blocks, which is the minimum allowed private region size. noconfig is ignored unless the -i option is specified. noreserve Do not reserve space for conversion to other formats such as cdsdisk. privlen=length Specifies the length of the private region of the disk. The default size of this area is 32MB. The maximum possible size of the private region is 524288 blocks. If the -i option is not specified for a sliced format disk, an additional 256 blocks are also reserved. If the -i option is specified, the value of privlen is set to the size of slice 3 minus 256 blocks and minus the value of the private region offset. The reserved space allows for later conversion to the cdsdisk format. For cdsdisk format disks, privlen is silently rounded up to the nearest multiple of 8KB if it is not already a multiple of 8KB. privslice=number Specify the partition number for the private region. privoffset=[-]offset Indicates the sector offset of the private region on the disk. The default offset for the private area is at the beginning of the disk. A negative offset relocates the private region at an offset relative to the end of the disk. An additional 256 blocks of disk space (rounded up to the nearest cylinder boundary) are reserved at the beginning of slice 3 unless this is overridden by the value of privoffset. The reserved space allows for later conversion to the cdsdisk format. For the simple format, the specified value of privoffset is also rounded up to the nearest cylinder boundary. For cdsdisk format disks, privoffset is silently rounded up to the nearest multiple of 8KB that is larger than or equal to 128KB if it is not already a multiple of 8KB or if its value is less than 128KB. publen=length Specifies the length of the public region of the disk. This defaults to the size of the disk minus the private area on the disk. For cdsdisk format disks, publen is silently rounded up to the nearest multiple of 8KB if it is not already a multiple of 8KB. puboffset=offset Sets the offset on the disk where the public region starts. By default, this is past the end of the private region. For the sliced format, 256 blocks of disk space (rounded up to the nearest cylinder boundary) are reserved at the beginning of slice 4 unless this is overridden by the value of puboffset. The reserved space allows for later conversion to the cdsdisk format. For the simple format, 256 blocks of disk space are reserved at the end of the private region unless this is overridden by the value of puboffset. The reserved space allows for later conversion to the cdsdisk format. For cdsdisk format disks, puboffset is silently rounded up to the nearest multiple of 8KB if it is not already a multiple of 8KB. pubslice=number Specify the partition number for the public region.
To initialize a disk for regular use, enter:/etc/vx/bin/vxdisksetup -i c2t1d0
or if enclosure-based naming is in use:
/etc/vx/bin/vxdisksetup -i sena1_4
To initialize a disk for normal use, but set the private region size to 1MB instead of the default size of 32MB, enter:
/etc/vx/bin/vxdisksetup -i c2t1d0 privlen=1m
The default private region size increased from 512KB to 1MB in release 3.2, and from 1MB to 32MB in release 5.0.
/etc/default/vxdisk Defaults file used by the vxdisk and vxdisksetup utilities.
vxcdsconvert(1M), vxdisk(1M), vxdiskadd(1M), vxdiskunsetup(1M), vxintro(1M)
VxVM 5.0 | vxdisksetup (1M) |