You are on page 1of 57

Host ID

/etc/vx/volboot file contains the host ID that was on the system when we installed VxVM.

To Change the hostname in the volboot file use the command

#vxdctl hosted newhostname

Default Boot Disk Group

To display what is defined as the default boot disk group

#vxdg bootdg

Display what is defined as the default disk group

#vxdg defaultdg

Set default disk group after VxVM installation.

#vxdctl default diskgroup_name

View Attributes of a disk group

#vxassist –g disk_group_name help showattributes

View basic information about all disks

#vxdisk –o alldgs list

Rescan for disk group changes

#vxdctl enable

Page 1 of 57
Display summary of all disks

#vxdisk –s list

Detailed information for disks

#vxdisk –g disk-group_name list disk_media_name

Example

#vxdisk –g datadg list datadg01

Display free space in a disk group

#vxassist –g disk_group_name help space

#vxdg –g disk_group_name free

Page 2 of 57
Disk Configuration Stages

1. Disk drive is initialized


2. Disk is placed in disk group
3. Create volume from disk

Example

1. Disk drive is initialized


#vxdisksetup –i c0t0d0
2. Initialize disk group by adding at least one disk.
#vxdg init diskgroup_name disk_media_name=disk_access_name
Example
#vxdg init newdg newdg01=c0t0d0
Another example to add another disk in an existing group.
#vxdg –g diskgroup_name adddisk disk_media_name=disk_access_name
Example
#vxdg –g newdg adddisk newdg02=c0t0d1
3. Create a Volume
#vxassist –g diskgroup_name make volume_name
Example
#vxassist –g datadg make datavol 10g

Page 3 of 57
To create volume of specific size on specific disks

Example

#vxassist –g datadg make datavol 10g datadg01 datadg02

To create stripped volume on specific disks

#vxassist –g datadg make datavol 10g layout=stripe ncol=3 stripeunit=25k datadg01 datadg02 datadg03

Evacuate Data from one disk to another

#vxevac –g disk_group_name from_disk to_disk

Example

#vxevac –d datadg datadgg02 datadg03

Evacuate Data from one disk to another disk except a particular disk.

#vxevac –g disk_group_name from_disk !not_on_disk

Example

#vxevac –d datadg datadgg02 !datadg03

Page 4 of 57
Remove a Disk from VxVM Control and Uninitialize it

Step 1

#vxdg –g disk_group_name rmdisk disk_media_name

Example

#vxdg –g datadg rmdisk datadg02

Step 2

#vxdiskunsetup device_tag

Example

#vxdiskunsetup c0t0d0

Rename a Disk

#vxedit -g disk_group_name old_disk_name new_disk_name

Example

#vxedit –g datadg datdg02 datadg01

Page 5 of 57
How to remove a disk from VxVM

#vxdisk rm disk_access_name

How to remove a disk from VxVM control

#/usr/lib/vxvm/bin/vxdiskunsetup disk_access_name

Example

#/usr/lib/vxvm/bin/vxdiskunsetup ct1t1d2

How to move volumes from a disk

Example

If you want to remove volumes from a disk mydg02 and move it on to any other disk, use the command.

#vxassist move volume_name \!mydg02

Page 6 of 57
Deport a Disk Group

#vxdg deport disk_group_name

Example

#vxdg deport datadg

Deport a Disk Group and Rename It

#vxdg –n new_disk_group_name deport old_disk_group_name

Example

#vxdg –n datadg deport olddg

Deport a Disk Group and Rename New Host Owner

#vxdg –h new_host_name deport disk_group_name

Example

#vxdg –h newhost deport datadg

(Note unmount a Diskgroup before Deporting it)

Import a Disk Group

#vxdg import disk_group_name

Example

vxdg import datadg

Page 7 of 57
Import a Disk Group and Rename

#vxdg –n new_disk_group_name import old_disk_group_name

Example

#vxdg –n newdg import olddg

Destroying a Disk Group

#vxdg destroy disk_group_name

Example

#vxdg destroy olddg

(Note:Destroying a diskgroup places all its disks in a free disk pool in an uninitialized state)

Displaying a Volume Information

#vxprint –g disk_group_name –ht | more

Example

#vxprint –g datadg –ht | more

Create Simple Concactenated Mirrored Volume (Non-Layered)

#vxassist –g disk_group_name make volume_name layout=mirror-concat

Example

#vxassist –g datadg make datavol 10g layout=mirror-concat

Page 8 of 57
Create Simple Stripped Mirrored Volume (Non-Layered)

Example

#vxassist –g datadg make datavol 10g layout=mirror-stripe

Creating a Mirrored Volume

#vxassist -g disk_group_name make volume_name size layout=mirror

Example

#vxassist –g datadg make datvol 10g layout=mirror

Another Example

vxassist –g datadg –b make datavol 10g layout=mirror

Starting Volumes in a DiskGroup After Importing

#vxvol -g disk_group_name startall

Example

#vxvol –g datadg startvol

Determine largest possible Size of a volume

#vxassist –g diskgroup maxsize attributes

Example

#vxassist –g datadg maxsize layout=raid5

Page 9 of 57
Determine how much a volume can expand

#vxassist –g disk_group_name maxgrow volume_name

Example

#vxassist –g datadg maxgrow datavol

Page 10 of 57
How to Remove a Volume

1. Unmount the File System


2. Edit /etc/vfstab or /etc/fstab file to remove entry
3. #vxassit –g disk_group_name remove volume volume_name
Example
#vxassist –g datadg remove volume datavol

Page 11 of 57
How to Mirror a Volume

#vxassist –g disk_group_name mirror volume_name [layout=layout_type] [disk_name]

Example

#vxassist –g datadg mirror datavol datadg02

Where datadg02 is the disk_media_name on which mirror is being created.

How To Remove a Mirror From a Volume

Example

In this example remove the plex that contains the subdisk, that is part of a disk. State the disk name with an
exclamation point before disk name.

#vxassist –g datadg remove mirror datavol !datadg02

Another Example

This method uses the plex to be removed

#vxplex –g disk_group_name –o rm dis plex_name

Volume Read Policies

How to Add DRL (Dirty Region Log)

#vxassist –g disk_group_name addlog volume_name [logtype=drl]

Example

#vxassist –g datadg addlog datavol logtype=drl

Page 12 of 57
How to Add DRL (Dirty Region Log) in RAID 5 Volume

#vxassist –g disk_group_name addlog volume_name

Example

#vxassist –g acctdg addlog datavol

(Note in RAID 5 we do not need to mention log type)

Volume Read Policies

1. Round Robin
2. Preferred
3. Selected (default)

Example

To select the read policy to round robin.

#vxassist –g datadg rdpol round datavol

To select the read policy to be preferred

#vxassist –g volume_group_name rdpol prefer volume_name plex_name

#vxassist –g datadg rdpol prefer datavol datavol-02

To select the read policy to “Selected”

#vxassist –g group_name rdpol select volume_name

#vxassist –g datadg rdpol select datavol

Page 13 of 57
How to create volume on a particular disk

#vxassist –g disk_group_name make volume_name size media_name

Example

#vxassist –g mydg make vol23 20m mydg03

How to Rename a Disk

#vxedit –g diskgroup rename old_disk_name new_disk_name

How to rename a disk so that it is not used for allocating space unless specifically stated on command
line?

#vxedit –g diskgroup_name set reserve=on disk_name

How to turn off reservation on a disk?

#vxedit -g diskgroup_name set reserve=off disk_name

How to display free space for a disk group

#vxdg –g diskgroup_name free

Example

#vxdg –g mydg free

Page 14 of 57
How to Create a new mirrored volume using selected disks

In the below example we have to create a new volume (mirrored) using selected disks.

1. First, initialize the disk


#vxdiskset –i disk_access_name

Example

#vxdisksetup –i c0t1d0

#vxdisksetup –i c0t2d0

2. Initialize the disk group by adding disks.

#vxdg init disk_group_name media_name=media_access_name

Example

#vxdg init datadg datadg01=c0t1d0

Example

#vxdg –g datadg adddisk datadg02=c0t2d0

3. Create a Mirrored Volume Using these 2 Disks.

#vxassist –g disk_group_name make volume_name layout=mirror media_name media_name

Page 15 of 57
Example

#vxassist –g datadg make datavol layout=mirror datadg01 datadg02

3a. Create a Mirrored Volume Using these 2 Disks with ordered allocation.

#vxassist –g disk_group_name –o ordered make volume_name size layout=mirror media_name


media_name

Example

#vxassist –g datadg –o ordered make datavol 2g layout=mirror datadg01 datadg02

Page 16 of 57
Resizing Volumes using vxresize command and vxassist command

Examples

Define new volume size

#vxresize –g datadg datavol 50m

Add space to a volume

#vxresize –g datadg datavol +10m

Reduce certain space from a volume

#vxresize –g datadg datavol -10m

Specify new volume size increased

#vxassist –g datadg growto datavol 40m

Increase Volume Space by Certain Amount

#vxassist –g datadg growby datavol 10m

Reduce Volume Space by certain Amount

#vxassist –g datadg shrinkby datavol 10m

Specify new volume size reduced

#vxassist –g datatdg shrinkto datavol 30m

Page 17 of 57
Determine how much free space is in a disk group

#vxdg –g group_name free

Example

#vxdg –g datadg free

Determine how much free space is in a volume

Example

#vxassist –g datadg maxgrow datavol

How to display extended device attributes?

#vxdisk –p list

and

#vxdisk -x attribute –p list

and

#vxdisk –x DDL_DEVICE_ATTR –p list

and

#vxdisk –e list

Page 18 of 57
How to resize a VxFS file System

1. First, determine the amount of free space available in a disk group.

Example

#vxdg –g datadg free

2. Second, increase the size of the volume.

Example

#vxassist –g datadg growto datavol 1024000

3. Next expand the file system (VxFS)

Example

#fsadm –b 1024000 –r /dev/vx/rdsk/datadg/datavol/datavol /datavol

4. Lastly, verify new expanded size.

#df –k /datavol

(Note: File system is mounted during expansion)

Page 19 of 57
How to Display File system Type

Example

#fstype –v /dev/vx/dsk/datadg/datavol

In Solaris Environment How to Create VxFS File System

Example

#mkfs –F vxfs /dev/vx/rdsk/datadg/datavol

#mkdir /data

Mount the File System

#mount –F vxfs /dev/vx/dsk/datadg/datavol /datavol

In Solaris Environment How to Create UFS File System

Example

#newfs /dev/vx/rdsk/datadg/datavol

Create mount point

#mkdir /data

Mount File System

#mount /dev/vx/dsk/datadg/datavol /datavol

Page 20 of 57
In Linux Environment How to Create VxFS File System

#mkfs –t vxfs /dev/vx/rdsk/datadg/datavol

Create a Mount Point

#mkdir /data

Mount the File System

#mount –t vxfs /dev/vx/dsk/datadg/datavol /data

Page 21 of 57
How to find what is the server’s default file system

For Solaris and linux it is listed in /etc/default/fs

In Solaris what fle systems cannot use VxFS

1. /
2. /usr/
3. /var
4. /opt

In Solaris what is the location of VxFs Commands

/opt/VRTSvxfs/bin

/usr/lib/fs/vxfs

/etc/fs/vxfs

Page 22 of 57
In LINUX what file systems cannot use VxFS

1. /
2. /boot
3. /etc
4. /lib
5. /var
6. /usr

In LINUX what is the location of VxFS Commands

1. /sbin
2. /usr/lib/fs/vxfs

How to display file system layout versions

#vxupgrade /mnt

How to upgrade file system version

Example

To upgrade file system layout version from 4 to 6

#vxupgarde –n 5 /mnt

#vxupgrade –n 6 /mnt

Veritas File System Fragmentation Types

1. Directory Fragmentation
2. Extent Fragmentation (File Fragmentation)

Page 23 of 57
To monitor directory fragmentation

Example

#fsadm –D /mnt1

To monitor extent fragmentation

Example

#fsadm –E /home

How to defragment Directory

#fsadm –d –D /mnt1

How to defragment Extent

#fsadm –e –E –s /mnt1

How to Run fsck Command with and without intent Log

Example

To perform a full file system check without intent log

#fsck [fs-type] –o full,nolog /dev/vx/rdsk/datadg/datavol

Example

To perform file system check with intent log

#fsck [fs-type] /dev/vx/rdsk/datadg/datavol

Page 24 of 57
Perform Parallel file system check with intent log on 2 file systems in parallel

#fsck [fs-type] –o –p /dev/vx/rdsk/c1t2d0s4 /dev/vx/rdsk/c1t0d0s5

How to Create a Snapshot volume

Example

First start creating “snapshot” of the original volume.

#vxassist 0g datadg –b snapshot datavol

Next create the snapshot volume

#vxassist –g datadg snapshot datavol snapvol

How to refersh data from original volume to snapshot volume.

#vxassist –g datadg snapback snapvol

How to refresh data from snapshot volume to original volume

Example

#vxassist –g datadg –o resyncfromreplica snapback snapvol

How to Create Completely Independent volume from Snapshot.

Example

#vxassist –g datadg snapclear snapvol

How to permanently destroy a snapshot volume

#vxassist –g datadg remove volume snapvol

Page 25 of 57
How to Create a File System Snapshot

#mount –F vxfs –o snapof=/original_file_system, snapsize=size destination destination_mount_point

Example

#mount –F vxfs –o snapof=/fs01,snapsize=32768 /dev/vx/dsk/datadg/snapvol /snapvol

How to Remove a File System Snapshot

Example

#umount /snapmount

How to Configure a spare Disk

To mark a disk as spare

1. Initialize the disk

#vxdisksetup –i c1t0d1

2. Assign the disk to a disk group and give it a disk media name.

#vxdg –g datadg adddisk datadg=c1t0d1

3. Mark the disk as spare

#vxedit -g datadg set spare=on|off datadg01

Page 26 of 57
How to Prevent a disk’s space from being used for hot relocation

Example

If we donot want space for subdisks to be used from disk datadg02 in that group.

#vxedit –g datadg set nohotuse=on|off datadg02

How to use a disk as a replacement disk if it already is in a disk group?

To use a disk as a replacement disk for disk that has failed the replacement disk should be in a free disk pool but
CANNOT belong to a disk group.

Example

#vxdg –g datadg rmdisk datadg01

(Now the disk is initialized, but does notbelong to a disk group)

Steps to replace a failed Disk

1. Physically replace the bad disk.


2. New disk should be recognized by the Operating System.
Example
#devfsadm –c C disk
3. Have Veritas recognize existence of the new drie.
#vxdctl enable
#vxdisk list
4. Initialize the new disk
#vxdisksetup –i c1t1d0
5. Add the disk
#vxdg –k –g datadg adddisk datadg01=c1t1d0
(Where „k‟ forces c1t1d0 to take datadg01 as its disk media name, datadg01 is the name of the failed disk)

Page 27 of 57
How to unrelocate a Disk.

#unrelocate -f –g [diskgroup] –t task_tag –n disk_name orig_disk_name

Example

#unrelocate -f –g datadg –n newdatadg01 orig_datadg01

How To Recover a Volume

When veritas loses contact (e.g if a fibre cable is removed between a server and a storage array) with an active
device, verits will place the device in a failed state. When situations like this arise, vxreattach utility can be used to
reconnect veritas to lost devices.

#vxreattach –c <-This would see if relocation is possible. If it is possible the proceed to next step)

#vxreattach –r datadg01

To bring the volume back on line

#vxrecover –b –g diskgroup_name volume_name

Example

#vxrecover –b –g datadg datavol

What disks have configuration database

To find out which disks in a disk group have configuration database use the command.

#vxdg list diskgroup_name

Page 28 of 57
How many disk types are there?

1. auto
2. cds (suitable for moving from one host to another)
3. sliced (For boot disks, not suitable for moving)
4. none

How to convert a non-cds disk type to cds disk type.

#vxcdsconvert

How to control vxconfigd

#vxdctl enable

#vxdctl mode

#vxdctl disable

#vxdctl stop

#vxconfigd

#vxdctl support

How does Volume Manager establishes ownership of physical disks?

The Host ID that is used by VxVM to establish ownership of physical disks is listed in /etc/vx/volboot.

How to display contents of /etc/vx/volboot

#vxdctl list

How to change host ID in volboot file?

#vxdctl hostid new_host_id

Page 29 of 57
How to Scan Operating System device tree after adding or removing LUNS (Solaris)?

1. Enter the following command


#cfgadm –c configure c2
(Where c2 is the controller 1D2)
2. Enter the following command
#devfsadm –Cv

Page 30 of 57
How to make VxVM aware of the new size of a LUN that has been resized?

#vxdisk -f –g disk_group_name {access_name|media_name} [length=value]

How to list attributes of all HBA controllers on the system?

#vxdmpadm listctlr all

How to display TPD (Third Part Driver) which is monitored by DMP?

#vxdmpadm getsubpaths tpdnodename=third_party_node_name

Example

#vxdmpadm getsubpaths tpdnodename=emcpower10s2

and

#vxdmpadm getsubpaths tpdnodename=c7t0d10s2

Page 31 of 57
How to Scan for newly added devices previously unknown to VxVM?

#vxdisk scandisks fabric

How to scan for specific devices?

Example

#vxdisk scandisks device=c1t1d0.c1t2d0

How to list all controllers on a system?

#vxdmpadm listctlr all

How to check paths connected to a controller?

#vxdmpadm getsubpaths ctlr=controller_name

Example

#vxdmpadm getsubpaths ctlr=fscsi2

How to check paths connected to a LUN?

#vxdmpadm getsubpaths dmpnodename=device_access_name

Example

#vxdmpadm getsubpaths nodename=c3t2d1

How to disable I/O to a controller to perform maintenance

To disable I/O to a particular controller

#vxdmpadm disable ctlr=controller_name

Page 32 of 57
How to enable I/O to a controller

#vxdmpadm enable ctlr=controller_name

How to gather and display I/O statistics for paths

1.Enable the gathering of statistics.

#vxdmpadm iostat start [memory=size]

2.Reset, the I/O counters to zero

#vxdmpadm iostat reset

3.Display the accumulated statistics for all paths.

#vxdmpadm iostat show all

Page 33 of 57
Disk Errors

If the volume manager can access the provate region on the disk it marks the disk as FAILING. The plex with the
effected subdisks is set with the IOFAIL condition.

If the volume manger cannot access provate region on the disk it marks the disk as FAILED. The plex with the
effected subdisk is set with the NODEVICE state.

Page 34 of 57
How to replace a failed Drive.

1. First, physically replace the filaed drive.


2. Recognize the replacement drive at the OS level
#devfsadm –c C disk
3. Recognize the replacement drive at the Volume Manager level.
#vxdctl enable
#vxdisk list
4. Initialize the replacement drive.
#vxdisksetup –i c3t2d1
5. Add the replacement drive in the disk group and force it to have disk media name same as the failed drive.
#vxdg –k –g datadg adddisk datadg02=c3t2d1
6. Recover the redundant volume (i.e if it is a mirrored volume with a failed plex)
#vxplex –g diskgroup att volume_name plex_name
Exmaple
#vxplex –g datadg att vol01 vol01-02
Or
Use vxrecover command
#vxrecover –g datadg –s datavol
7. Start any non redundant volume (Only Non-redundent volume)
#vxvol -g datadg –f start vol02
8. Check data for consistency
#fsck /dev/vx/rdsk/diskgroup_name/volume_name
Example
#fsck /dev/vx/rdsk/datadg/vol02

Page 35 of 57
How to deal with intermittent disk failures

If the volume is redundant:-

Prevent read I/O from accessing the failing disk by changing the volume read policy. For example to prefer to read
from plex vol01 -01instead of plex vol01-02

#vxvol –g datadg rdpol prefer vol01 vol01-02

Remove the disk. To forcibly remove the disk without relocating data

#vxdg –k –g diskgroup_name rmdisk disk_media_name

Example

#vxdg –k –g datadg rmdisk datadg02

Replace the disk

Set the volume read policy back to the original policy.

How to display plexes associated to a volume, and its state?

#vxinfo –p –g disk_group volume_name

Example

#vxinfo –p –g rootdg oraunix

To get more detailed information

#vxprint –g disk_group_name –ht volume_name

Example

#vxprint –g rootdg –ht oraunix

Page 36 of 57
How to change one plex of the volume to CLEAN state, so that other plexes copy data from that plex.
Once data copy is completed bring the entire volume on line and fully operational?

#vxvol –g diskgroup init init_type volume_name plex_name

Example

#vxvol -g datadg init clean datavol datavol-02

Then do

#vxvol –g datadg init enable datavol

How to enable a volume

Example

#vxvol –g datadg init enable datavol

How to change the state of the plex?

#vxmend –g datadg fix stale dataplex

#vxmend –g datadg fix clean dataplex

#vxmend –g datadg fix active dataplex

How to take a plex offline?

#vxmend -g diskgroup_name off plex_name

How to make a plex online?

#vxmend -g diskgroup_name on plex_name

Page 37 of 57
How To recover a volume with Plex Problem

Example

Say, a volume has 2 plexes vol01-01 and vol01-02

vol01-01 is in DISBLED/RECOVER state


vol01-02 is in DISABLED/STALE state

Since plex vol01-01 is in DISABLED/RECOVER state, its data is better than vol01-02 plex
To recover the volume in this case follow the steps.

1. Bring both the plexes to STALE state.


#vxmend –g datadg fix stale vol01-01
#vxmend –g datadg fix stale vol01-02
2. Next change the state of vol01-01 plex to clean
#vxmend –g datadg fix clean vol01-01
3. Recover the volume
#vxrecover –g datadg –s vol01

Page 38 of 57
How to encapsulate a disk under VxVm Control

#/etc/vx/bin/vxencp –g diskgroup –c media_access_name=disk_name

Example

#/etc/vx/bin/vxencp –g rootdg –c rootdg01=c0t0d0s2

Run The Script

#/etc/init.d/vxvm-reconfig access_name

Example

#/etc/init.d/vxvm-reconfig c0t0d0

Page 39 of 57
How to Mirror Root Disk in Solaris

Option 1

To mirror only those file systems on the root disk that are required to boot the system, run the command:-

#/etc/vx/bin/vxrootmir alternate_boot_disk

Example

#/etc/vx/bin/vxrootmir rootdg02

Option 2

To mirror all other unmirrored volumes on the boot disk to an alternate disk

#/etc/vx/bin/vxmirror –g disk_group_name boot_disk alternate_disk

Example#/etc/vx/bin/vxmirror –g rootdg rootdg01 rootdg02

#vxbootsetup

Page 40 of 57
How to Mirror Root Disk in LINUX

To mirror all file systems on the root disk, run the following command

#/etc/vx/bin/vxrootmir disk_access_name disk_media_name

Example

/etc/vx/bin/vxrootmir sdb rootmir

Page 41 of 57
Removing Boot Disk from VxVM Control (Solaris)

1. Ensure that boot disk volumes have only one plex.


Example
#vxprint -ht rootvol swapvol usr var
If the boot disk volumes have more than one plex each, remove unnecessary plexes.
Example
#vxplex –g bootdg –o rm dis rootvol02 swapvol02 homevol02
2. Run the vxunroot utility.
#vxunroot

Page 42 of 57
Booting from an alternate mirror (Solaris)

To boot the system using an alternate boot disk after failure of the primary boot disk

1. Set the eeprom variable use-nvramrc? to true


Example
ok>setenv use-nvramrc? true
ok>reset

This variable must be set to “true” to enable the use of alternate boot disk.

2. Check for available boot disk aliases.


ok>devalias
vx-rootdisk
vx-diskname
The above command displays the name of the boot disk and available mirrors.
3. Boot from an available boot disk alias
ok>boot vx-diskname

Page 43 of 57
Where is currently imported disk group stored?

/var/vxvm/tempdb directory is used to store configuration information

To remove and recreate the /var/vxvm/tempdb directory we can use the following command.

#vxconfigd –k –x cleartempdir

Page 44 of 57
How to create subdisks?

#vxmake –g diskgroup_name sd sub_disk_name disk_name , offset,length

Note Length=sectors

Example

#vxmake –g mydg sd mydg02-01 mydg02,0,8000

or

#vxmake –g mydg sd mydg02-01 mydg02 500m

How to Display information About subdisks?

#vxprint –st

How to display detail information about a particular subdisk?

#vxprit –g diskgroup_name –l subdisk_name

Example

#vxprint –g mydg –l mydg02-01

How To evacuate data from one subdisk to other subdisk/s?

Example

To move data off from subdisk mydg03-01 on to mydg12-01 and mydg12-02 subdisks, use the command.

#vxsd –g mydg mv mydg03-01 mydg12-01 mydg12-02

Page 45 of 57
How to Split a subdisk?

Example

To split subdisk mudg03-02 into 2 subdisks mydg03-02 and mydg03-04, use the command

#vxsd –g mydg –s 1000 split mydg03-02 mydg03-02 mydg03-04

How to Join subdisks

Example

Say we want to join 4 subdisks which are mydg03-02, mydg03-03, mydg03-04 and mydg03-05 into one subdisk
mydg03-02, use the command.

#vxsd –g mydg join mydg03-02 mydg03-03 mydg03-04 mydg03-05 mydg03-02

How to create a plex and associate a subdisk with the new plex?

#vxmake –g diskgroup plex plex_name sd=subdisk_name

Example

#vxmake -g mydg plex plex-1 sd=mydg03-02

Page 46 of 57
How to associate subdisks to an existing Plex?

#vxsd –g disk_group assoc plex_name subdisk_name

Example

#vxsd –g mydg assoc plex-1 mydg03-03

How to dissociate a subdisk from a plex?

Example

#vxsd –g mydg dis mydg03-03

How to remove a subdisk from a disk group

#vxedit –g disk_group_name rm subdisk_name

Example

#vxedit –g mydg rm mydg03-03

How to create a plex?

#vxmake –g diskgroup_name plex plex_name sd=subdisk_name

Example

#vxmake –g mydg plex plex-01 sd=mydg02-01

How to create a concactenated Plex?

#vxmake –g disk_group_name plex plex_name sd=sub_disk1,sub_disk2

Page 47 of 57
Example

#vxmake –g mydg plex plex-01 sd=mydg02-01,mydg02-02

and also

#vxmake –g diskgroup plex plex_name layout=stripe stwidth=32 ncolumn=2 sd=subdisk1,subdisk2

Example

#vxmake –g mydg plex plex01 layout=stripe stwidth=32 ncolumn=2 sd=mydg02-01,mydg02-02

How to display information about plex?

#vxprint -lp

How to use detailed information about a plex?

#vxprint –g diskgroup –l plex_name

Example

#vxprint –g mydg –l plex01

How to List free Plexes?

#vxprint –pt

How to Attach a Plex to an existing Volume?

#vxplex –g diskgroup_name att volume_name plex_name

Example

#vxplex mydg att vol01 plex1

Page 48 of 57
How to Create a New Volume by Attaching Plexes?

#vmake -g diskgroup_name –U usetype vol volume_name plex=plex_name

Example

#vxmake –g mydg –U fsgen vol homevol plex=plex01

How to Take a Plex off-line?

#vxmend –g disk_group_name off plex_name

Example

#vxmend -g mydg off plex-02

How to detach one plex in a mirrored volume?

#vxplex –g diskgroup_name det plex_name

Example

#vxplex –g mydg det plex-02

How to bring a plex on-line

#vxmend –g diskgroup_name on plex_name

Example

#vxmend –g mydg on plex02

Page 49 of 57
How to reattach a plex to a volume?

#vxplex –g diskgroup att volume_name plex_name

Example

#vxplex –g mydg att home-vol plex-02

What if the volume is not startable?

If the vxinfo command shows that the volume is unstartablem set one of the plexes to CLEAN as follows.

#vxmend –g disk_group_name fix clean plex_name

Then start the volume using the following command

#vxvol –g diskgroup start volume_name

How to copy data from one plex to another plex?

#vxplex –g diskgroup_name mv original_plex_name new_plex_name

How to disassociate a plex from the associated volume?

#vxplex –g disk_group –o rm dis plex_name

Example

#vxplex –g mydg –o rm dis plex-02

or you can do it in 2 steps

step1 #vxplex –g mydg dis plex-02

step2 #vxedit –g mydg –r rm plex-02

Page 50 of 57
Discovering maximum size of a volume

Find out how large a volume can you create within a disk group.

#vxassist –g diskgroup_name maxsize layout=layout_type

Example

#vxassist –g oracledg maxsize layout=raid5 nlog=2

How To create a volume on any disk

#vxassist –b –g disk_group_name make volume_name length

Example

#vxassist –b –g oracledg make datavol 10g

How to create a volume on a specific disk/s?

#vxassist –b –g diskgroup_name make volume_name length disk_name

Example

#vxassist –b –g oracledg make datavol 10g oracledg01 oracledg02

How to Display Information About how a volume is configured?

#vxprint –g diskgroup –hrt

How to monitor a task?

#vxtask monitor

Page 51 of 57
How to abort a task

#vxtask abort

How to list tasks

#vxtask list

How to pause/resume tasks

#vxtask pause

#vxtask resume

How to stop all volumes in a diskgroup

#vxvol –g diskgroup –f stop volume_name

How to increase size of a volume

1. First determine how much you can increase a volume?


#vxassist –g diskgroup maxgrow
2. Then increase the volume. For example to increase a volume from 1G to 10G using two disks use the
command.
#vxresize –g diskgroup –b –F vxfs –t tasktagname volume_name disk1 disk2

How to add mirror to a volume

#vxassist –b –g diskgroupname mirror volume_name

Example

#vxassist –b –g mydg mirror voltest

Page 52 of 57
How to add mirror to a volume by creating a plex and the attaching it to a volume?

1. First initialize the disk.


#vxdisksetup –i c0t0d1
2. Add the disk to diskgroup and give it a medianame
#vxdg –g disk_group_name adddisk disk_media_name=disk_access_name
Example
#vxdg –g mydg adddisk newdg02=c0t0d1
3. Create a subdisk
#vxmake –g disk_group_name sd sub_disk_name disk_media_name size
Example
#vxmake –g mydg sd newdg02-1 newdg02 500m
4. Create a new plex and associate the subdisk.
#vxmake –g disk_group_name plex plex_name sd=sub_disk_name
Example
#vxmake –g mydg plex plex-01 sd=newdg02-1
5. Attach the plex to volume for mirroring.
#vxples –g disk_group_name att volume_name plex_name
Example
#vxplex –g mydg att voltest plex01

Page 53 of 57
How to mirror all volumes in a disk group

#/etc/vx/bin/vxmirror –g disk_group_name –a

To mirror only those file systems on the root disk that are required to boot the system (Solaris) use.

#/etc/vx/bin/vxmirror att_boot_disk_name

Example

#/etc/vx/bin/vxmirror bootdg02

How to mirror other file systems on the root disk?

#vxassist mirror volume_name alt_boot_disk_name

Example

#vxassist mirror homevol bootdg02

How to display native OS device name for a VxVM disk?

#vxdisk path | grep disk_media_name

Example

#vxdisk path | grep mydg02

Page 54 of 57
How to Scan For disk devices previously unknown to the system?

#vxdisk scandisk new

How to Obtain a list of physical controllers?

#vxdmpadm getctlr all

How to scan only for new devices added to the system?

#vxdctl –f enable

How to list all devices discovered by DDL?

#vxddladm list

How to list all host bus adapters (HBA’s)?

#vxddladm list hbas

How to list ports configured on an HBA?

#vxddladm list ports

How to list devices configured from an HBA?

#vxddladm list devices

Page 55 of 57
How to identify the vendor ID and Product ID of disks in an array?

#/etc/vx/diag.d/vxscsiinq /dev/rdsk/device_access_name

Example

#/etc/vx/diag.d/vxscsiinq /dev/rdsk/c1t20d0s2

How to display the relationship between the device paths, disk access names, disk media names
and disk groups on a system?

#vxdisk path

How to view multipathing information for a particular device?

#vxdisk list c2t0d0s2

or

#vxdmpadm getsubpaths dmpnodename= c2t0d0s2

How to display multipathing information for a particular device including LUN serial number and
array volume ID?

#vxdmpadm –v getdmpnode nodename=c0t50060160d0s2

How to get consolidated information for all DMP nodes in the system?

#vxdmpadm list dmpnode all

Page 56 of 57
How to view multipathing information for a particular device?

#vxdisk list device_name

Example

#vxdisk list c2t0d0s2

How to view multipathing information?

#vxdmpadm getsubpaths dmpnodename=enclosure_name

Example

#vxdmpadm getsubpaths dmpnodename=enc_clarrion0

How to display the DMP node that controls a particular physical path?

#vxdmpadm getdmpnode=disk_access_name

Example

#vxdmpadm getdmpnode=c0t5006016041E03B33d0s2

How to list attributes of all HBA Contollers on the system?

#vxdmpadm listctlr all

Page 57 of 57

You might also like