Showing posts with label Veritas Volume Manager. Show all posts
Showing posts with label Veritas Volume Manager. Show all posts
Wednesday, December 12, 2012 at 12:12 PM | 5 comments
Here’s a collection of my VxVM documents. Some were from my own work and some were taken from the web.

These documents were posted mainly for my personal references and for others that may find them useful.


Volume Administration

Veritas Cluster Filesystem

Veritas Disks Administration

Veritas DMP

Fixes, Tips and Tricks

Array Support Libraries

VxVM Manuals

Some Very Helpful Sites

Man Pages



I was trying to upgrade Veritas Volume Manager from 3.5 to 4.1 when the upgrade script stopped and complained about a volume not in sync. It was a swap volume.

# vxprint -ht swapvol
Disk group: rootdg

v swapvol - ENABLED NEEDSYNC 8395200 ROUND - swap
pl swapvol-01 swapvol ENABLED ACTIVE 8395200 CONCAT - RW
sd rootdisk-01 swapvol-01 rootdisk 5159231 8395200 0 c0t8d0 ENA
pl swapvol-02 swapvol ENABLED ACTIVE 8395200 CONCAT - RW
sd disk01-04 swapvol-02 disk01 19853376 8395200 0 c1t8d0 ENA

To fix this problem, all I did was issue a resync.

# vxvol resync swapvol

# vxprint -ht swapvol
Disk group: rootdg

v swapvol - ENABLED ACTIVE 8395200 ROUND - swap
pl swapvol-01 swapvol ENABLED ACTIVE 8395200 CONCAT - RW
sd rootdisk-01 swapvol-01 rootdisk 5159231 8395200 0 c0t8d0 ENA
pl swapvol-02 swapvol ENABLED ACTIVE 8395200 CONCAT - RW
sd disk01-04 swapvol-02 disk01 19853376 8395200 0 c1t8d0 ENA
I just encounter a problem with permissions on raw volumes.  The raw volumes were used by a database and permissions on these volumes were set using chown and chmod.  However, when we failover, the permissions were not carried out.

So I used the veritas function to change the ownership and permission of the volumes.

# vxedit -g set user= group= mode=
Posted by JAUGHN Labels: ,
What to do when "vxdisk list" shows status of 'online dgdisabled'.

Details:


aixsrv01:# vxdisk -o alldgs list
DEVICE TYPE DISK GROUP STATUS
EMC_CLARiiON0_0 auto:cdsdisk EMC_CLARiiON0_0 dygy2502 online
EMC_CLARiiON0_1 auto:cdsdisk - (dvgy2500) online
EMC_CLARiiON0_2 auto:cdsdisk EMC_CLARiiON0_4 dvgyappl online
EMC_CLARiiON0_3 auto:cdsdisk EMC_CLARiiON0_3 dvgy2503 online
EMC_CLARiiON0_4 auto:cdsdisk EMC_CLARiiON0_4 dvgy2504 online
EMC_CLARiiON0_5 auto:cdsdisk EMC_CLARiiON0_5 dvgy25 online
EMC_CLARiiON0_6 auto:cdsdisk EMC_CLARiiON0_9 dvgy26 online dgdisabled
EMC_CLARiiON0_7 auto:cdsdisk EMC_CLARiiON0_8 dygy2501 online
EMC_CLARiiON0_8 auto:cdsdisk - (dvgy2506) online
EMC_CLARiiON0_9 auto:cdsdisk - (dvgy2505) online
EMC_CLARiiON0_10 auto:cdsdisk - (dvgy2507) online
EMC_CLARiiON0_11 auto:cdsdisk EMC_CLARiiON0_11 dvgy25db2 online


This situation can happen when every disk in a disk group is lost from a bad power supply, power turned off to the disk array, cable disconnected, zoning problems, etc.

The disk group will not show in the output from vxprint -ht.

aixsrv01:# vxprint -htg dvgy26
VxVM vxprint ERROR V-5-1-582 Disk group dvgy26: No such disk group


The disk group will show as disabled in vxdg list:

aixsrv01:# vxdg list
NAME STATE ID
dygy2501 enabled,cds 1189621899.78.aixsrv01
dvgyappl enabled,cds 1190904062.52.aixsrv01
dvgy25 enabled,cds 1189622068.88.aixsrv01
dvgy25db2 enabled,cds 1189622043.86.aixsrv01
dvgy26 disabled 1189538508.74.aixsrv01
dvgy2503 enabled,cds 1189621988.82.aixsrv01
dvgy2504 enabled,cds 1189622014.84.aixsrv01
dygy2502 enabled,cds 1189621955.80.aixsrv01


This is the output of vxdg list dvgy26:

aixsrv01:# vxdg list dvgy26
Group: dvgy26
dgid: 1189538508.74.aixsrv01
import-id: 1024.22
flags: disabled
version: 0
alignment: 0 (bytes)
local-activation: read-write
ssb: off
detach-policy: invalid
copies: nconfig=default nlog=default
config: seqno=0.1103 permlen=1280 free=1259 templen=11 loglen=192
config disk EMC_CLARiiON0_6 copy 1 len=1280 state=clean online
log disk EMC_CLARiiON0_6 copy 1 len=192


Your filesystems will of course fail and the operating system will report it as corrupted.

aixsrv01:# df -k > /dev/null
df: /db2/dwins26q: I/O error
df: /backup: I/O error
df: /db/dwdb26q/dwins25q/NODE0000: I/O error
df: /db/dwins26q/dwdb26q/syscatspace/NODE0000: I/O error
df: /db/dwins26q/dwdb26q/tempspace01/NODE0000: I/O error
df: /dba/dwins26q: I/O error
df: /db2/dwmysld: I/O error
df: /backup/wiminst: I/O error


Once you have confirmed that the disk storage is powered-up, running, and operational and if the LUNs are in a SAN, zoning is configured right, this problem can be remedied by deporting, and then importing the disk group:

# vxdg deport dvgy26

# vxdg import dvgy26
VxVM vxdg ERROR V-5-1-587 Disk group dvgy26: import failed: No valid disk found containing disk group


If volume manager can't see the disks, and your SAN or storage administrator has confirmed that the LUNs were fine and presented to your server, then rescan the disks.

aixsrv01:# vxdisk scandisks
aixsrv01:# vxdctl enable
aixsrv01:# vxdg import dvgy26


Otherwise, your diskgroup should be showing up as enabled.

aixsrv01:# vxdg list
NAME STATE ID
dygy2501 enabled,cds 1189621899.78.aixsrv01
dvgyappl enabled,cds 1190904062.52.aixsrv01
dvgy25 enabled,cds 1189622068.88.aixsrv01
dvgy25db2 enabled,cds 1189622043.86.aixsrv01
dvgy26 enabled,cds 1189538508.74.aixsrv01
dvgy2503 enabled,cds 1189621988.82.aixsrv01
dvgy2504 enabled,cds 1189622014.84.aixsrv01
dygy2502 enabled,cds 1189621955.80.aixsrv01


The disk group now shows in vxprint -ht with the volumes and plexes disabled:

aixsrv01:# vxprint -htg dvgy26
DG NAME NCONFIG NLOG MINORS GROUP-ID
ST NAME STATE DM_CNT SPARE_CNT APPVOL_CNT
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
CO NAME CACHEVOL KSTATE STATE
VT NAME NVOLUME KSTATE STATE
V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO

dg dvgy26 default default 9000 1189538508.74.aixsrv01

dm EMC_CLARiiON0_9 EMC_CLARiiON0_6 auto 2048 67102464 -

v backup - DISABLED ACTIVE 4194304 SELECT - fsgen
pl backup-01 backup DISABLED ACTIVE 4194304 CONCAT - RW
sd EMC_CLARiiON0_9-02 backup-01 EMC_CLARiiON0_9 8388608 4194304 0 EMC_CLARiiON0_6 ENA

v db - DISABLED ACTIVE 1048576 SELECT - fsgen
pl db-01 db DISABLED ACTIVE 1048576 CONCAT - RW
sd EMC_CLARiiON0_9-04 db-01 EMC_CLARiiON0_9 16777216 1048576 0 EMC_CLARiiON0_6 ENA

v dba - DISABLED ACTIVE 4194304 SELECT - fsgen
pl dba-01 dba DISABLED ACTIVE 4194304 CONCAT - RW
sd EMC_CLARiiON0_9-03 dba-01 EMC_CLARiiON0_9 12582912 4194304 0 EMC_CLARiiON0_6 ENA

v db2 - DISABLED ACTIVE 8388608 SELECT - fsgen
pl db2-01 db2 DISABLED ACTIVE 8388608 CONCAT - RW
sd EMC_CLARiiON0_9-01 db2-01 EMC_CLARiiON0_9 0 8388608 0 EMC_CLARiiON0_6 ENA

v dwmysld - DISABLED ACTIVE 2097152 SELECT - fsgen
pl dwmysld-01 dwmysld DISABLED ACTIVE 2097152 CONCAT - RW
sd EMC_CLARiiON0_9-09 dwmysld-01 EMC_CLARiiON0_9 55574528 2097152 0 EMC_CLARiiON0_6 ENA

v lg1 - DISABLED ACTIVE 10485760 SELECT - fsgen
pl lg1-01 lg1 DISABLED ACTIVE 10485760 CONCAT - RW
sd EMC_CLARiiON0_9-08 lg1-01 EMC_CLARiiON0_9 45088768 10485760 0 EMC_CLARiiON0_6 ENA

v syscat - DISABLED ACTIVE 2097152 SELECT - fsgen
pl syscat-01 syscat DISABLED ACTIVE 2097152 CONCAT - RW
sd EMC_CLARiiON0_9-05 syscat-01 EMC_CLARiiON0_9 17825792 2097152 0 EMC_CLARiiON0_6 ENA

v tp01 - DISABLED ACTIVE 4194304 SELECT - fsgen
pl tp01-01 tp01 DISABLED ACTIVE 4194304 CONCAT - RW
sd EMC_CLARiiON0_9-07 tp01-01 EMC_CLARiiON0_9 40894464 4194304 0 EMC_CLARiiON0_6 ENA

v ts01 - DISABLED ACTIVE 20971520 SELECT - fsgen
pl ts01-01 ts01 DISABLED ACTIVE 20971520 CONCAT - RW
sd EMC_CLARiiON0_9-06 ts01-01 EMC_CLARiiON0_9 19922944 20971520 0 EMC_CLARiiON0_6 ENA


Verify that the disks on the diskgroup are all online.

aixsrv01:# vxdisk -o alldgs list
DEVICE TYPE DISK GROUP STATUS
EMC_CLARiiON0_0 auto:cdsdisk EMC_CLARiiON0_0 dygy2502 online
EMC_CLARiiON0_1 auto:cdsdisk - (dvgy2500) online
EMC_CLARiiON0_2 auto:cdsdisk EMC_CLARiiON0_4 dvgyappl online
EMC_CLARiiON0_3 auto:cdsdisk EMC_CLARiiON0_3 dvgy2503 online
EMC_CLARiiON0_4 auto:cdsdisk EMC_CLARiiON0_4 dvgy2504 online
EMC_CLARiiON0_5 auto:cdsdisk EMC_CLARiiON0_5 dvgy25 online
EMC_CLARiiON0_6 auto:cdsdisk EMC_CLARiiON0_9 dvgy26 online
EMC_CLARiiON0_7 auto:cdsdisk EMC_CLARiiON0_8 dygy2501 online
EMC_CLARiiON0_8 auto:cdsdisk - (dvgy2506) online
EMC_CLARiiON0_9 auto:cdsdisk - (dvgy2505) online
EMC_CLARiiON0_10 auto:cdsdisk - (dvgy2507) online
EMC_CLARiiON0_11 auto:cdsdisk EMC_CLARiiON0_11 dvgy25db2 online


Now the volumes can be started:

aixsrv01:# vxvol -g dvgy26 startall

aixsrv01:# vxprint -htg dvgy26 | egrep '^v|^pl'
v backup - ENABLED ACTIVE 4194304 SELECT - fsgen
pl backup-01 backup ENABLED ACTIVE 4194304 CONCAT - RW
v db - ENABLED ACTIVE 1048576 SELECT - fsgen
pl db-01 db ENABLED ACTIVE 1048576 CONCAT - RW
v dba - ENABLED ACTIVE 4194304 SELECT - fsgen
pl dba-01 dba ENABLED ACTIVE 4194304 CONCAT - RW
v db2 - ENABLED ACTIVE 8388608 SELECT - fsgen
pl db2-01 db2 ENABLED ACTIVE 8388608 CONCAT - RW
v dwmysld - ENABLED ACTIVE 2097152 SELECT - fsgen
pl dwmysld-01 dwmysld ENABLED ACTIVE 2097152 CONCAT - RW
v lg1 - ENABLED ACTIVE 10485760 SELECT - fsgen
pl lg1-01 lg1 ENABLED ACTIVE 10485760 CONCAT - RW
v syscat - ENABLED ACTIVE 2097152 SELECT - fsgen
pl syscat-01 syscat ENABLED ACTIVE 2097152 CONCAT - RW
v tp01 - ENABLED ACTIVE 4194304 SELECT - fsgen
pl tp01-01 tp01 ENABLED ACTIVE 4194304 CONCAT - RW
v ts01 - ENABLED ACTIVE 20971520 SELECT - fsgen
pl ts01-01 ts01 ENABLED ACTIVE 20971520 CONCAT - RW


The filesystems on these volumes may not be in consistent state. So, run a filesystem check before mounting them.

aixsrv01:# for i in `grep dvgy26 /etc/filesystems | awk '{ print $3 }'`
> do
> fsck -y $i
> mount $i
> done


note: This example was taken from an AIX server, but all veritas commands here will work on all UNIX platforms.
vxresize command syntax :

/etc/vx/bin/vxresize [-bsx] [-F fstype] [-g  diskgroup] [-t tasktag] \
volume new_length [medianame...]


The vxresize command will either grow or shrink both the file system and its underlying volume to match the specified new volume length. The ability to grow or shrink is file system dependent. Some file system types may require that the file system be unmounted for the operation to succeed.

Note: vxresize works with VxFS and UFS file systems only.

In some situations, when resizing large volumes, vxresize may take a long time to complete.

The new_length operand can begin with a plus (+) or minus (-) to indicate that the new length is added to or subtracted from from the current volume length.


Resizing a Filesystem/Volume

Current capacity:

# df -k /dbfiles03
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/dg20/dbvol03 3079710 2709166 308950 90% /dbfiles03

Volume information:

# vxprint dbvol03
Disk group: dg20

TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
v dbvol03 fsgen ENABLED 6291456 - ACTIVE - -
pl dbvol03-01 dbvol03 ENABLED 6298619 - ACTIVE - -
sd dg2007-03 dbvol03-01 ENABLED 3149307 0 - - -
sd dg2006-03 dbvol03-01 ENABLED 3149307 0 - - -

Plex information:

# vxprint -l dbvol03-01
Disk group: dg20

Plex: dbvol03-01
info: len=6298619 contiglen=6298491
type: layout=STRIPE columns=2 width=128
state: state=ACTIVE kernel=ENABLED io=read-write
assoc: vol=dbvol03 sd=dg2007-03,dg2006-03
flags: busy complete

Increasing the volume to 4GB using vxresize:

# /etc/vx/bin/vxresize dbvol03 4g
/dev/vx/rdsk/dg20/dbvol03:
8388608 sectors in 4096 cylinders of 32 tracks, 64 sectors
4096.0MB in 88 cyl groups (47 c/g, 47.00MB/g, 7872 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 96352, 192672, 288992, 385312, 481632, 577952, 674272, 770592, 866912,
963232, 1059552, 1155872, 1252192, 1348512, 1444832, 1541152, 1637472,
1733792, 1830112, 1926432, 2022752, 2119072, 2215392, 2311712, 2408032,
2504352, 2600672, 2696992, 2793312, 2889632, 2985952, 3080224, 3176544,
3272864, 3369184, 3465504, 3561824, 3658144, 3754464, 3850784, 3947104,
4043424, 4139744, 4236064, 4332384, 4428704, 4525024, 4621344, 4717664,
4813984, 4910304, 5006624, 5102944, 5199264, 5295584, 5391904, 5488224,
5584544, 5680864, 5777184, 5873504, 5969824, 6066144, 6160416, 6256736,
6353056, 6449376, 6545696, 6642016, 6738336, 6834656, 6930976, 7027296,
7123616, 7219936, 7316256, 7412576, 7508896, 7605216, 7701536, 7797856,
7894176, 7990496, 8086816, 8183136, 8279456, 8375776,

New capacity:

# df -k /dbfiles03
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/dg20/dbvol03 4106286 2709166 1335526 67% /dbfiles03

New volume information (two new subdisks):

# vxprint dbvol03
Disk group: dg20

TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
v dbvol03 fsgen ENABLED 8388608 - ACTIVE - -
pl dbvol03-01 dbvol03 ENABLED 8395767 - ACTIVE - -
sd dg2007-03 dbvol03-01 ENABLED 3149307 0 - - -
sd dg2007-05 dbvol03-01 ENABLED 1048572 3149307 - - -
sd dg2006-03 dbvol03-01 ENABLED 3149307 0 - - -
sd dg2006-05 dbvol03-01 ENABLED 1048572 3149307 - - -

New plex information:

# vxprint -l dbvol03-01
Disk group: dg20

Plex: dbvol03-01
info: len=8395767 contiglen=8395639
type: layout=STRIPE columns=2 width=128
state: state=ACTIVE kernel=ENABLED io=read-write
assoc: vol=dbvol03 sd=dg2007-03,dg2007-05,dg2006-03,dg2006-05
flags: busy complete

More options:

# /etc/vx/bin/vxresize dbvol03 +1g

# /etc/vx/bin/vxresize dbvol03 +1024m

# /etc/vx/bin/vxresize dbvol03 -2g
Posted by JAUGHN Labels: ,
vxassist command syntax :

vxassist <option> <Keyword> volume_name [attributes]

Commonly used options are given below (See man vxassist for complete list of supported options)

    -g for specifying diskgroups
    -b for background operation
    -d file containing defaults for vxassist if not specified /etc/default/vxassist is used


Keywords used are make , mirror , move , growto ,growby ,shrintto ,shirnkby ,snapstart , snapshot ,snapwait

Attributes specify volumes layout disks controllar to include exclude etc


Extending a volume up to certain length

Command syntax :

vxassist growto volume_name length

To extend vol3 up to 8000 sectors, type:

# vxassist growto vol3 8000


Extending by a Given Length

Command Syntax :

vxassist growby volume_name length

To extend volapp by 1000 sectors, type:

# vxassist growby volapp 1000





Shrinking a Volume

Caution - Do not shrink a volume below the size of the file system. If you have a VxFS file system, you can shrink the file system and then shrink the volume. If you do not shrink the file system first, you risk unrecoverable data loss.

Always make sure you have a good backup of the data volume to be shirnked.


Shrinking to a Given Length

Shrink a volume to a specific length as follows:

vxassist shrinkto volume_name length

Make sure you do not shrink the volume below the current size of the file system or database using the volume. This command can be safely used on empty volumes.

To shrink volcat to 1300 sectors, type:

# vxassist shrinkto volcat 1300


Shrinking by a Given Length

Shrink a volume by a specific length as follows:

vxassist shrinkby volume_name length

To extend volapp by 1000 sectors, type:

# vxassist shrinkby volapp2 8000
Posted by JAUGHN Labels: ,
vxassist command syntax :

vxassist <option> <Keyword> volume_name [attributes]

Commonly used options are given below (See man vxassist for complete list of supported options)

    -g for specifying diskgroups
    -b for background operation
    -d file containing defaults for vxassist if not specified /etc/default/vxassist is used


Keywords used are make , mirror , move , growto ,growby ,shrintto ,shirnkby ,snapstart , snapshot ,snapwait

Attributes specify volumes layout disks controllar to include exclude etc


Creating a Concatenated Volume

By default, vxassist creates a concatenated volume using the space available on a disk or on the number of disks in a diskgroup if the volume size specified is more then the one available on a single disk.

Disks can be specified from a diskgroup for a volume group but if not mentioned available disks are selected by the volume manager.

Command syntax :

vxassist make volume_name volume_length

To create a new volume appvol of 100 MB in the default disk group rootdg with available disks:

# vxassist make appvol 100m

To create the volume appvol of 100MB on disk03

# vxassist make appvol 100m disk03


Creating a Striped Volume

A striped volume contains at least one plex that consists of two or more subdisks located on two or more physical disks.

Command Syntax :

vxassist make volume_name length layout=stripe

To create a striped volume appvol2 with the default stripe unit size on the default number of disks

# xassist make appvol2 100m layout=stripe

To create a striped volume appvol2 100MB striped volume on three specific disks.

# vxassist make appvol2 100m layout=stripe disk04 disk05 disk06


Creating a RAID-5 Volume

A RAID-5 volume contains a RAID-5 plex that consists of two or more subdisks located on two or more physical disks. Only one RAID-5 plex can exist per volume. A RAID-5 volume may also contain one or more RAID-5 log plexes, which are used to log information about data and parity being written to the volume.

Command Syntax :

vxassist make volume_name length layout=raid5

To create the RAID-5 volume appvol4 with the default stripe unit size on the default number of disks with RAID-5 log,

# xassist make appvol4 100m layout=raid5.
Posted by JAUGHN Labels: ,
Friday, January 4, 2008 at 2:54 PM | 0 comments
How to configure load balancing across multiple primary paths in an Active/Passive DMP environment using VERITAS Volume Manager (tm) 4.x

Details:

In an Active/Passive Dynamic Multipathing (DMP) environment, it is possible that there may be multiple primary paths to a device due to a mesh of SAN switches. Volume Manager 4.0 can be configured to allow load balancing across multiple primary paths. This TechNote explains how to do this.

Note: This feature was not available in releases prior to 4.0

In the following example, device c3t2d15 belongs to a disk group named tonydg and contains a simple concatenated volume named tony1. The device has eight primary paths:

# vxdisk list c3t2d15s2
Device: c3t2d15s2
<..snip..>
numpaths: 8
c2t0d15s2 state=enabled type=primary
c2t1d15s2 state=enabled type=primary
c3t1d15s2 state=enabled type=primary
c3t2d15s2 state=enabled type=primary
c4t3d15s2 state=enabled type=primary
c4t4d15s2 state=enabled type=primary
c5t3d15s2 state=enabled type=primary
c5t5d15s2 state=enabled type=primary


DMP statistics are enabled and a read based workload is applied to the volume:

# vxdmpadm iostat start

# dd if=/dev/vx/rdsk/tonydg/tony1 of=/dev/null bs=512k count=6144


By displaying the DMP statistics for device c3t2d15, it can be seen that all I/Os are being directed to one subpath, c5t5d15:

# vxdmpadm iostat show dmpnodename=c3t2d15s2                         
cpu usage = 8023us per cpu memory = 32768b
OPERATIONS MBYTES AVG TIME(ms)
PATHNAME READS WRITES READS WRITES READS WRITES
c2t0d15s2 0 0 0 0 0.000000 0.000000
c2t1d15s2 0 0 0 0 0.000000 0.000000
c3t1d15s2 0 0 0 0 0.000000 0.000000
c3t2d15s2 0 0 0 0 0.000000 0.000000
c4t3d15s2 0 0 0 0 0.000000 0.000000
c4t4d15s2 0 0 0 0 0.000000 0.000000
c5t3d15s2 0 0 0 0 0.000000 0.000000
c5t5d15s2 6144 0 3145728 0 0.011081 0.000000


Using vxdmpadm, it is clear that the default iopolicy for this enclosure is Single Active (which explains the above behavior):

# vxdmpadm getattr enclosure HDS92000 iopolicy
ENCLR_NAME DEFAULT CURRENT
============================================
HDS92000 Single-Active Single-Active


To load balance across multiple primaries, the iopolicy should be set to round-robin:

# vxdmpadm setattr enclosure HDS92000 iopolicy=round-robin

# vxdmpadm getattr enclosure HDS92000 iopolicy
ENCLR_NAME DEFAULT CURRENT
============================================
HDS92000 Single-Active Round-Robin


The DMP statistics are reset and the same workload is applied to the volume, load balancing across the primary paths can be seen.

# vxdmpadm iostat reset                                        

# dd if=/dev/vx/rdsk/tonydg/tony1 of=/dev/null bs=512k count=6144

# vxdmpadm iostat show dmpnodename=c3t2d15s2
cpu usage = 7223us per cpu memory = 32768b
OPERATIONS MBYTES AVG TIME(ms)
PATHNAME READS WRITES READS WRITES READS WRITES
c2t0d15s2 786 0 402432 0 0.011013 0.000000
c2t1d15s2 778 0 398336 0 0.011267 0.000000
c3t1d15s2 772 0 395264 0 0.011205 0.000000
c3t2d15s2 744 0 380928 0 0.011094 0.000000
c4t3d15s2 750 0 384000 0 0.011029 0.000000
c4t4d15s2 768 0 393216 0 0.011169 0.000000
c5t3d15s2 733 0 375296 0 0.010943 0.000000
c5t5d15s2 813 0 416256 0 0.011068 0.000000


The enclosure can be returned to its default policy of single active with the following:

# vxdmpadm setattr enclosure HDS92000 iopolicy=singleactive


Note: This setting is not persistent across reboots, I/O policies will revert to their default. Persistence can be configured by adding the relevant vxdmpadm command to a boot script.
Posted by JAUGHN Labels: , ,
How to recover and start a Veritas Volume Manager logical volume where the volume is DISABLED ACTIVE and has a plex that is DISABLED RECOVER

Details:


When a system encounters a problem with a volume or a plex, or if Veritas Volume Manager (VxVM) has any reason to believe that the data is not synchronized, VxVM changes the kernel state, KSTATE and state, STATE, of the volume and its plexes accordingly. The plex state can be stale, empty, nodevice, etc. A particular plex state does not necessarily mean that the data is good or bad. The plex state is representative of VxVM's perception of the data in a plex.

The output from the vxprint utility using the switches "-h" and "-t" (for more information about these switches and all applicable switches, see the man page for vxprint) displays information from records in VxVM disk group configurations, including the KSTATE and STATE of a volume and plex as indicated in columns 4 and 5 respectively in the table below. When viewing the configuration records of a VxVM disk group using the vxprint utility and the KSTATE and STATE fields display DISABLED ACTIVE for the volume and DISABLED RECOVER for the plex, recovery steps need to be followed to bring the volume back to an ENABLED ACTIVE state so it can be mounted and make the file system accessible again.

From the below output, it can be seen that the KSTATE and STATE for the volume test is DISABLED ACTIVE and its plex test-01 is DISABLED RECOVER.

# vxprint -ht -g testdg


DG NAME NCONFIG NLOG MINORS GROUP-ID
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
V NAME RVG KSTATE STATE LENGTH USETYPE PREFPLEX RDPOL
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE



dg testdg default default 84000 970356463.1203.alu

dm testdg01 c1t4d0s2 sliced 2179 8920560 -
dm testdg02 c1t6d0s2 sliced 2179 8920560 -

v test - DISABLED ACTIVE 17840128 fsgen - SELECT
pl test-01 test DISABLED RECOVER 17841120 CONCAT - RW
sd testdg01-01 test-01 testdg01 0 8920560 0 c1t4d0 ENA
sd testdg02-01 test-01 testdg02 0 8920560 8920560 c1t6d0 ENA




Follow these steps to change KSTATE and STATE of a plex that is DISABLED RECOVER to ENABLED ACTIVE so the volume can be recovered / started and the file system mounted:

1. Change the plex test-01 to the DISABLED STALE state:

vxmend -g  diskgroup fix stale <plex_name>


For example:

# vxmend -g testdg fix stale test-01


This output shows the plex test-01 as DISABLED STALE:

# vxprint -ht -g testdg


DG NAME NCONFIG NLOG MINORS GROUP-ID
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
V NAME RVG KSTATE STATE LENGTH USETYPE PREFPLEX RDPOL
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE

dg testdg default default 84000 970356463.1203.alu

dm testdg01 c1t4d0s2 sliced 2179 8920560 -
dm testdg02 c1t6d0s2 sliced 2179 8920560 -

v test - DISABLED ACTIVE 17840128 fsgen - SELECT
pl test-01 test DISABLED STALE 17841120 CONCAT - RW
sd testdg01-01 test-01 testdg01 0 8920560 0 c1t4d0 ENA
sd testdg02-01 test-01 testdg02 0 8920560 8920560 c1t6d0 ENA



2. Change the plex test-01 to the DISABLED CLEAN state:

vxmend -g diskgroup fix clean <plex_name>


For example:

# vxmend -g testdg fix clean test-01


This output shows the plex test-01 as DISABLED CLEAN:

# vxprint -ht -g testdg


DG NAME NCONFIG NLOG MINORS GROUP-ID
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
V NAME RVG KSTATE STATE LENGTH USETYPE PREFPLEX RDPOL
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE

dg testdg default default 84000 970356463.1203.alu

dm testdg01 c1t4d0s2 sliced 2179 8920560 -
dm testdg02 c1t6d0s2 sliced 2179 8920560 -

v test - DISABLED ACTIVE 17840128 fsgen - SELECT
pl test-01 test DISABLED CLEAN 17841120 CONCAT - RW
sd testdg01-01 test-01 testdg01 0 8920560 0 c1t4d0 ENA
sd testdg02-01 test-01 testdg02 0 8920560 8920560 c1t6d0 ENA



3. Start the volume test:

vxvol -g diskgroup start <volume>


For example:

# vxvol -g diskgroup start test


This output shows that the volume test and its plex test-01 are both ENABLED ACTIVE:

# vxprint -ht -g testdg

DG NAME NCONFIG NLOG MINORS GROUP-ID
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
V NAME RVG KSTATE STATE LENGTH USETYPE PREFPLEX RDPOL
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE

dg testdg default default 84000 970356463.1203.alu

dm testdg01 c1t4d0s2 sliced 2179 8920560 -
dm testdg02 c1t6d0s2 sliced 2179 8920560 -

v test - ENABLED ACTIVE 17840128 fsgen - SELECT
pl test-01 test ENABLED ACTIVE 17841120 CONCAT - RW
sd testdg01-01 test-01 testdg01 0 8920560 0 c1t4d0 ENA
sd testdg02-01 test-01 testdg02 0 8920560 8920560 c1t6d0 ENA



4. Mount the volume to its associated mount point (refer to the /etc/vfstab file if the mount point location is not known) if the file system is a Veritas File System (VxFS) file system:

mount -F vxfs /dev/vx/dsk/diskgroup/volume /mount-point


For example:

# mount -F vxfs /dev/vx/dsk/testdg/test /testvol


Note: An error may be generated stating that the file system needs to be checked for consistency. If this occurs, run the VxFS specific fsck utility (/usr/lib/fs/vxfs/fsck) where the default is to replay the intent log, instead of performing a full structural file system check which is usually sufficient to set the file system to CLEAN and allow the volume to be mounted.
Removing a volume requires removing all references to the volumes to be removed like unmounting the volume if mounted and removing its reference from filesystem table.

An active volume has to be stopped first to stop all the activities to the volume only then it can be removed.

Stopping a Volume:

vxvol stop volume_name


Removing a Volume

vxedit -rf rm volume_name
Posted by JAUGHN Labels: ,
Visit the Site
MARVEL and SPIDER-MAN: TM & 2007 Marvel Characters, Inc. Motion Picture © 2007 Columbia Pictures Industries, Inc. All Rights Reserved. 2007 Sony Pictures Digital Inc. All rights reserved. blogger template by blog forum