Home / Syntax / vxdisksetup syntax with Example

vxdisksetup syntax with Example

VXDISKSETUP -UnixArena’s Manual Page

/opt/VRTS/bin/vxdisksetup – Configure a disk for use with VERITAS Volume Manager

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 autoconfigured disks, which can have one of the following formats:

1. 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.
  •  For disks less than 1 TB slice 7 holds private & public region. For the disk in more size slice 2 will be holding private & public region.

2. none

  • The disk is un-formatted. This value may be displayed, but it cannot be set as a valid format.

3. simple

  • Slice 3 is created to hold the private and public regions with all other slices (apart from slice 2) zeroed out.

4. 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 private region is used by VxVM to store configuration information, and is followed by a public region from which sub disks can be allocated. Default private region length is 32 MB.
Options Usage
-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
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.

 

Disks are currently in VxVM’s view:

  	DEVICE       TYPE            DISK         GROUP        STATUS
	c1t0d0s2     auto:sliced     rootdisk01   rootdg       online
	c2t0d0s2     auto:sliced     rootdisk02   rootdg       online
	c3t1d0s2     auto:none       -            -            online invalid
	c3t2d0s2     auto:none       -            -            online invalid
	c3t3d0s2     auto:none       -            -            online invalid
	c4t9d0s2     auto:none       -            -            online invalid
	c4t10d0s2    auto:none       -            -            online invalid

Initializing disk in CDS Format

  # vxdisksetup -i c3t1d0

Let’s check the status of the disk,

	DEVICE       TYPE            DISK         GROUP        STATUS
	c3t1d0s2     auto:cdsdisk    -            -            online

	Device:    c3t1d0s2
	devicetag: c3t1d0
	type:      auto
	hostid:    
	disk:      name= id=1411570178.128.vxserver
	group:     name= id=
	info:      format=cdsdisk,privoffset=256,pubslice=2,privslice=2
	flags:     online ready private autoconfig autoimport
	pubpaths:  block=/dev/vx/dmp/c3t1d0s2 char=/dev/vx/rdmp/c3t1d0s2
	guid:      {01ff865e-43fa-11e4-a991-000c29656c89}
	udid:      VMware%2C%5FVMware%20Virtual%20S%5FDISKS%5F6000C299459294E7CD53E0D3DEECC10C
	site:      -
	version:   3.1
	iosize:    min=512 (bytes) max=2048 (blocks)
	public:    slice=2 offset=65792 len=2031232 disk_offset=0
	private:   slice=2 offset=256 len=65536 disk_offset=0
	update:    time=1411570178 seqno=0.2
	ssb:       actual_seqno=0.0
	headers:   0 240
	configs:   count=1 len=48144
	logs:      count=1 len=7296
	Defined regions:
	 config   priv 000048-000239[000192]: copy=01 offset=000000 disabled
	 config   priv 000256-048207[047952]: copy=01 offset=000192 disabled
	 log      priv 048208-055503[007296]: copy=01 offset=000000 disabled
	 lockrgn  priv 055504-055647[000144]: part=00 offset=000000
	Multipathing information:
	numpaths:   1
	c3t1d0s2        state=enabled

As per the above output note this following,
1. The disk layout type is changed from ‘auto:none’ to ‘auto:cdsdisk’
2. The disk ID is ‘id=1411570178.128.vxserver’
3. pubpaths: block=/dev/vx/dmp/c3t1d0s2 char=/dev/vx/rdmp/c3t1d0s2
4. Multipathing information: numpaths: 1
5. public: slice=2 offset=65792 len=2031232 disk_offset=0
6. private: slice=2 offset=256 len=65536 disk_offset=0
7. iosize: min=512 (bytes) max=2048 (blocks)

Initializing disk in SLICED format:

  # vxdisksetup -e -i c3t2d0 format=sliced

	DEVICE       TYPE            DISK         GROUP        STATUS
	c3t2d0s2     auto:sliced     -            -            online

 	Device:    c3t2d0s2
	devicetag: c3t2d0
	type:      auto
	hostid:    
	disk:      name= id=1411570626.129.vxserver
	group:     name= id=
	info:      format=sliced,privoffset=4,pubslice=4,privslice=3
	flags:     online ready private autoconfig autoimport
	pubpaths:  block=/dev/vx/dmp/c3t2d0s4 char=/dev/vx/rdmp/c3t2d0s4
	privpaths: block=/dev/vx/dmp/c3t2d0s3 char=/dev/vx/rdmp/c3t2d0s3
	guid:      -
	udid:      VMware%2C%5FVMware%20Virtual%20S%5FDISKS%5F6000C29D279EE0D6FE6F3C73FECCE2EA
	site:      -
	version:   2.1
	iosize:    min=512 (bytes) max=2048 (blocks)
	public:    slice=4 offset=0 len=2030884 disk_offset=288
	private:   slice=3 offset=4 len=65596 disk_offset=2031168
	update:    time=1411570626 seqno=0.2
	ssb:       actual_seqno=0.0
	headers:   0 248
	configs:   count=1 len=48390
	logs:      count=1 len=7331
	Defined regions:
	 config   priv 000017-000247[000231]: copy=01 offset=000000 disabled
	 config   priv 000249-048407[048159]: copy=01 offset=000231 disabled
	 log      priv 048408-055738[007331]: copy=01 offset=000000 disabled
	Multipathing information:
	numpaths:   1
	c3t2d0s2        state=enabled

As per the output note the following,
1. The disk layout type is changed from ‘auto:none’ to ‘auto:sliced’
2. info: format=sliced,privoffset=4,pubslice=4,privslice=3
3. public: slice=4 offset=0 len=2030884 disk_offset=288
4. private: slice=3 offset=4 len=65596 disk_offset=2031168
(Note here the private region allocated in the end)

Initializing disk in Simple format

  # vxdisksetup -i c3t3d0 format=simple

	DEVICE       TYPE            DISK         GROUP        STATUS
	c3t3d0s2     auto:simple     -            -            online

	Device:    c3t3d0s2
	devicetag: c3t3d0
	type:      auto
	hostid:    
	disk:      name= id=1411571336.142.vxserver
	group:     name= id=
	info:      format=simple,privoffset=4,pubslice=3,privslice=3
	flags:     online ready private autoconfig autoimport
	pubpaths:  block=/dev/vx/dmp/c3t3d0s3 char=/dev/vx/rdmp/c3t3d0s3
	guid:      -
	udid:      VMware%2C%5FVMware%20Virtual%20S%5FDISKS%5F6000C299B163F835356BC1A96FBC0D17
	site:      -
	version:   2.1
	iosize:    min=512 (bytes) max=2048 (blocks)
	public:    slice=3 offset=65796 len=2030940 disk_offset=288
	private:   slice=3 offset=4 len=65536 disk_offset=288
	update:    time=1411571337 seqno=0.2
	ssb:       actual_seqno=0.0
	headers:   0 248
	configs:   count=1 len=48346
	logs:      count=1 len=7325
	Defined regions:
	 config   priv 000017-000247[000231]: copy=01 offset=000000 disabled
	 config   priv 000249-048363[048115]: copy=01 offset=000231 disabled
	 log      priv 048364-055688[007325]: copy=01 offset=000000 disabled
	Multipathing information:
	numpaths:   1

Forcefully formatting the disk which is part of deported disk group

  # vxdisksetup -i c4t9d0 format=sliced
	VxVM vxdisksetup ERROR V-5-2-1813 c4t9d0: Disk is part of testdg disk group, use -f option to force setup.

	DEVICE       TYPE            DISK         GROUP        STATUS
	c4t9d0s2     auto:cdsdisk    -            (testdg)     online
 
  # vxdisksetup -f -i c4t9d0 format=sliced

	DEVICE       TYPE            DISK         GROUP        STATUS
  	c4t9d0s2     auto:sliced     -            -            online
VMTURBO-CLOUD-CAPACITY

Leave a Reply

Your email address will not be published. Required fields are marked *