0% found this document useful (0 votes)
110 views

Veritas Volume Manager Command List

This document provides a summary of Veritas Volume Manager commands for creating, managing, and troubleshooting volumes, disk groups, and other storage objects. Some key commands include: - vxdg init initializes a new disk group on a disk - vxdg adddisk adds a disk to an existing disk group - vxassist makes volumes of different layouts like stripe, mirror, raid5 - vxvol sets volume attributes like length, read policy - vxrecover starts volumes or brings plexes online - vxprint displays configuration information for objects

Uploaded by

sandey16585
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
110 views

Veritas Volume Manager Command List

This document provides a summary of Veritas Volume Manager commands for creating, managing, and troubleshooting volumes, disk groups, and other storage objects. Some key commands include: - vxdg init initializes a new disk group on a disk - vxdg adddisk adds a disk to an existing disk group - vxassist makes volumes of different layouts like stripe, mirror, raid5 - vxvol sets volume attributes like length, read policy - vxrecover starts volumes or brings plexes online - vxprint displays configuration information for objects

Uploaded by

sandey16585
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Veritas Volume Manager command list

NOTE - private regon is 1024 sectors by default which means that it is limited to 2000 ob ects!when creating e"treemly large dis#groups v"dis#setup might need the flag of privlen$204%& 'reate a dis# group on a new dis#( v"dg init )dg name* )media name*$c1t10d0 +dd dis# to an e"isting dis# group( v"dg -g )dg name* adddis# )media name*$c2t0d0 replace addis# with rmdis# to remove a dis# ,et up a preferred reading ple"! this can be useful if we have a sparse ple" -ple" in .+/0( v"vol -g )group* rdpol prefer )volname* )ple"name* instead of prefer we can have round or sdeet 1iew configuration( v"print -th 2ist dis#s( v"dis# list v"dis# -o alldgs list -shows deported dis#s0 +dding dis#s while solaris is running( drvconfig -This probes scsi - ,olaris0 dis#s -'reates lin#s in 3dev - ,olaris0 prtvtoc -1iew the vtoc - ,olaris0 v"dctl enable -.escan for dis#s - 1eritas0 v"dis# list -,hows the dis# in error as they are not initali4ed et0 v"dis#setup -init the dis#s0 To encapsulate use( v"encap -g )discgroup* )devicename* E"port a dis# group( v"dg deport )dg name* v"dg -h )hostame* deport )dgname* to e"port to another host 5mport a dis# group( v"dg import )dg name* v"dg -' to clear hostid of old host -6hen failing over in 7. situation0 v"dg -f' to clear hostid of old host and forcing dis#group online 7estroy a dis# group( v"dg destroy )dis# group*

Evacuate data from a dis#( v"evac -g )dg name* )from dis#* )to dis#s* 'reate a volume on a dis#group( v"assist -g )dg name* ma#e )volname* )si4e* layou$stripe ncols$number of colums stripeunit$si4e 'reate a veritas filesystem on this volume( m#fs -8 v"fs 3dev3v"3rds#3)dis# group*3)volume* )si4e* 7elete a volume same as creatiuon but replace ma#e with remove

.esi4e a filesystem( v"resi4e -g )dis# group* -8 )fstype* )volume* )si4e* 5f 1eritas is ever causing you problems! do the following( Touch 3etc3v"3reconfig&d3state&d3install-db edit 3etc3system and modify 3etc3vfstab to disable 1.T, to start up and access the old root partitions

Other E"amples( v"assist ma#e martin 100m ma#es a volume called martin using any dis# v"assist ma#e martin 100m dis#10 ma#es a volume called martin using dis#10 v"assist ma#e martin 100m layout$stripe dis#09 dis#0% creates a 100mb striped volume called martin using dis#s9 and % v"assist mirror martin dis#0: dis#0; uses dis#s: and ; ro ma#e a mirror on volume called martin v"assist ma#e martin :0m layout$mirror ma#es a :0/b mirror using any 2 dis#s v"assist ma#e martin :0m layout$mirror dis#0: dis#0; ma#es a :0mb mirror using dis#s : and ;

v"assist ma#e martin :0m layout$mirror!stripe dis#0: dis#0; dis#09 dis#0% ma#es a :0/b stripe using dis#s: and ; mirrored across 9 and % v"assist ma#e martin :0m layout$mirror!stripe!log dis#0: dis#0; dis#09 dis#0% ma#es a :0/b stripe using dis#s: and ; mirrored across 9 and % and uses a log subdis# v"assist ma#e martin 100m layout$raid: ma#es a 100m raid: volume 3usr3sbin3v"edit -g rootdg rename dis#12 dis#0< to rename dis#12 to dis#0< in the rootdg v"edit rm dis#10 to remove a greyed out or obsolete dis# in this case dis#10 or to remove a dis# from a dis#group v"dis# list - to list all dis#s under vmcontrol v"dis# clearimport c=t=d=s= to allow a dis# to be imported after a server crash v"dg -g ra4adg rmdis# test to remove a dis# called test from a dg called ra4adg v"dg -g ra4adg adddis# test$c1t>d> to add dis# c1t>d> to a dg called ra4adg calling the dis# test! use v"dis# list to determine what dis#s are free (0 v"edit -g rootdg set spare$on dis#0< sets dis#0< in the rootdg as a hotspare& v"mirror rootdis# dis#01 mirrors all the volumes on the root dis# to dis#01 v"assist -g rootdg mirror vol01 dis#0> mirrors vol01 -in rootdg0 to dis#0> v"assist mirror martin

will mirror the volume martin to ma#e a mirror manually try 3usr3sbin3v"ma#e -g rootdg sd dis#0>-01 dm?name$dis#0> dm?offset$0 len$%1<20 to create a subdis# on dis#0> callin the subdis# dis#0>-01 the len %1<20 is %1<20sectors " :12bytes $40/ v"ma#e ple" martin-02 sd$dis#0>-01 creates a ple" called martin-02 using subdis# dis#0>-01 v"ple" att martin martin-02 attaches the ple" martin-02 to volume martin to list all volumes on your primary boot dis# enter v"print -t -v -e @aslist&aslist&sd?dis#$Aboot?dis#?nameA@ v"sd mv dis#0>-01 dis#0:-01 moves the contents of subdis# dis#0>-01 to dis#0:-01 then moves subdis# dis#0:-01 into the ple" where subdis# dis#0>-01 once lived! leaving dis#0>-01 to your mercy (0 to ma#e a subdis# v"ma#e sd dis#02-02 dis#02!0!%000 this would create a subdis# called dis#02-02 at the start of dis#02 and would be %000bloc#s -4000#0 long& if you wanted to create another subdis# on this dis# the offset would be %000 as this is where the ne"t free space would be onthe dis# so&&& v"ma#e sd dis#02-02 dis#02!%000!%000 would create another %000bloc# subdis#& v"dis# rm c=t=d=s2 to remove a dis# so it@s out of vm control v"dis#add c=t=d= to add bring a new dis# under vm control

or you can try&&& v"dis#setup -i c=t=d= v"vol -g dg volname stop this stops a volume v"edit -rf rm martin removes a volume called martin and ple"-es0 and subdis#s though v"print -ht volume to display info a stripe loo#s li#e this&& 1 N+/E B,ETCDE E,T+TE ,T+TE 2ENFTG .E+7DO2 D.E8D2EH D2 N+/E 1O2B/E E,T+TE ,T+TE 2ENFTG 2+COBT N'O23657 /O7E ,7 N+/E D2EH 75,E 75,EO88, 2ENFTG I'O23JO88 7E15'E /O7E v martin fsgen EN+K2E7 +'T51E 204%00 ,E2E'T martin-01 pl martin-01 martin EN+K2E7 +'T51E 20:99; ,T.5DE 4312% .6 sd dis#04-01 martin-01 dis#04 0 :140% 030 c1t1d2 EN+ sd dis#0:-01 martin-01 dis#0: 0 :140% 130 c1t2d0 EN+ sd dis#02-01 martin-01 dis#02 0 :140% 230 c1t>d0 EN+ sd dis#0>-01 martin-01 dis#0> 0 :140% >30 c1t4d0 EN+ a mirror li#e this&&& v"print -ht martin 7is# group( rootdg 1 N+/E B,ETCDE E,T+TE ,T+TE 2ENFTG .E+7DO2 D.E8D2EH D2 N+/E 1O2B/E E,T+TE ,T+TE 2ENFTG 2+COBT N'O23657 /O7E ,7 N+/E D2EH 75,E 75,EO88, 2ENFTG I'O23JO88 7E15'E /O7E v martin fsgen EN+K2E7 +'T51E 204%00 ,E2E'T martin-01 pl martin-01 martin EN+K2E7 +'T51E 20:99; ,T.5DE 4312%

.6 sd dis#04-01 c1t1d2 EN+ sd dis#0:-01 c1t2d0 EN+ sd dis#02-01 c1t>d0 EN+ sd dis#0>-01 c1t4d0 EN+ pl martin-02 6O sd dis#10-01 c1t1d> EN+

martin-01 martin-01 martin-01 martin-01 martin martin-02

dis#04 0 dis#0: 0 dis#02 0 dis#0> 0

:140% :140% :140% :140%

030 130 230 >30 -

EN+K2E7 TE/D./,7 20:;>2 'ON'+T dis#10 0 20:;>2 0

a raid: li#e this&&& uni"= v"print -ht martin 7is# group( rootdg 1 N+/E B,ETCDE E,T+TE ,T+TE 2ENFTG .E+7DO2 D.E8D2EH D2 N+/E 1O2B/E E,T+TE ,T+TE 2ENFTG 2+COBT N'O23657 /O7E ,7 N+/E D2EH 75,E 75,EO88, 2ENFTG I'O23JO88 7E15'E /O7E v martin raid: EN+K2E7 +'T51E 40<<2 .+57 pl martin-01 martin EN+K2E7 +'T51E 42>>; .+57 43>2 .6 sd dis#04-01 martin-01 dis#04 0 14112 030 c1t1d2 EN+ sd dis#0;-01 martin-01 dis#0; 0 14112 130 c1t1d4s2 EN+ sd dis#0:-01 martin-01 dis#0: 0 14112 230 c1t2d0 EN+ sd dis#02-01 martin-01 dis#02 0 14112 >30 c1t>d0 EN+ pl martin-02 martin EN+K2E7 2OF 201; 'ON'+T .6 sd dis#0>-01 martin-02 dis#0> 0 201; 0 c1t4d0 EN+ v"ple" -o rm dis ple" deletes a ple"! or volume if used with -f

v"ple" det ple"-0= detach@s one half of the ple"&& if a volume is unstartable try try to start it by setting one of the ple"es in a mirror to '2E+N using v"mend mirror ple"?name if this doesn@t get the ple" bac# into a #ernel state of enabled try v"ple" att vol?name ple"?name to dissociate a subdis# try v"sd dis dis#==-== remove a subdis# by v"edit rm dis#==-== this command show@s you what the lagest stripe you can currently have L v"assist ma"si4e layout$stripe /a"imum volume si4e( 19%>><%4 -%90%/b0 same again for raid: v"assist ma"si4e layout$raid: /a"imum volume si4e( 12>002%% -;00;/b0 this shows how you how much you can grow a volume by&& v"assist ma"grow vol01 1olume vol01 can be e"tended by 1%24:;>2 to 1%4:04>2 -<00</b0 v"assist growto martin 2000 grows a volume to 2000 :12byte sectors v"assist growby martin 2000 increases the volume martin by 2000 :12byte sectors v"assist shrin#to vol?name 1000 will shrin# a volume by 1000 sectors! ma#e sure you don@t shrin# a volume below the current si4e of the filesystem

v"assist shrin#by vol?name 1000 shrin#s a volume by 1000 sectors v"vol set len$100000 vol?name will change the length to 100000 sectors it cannot increase the volume unless spce is available in the ple"es -use v"assist0 v"sd -s ,5ME split orignal?sd newdis# newdis# this will split an e"isting subdis# in 2 of the specified ,5ME v"sd oin sd1 sd2 new?sd oins subdis#1 and subdis#1 to create a new subdis# ssaadm -t 1N2N> stopNstart controller = so start3stop dis# trays&&& v"recover -s vol?name will start a volume v"recover -s will start all volumes v"vol maint vol?name puts a volume in to maintenance mode v"mend off ple"?name to offline a ple" v"ple" att vol?name ple"?name attches and starts the ple" in a volume v"mend on ple"?name to start ple" in volume if the volume won@t start up try v"info volume?name v"edit set user$martin group$techies mode$0;;; volume sets the owner as martin the group as techies and the mode to rw-rw-rw on a volume v"vol rdpol round volume sets a round robin read policy on a volume

v"vol rdpol prefer vol?name ple"?anme sets a prefered ple" to read from& v"edit set comment$AmessageA dis#01-01 sets the comment field to testing v"edit set putil01$Ago awayA vol01 sets the putil01 to Ago awayA v"recover -b vol well bring stale ple"es bac# online! -b indcates bac#ground ob v"assist move volume Odis#10 move the voume to a dis# other than dis#10 v"mend fi" clean ple"?name sets the pla" toa clean state so you can start vol and access data v"dg list lists all dis#groups v"dis# list lists all dis#s under 1/ control and which group their in v"dis# list dis#01 lists the properties of dis#01 v"print -vt v"print -l volume?name v"print -vl display@s info about the volumes v"print -lp v"print -l ple"?name displays info about ple"es v"print -st v"print -l dis#==-== displays info about subdis#s ssaadm display -p c= show dis# iops over 10 seconds&&& v"trace vol traces all i3o on a volume&&

v"stat -d to report dis# stats v"dg free displays the free space on the dis#s v"assist ma"grow vol tells you how much you can grow a volume by v"sd aslog vol01-01 dis#02-01 adds a log dis# -dis#02-010 to the volume vol01-01 v"assist addlog volume?name creates a log dis# for a raid: volume& there are some variables you can set for debugging ,?7EKBF - prints info when running mode sense command D?7E7BF - prints info for each e"t library function called 5?7EKBF prints progress during get status function O?7EKBF prints when files are opened

Table 3-1 Command Comparison


LVM Description/Action VxVM Description/Action

vxedit lvchange
Changes the characteristics of logical volumes. There is no single equivalent LVM command. or Creates, removes, and modifies Volume Manager records.

vxvol set vxresize


esi!es a file s"stem and its underl"ing volume at the same time.

lvlnboot

Creates root, primar" and secondar" s#ap and vxvmboot &'(-)* (repares volumes to be root, boot, dump volumes. $t also dump, or primar" s#ap volumes &'(11i Version 1.+ ,nl"creates boot areas on the )* 11i Version 1.+ onl"-. dis%. Creates volumes #ith the make parameter.

lvcreate

Creates a logical volume.

vxassist
./ample0 vxassist make

vol_name 100M layout=stripe lvextend


$ncreases dis% space v/assist $ncreases a volume in si!e #ith the

LVM

Description/Action

VxVM

Description/Action

growto or growby parameter.


./ample0 vxassist growto allocated to a logical volume.

vol_name 200M,
v/assist gro#b" vol_name 100M v/assist creates and modifies volumes. 1ecreases a volume in si!e #ith the shrinkto or shrinkby parameters.

lvreduce

1ecreases dis% space allocated to a logical volume.

vxassist

./ample0 vxassist shrinkto

vol_name 200M

Ma%e sure "ou shrin% the file s"stem before shrin%ing the volume. emoves volumes #ith the -r parameters. ./ample0 vxedit -r

rm

rm

lvremove

emoves one or more logical volumes from a volume group.

vxedit vxassist

vol_name
emoves a volume #ith the remove

volume parameters.
./ample0 vxassist remove

volume vol_name

lvsplit

2plits a mirrored logical volume into t#o logical volumes.

vxassist snapshot

The snapshot operation ta%es one of the attached temporar" mirrors and creates a ne# volume #ith the temporar" mirror as its one ple/. ./ample0 vxassist snapshot

vol_name new_volume lvmerge


everses and converts the lvsplit logical volumes to a single logical volume. There is no equivalent command in V/VM. The vxrecover command performs res"nchroni!e operations for the volumes, or for volumes residing on the named dis%s &medianame or the V/VM name for the dis%-. ./ample0 vxrecover vol_name

lvsync

2"nchroni!es mirrors that vxrecover are stale in one or more logical volumes. vxvol start

media_name pvcreate
Ma%es a dis% an LVM

vxdisksetup

3rings a dis% under V/VM control.

LVM

Description/Action

VxVM

Description/Action

dis%.

./ample0 vxdisksetup c0t!d0 ,ption 1 in the vxdiskadm menu adds or initiali!es one or more dis%s.

1ispla"s information pvdisplay about ph"sical volumes in vxdisk list a volume group.

Lists information about V/VM dis%s. ./ample0 vxdisk list

disk_name
The vxdisk utilit" performs basic administrative operations on V/VM dis%s. ,perations include initiali!ing and replacing dis%s, as #ell as ta%ing care of some boo%-%eeping necessar" for the dis% model presented b" the Volume Manager. Moves volumes off a dis%. (erforms volume operations on a subdis%. Moves the contents of old subdis% onto the ne# subdis%s and replaces old sub dis% #ith the ne# subdis%s for an" associations. The vxdiskadm script presents a menu of possible operations to the user. ,ption 5 in the vxdiskadm menu moves volumes.

pvchange

2ets ph"sical volume characteristics to allo#4den" allocation of additional ph"sical e/tents from this dis%.

vxdisk vxdisk set vxedit

pvmove

Moves allocated ph"sical e/tents from source to destination #ithin a volume group.

vxevac vxsd mv vxdiskadm

pvremove

emoves the LVM header information and releases vxdiskunsetup the dis% from LVM control.

emoves the V/VM header information and releases the dis% from V/VM control. Creates a ne# dis% group and4or adds dis%s to a dis% group. 1ispla"s the contents of a dis% group. 1ispla"s information about all ob6ects or a subset of ob6ects.

vxdiskadd vgcreate
Creates a volume group.

vxdg init vgdisplay 1ispla"s information on


all volume groups.

vxdg list vxprint vxdg -g diskgroupset activation= mode vxdiskadd vxdiskadm

vgchange

7ctivates or deactivates one or more volume groups. ./tends a volume group b" adding one or more dis%s to it.

7ctivates a shared dis% group.

7dds a dis% to the dis% group. ,ption 1 in the vxdiskadm menu adds dis%s to the dis% group.

vgextend

LVM

Description/Action

VxVM

Description/Action

vxdg rmdisk vgreduce


educes a volume group b" removing one or more dis%s from it.

emoves dis%s from a dis% group. emoves the specified dis% access record b" dis% access name. ,ption 3 in the vxdiskadm menu removes dis%s. 1ispla"s information about volumes.

vxdisk rm vxdiskadm

vxin o vgscan
2cans all dis%s and loo%s vxprint for logical volume groups.

1ispla"s complete or partial information from records in V/VM dis% group configurations. ,ption list in the vxdiskadm menu displa"s dis% information. 2tarts res"nchroni!ation and recover" of volumes. 1eports a dis% group from the s"stem. ,ption 8 in the vxdiskadm menu removes a dis% group. 1eports a dis% group from the s"stem. ,ption 8 in the vxdiskadm menu removes a dis% group. $mports a dis% group. ,ption 9 in the vxdiskadm menu imports a dis% group. ,perates on ple/ ob6ects.

vxdiskadm
2"nchroni!es mirrors that vxrecover are stale in one or more logical volumes. emoves the definition of vxdg deport a volume group from the s"stem. vxdiskadm

vgsync

vgremove

vgexport

emoves a volume group from the s"stem.

vxdg deport vxdiskadm

vgimport

7dds a volume group to vxdg import the s"stem b" scanning ph"sical volumes #hich have been e/ported using vxdiskadm vgexport. :o LVM command

vxplex

lvchange, lvextend, lvcreate, lvreduce vxrootmir &'(-)* (repares a dis% to support booting
11i Version 1.+ ,nl"- &'(-)* 11i Version 1.+ onl"-. :o LVM command :o LVM command (erforms operations on logical volumes.

vxvol

,perates on volume ob6ects.

vxsd vxmend

,perates on subdis% ob6ects. ;i/es simple misconfigurations

Table 3-2 LVM and VxVM Task Comparison


Task Type Description xample

LVM

Create an LVM dis%.

pvcreate "dev"rdsk"disk_name vxdiskadd device_name

V/VM 3ring a dis% under Volume Manager control.

,ption 1 in the vxdiskadm menu adds a dis% and initiali!es it.

LVM

Create a volume group

vgcreate "dev"vol_grp "dev"dsk"disk_name vxdg init disk_group disk_name

V/VM Create a dis% group.

,ption 1 in the vxdiskadm menu performs this tas%.

LVM

7dd a ne# dis% to the e/isting volume group.

vgextend "dev"vol_grp"dev"rdsk" disk_name vxdg -g disk_group adddisk disk=devicename lvextend -l #0 "dev"vol_grp"lvol_name l$indicates the number of logical e/tents in the
logical volume

V/VM 7dd a dis% to an e/isting dis% group.

LVM

./tend a logical volume or increase space allocated to a logical volume.

vxresize -g disk_group -% vx s vol_name length vxassist growto vol_name new_length vxassist growby vol_name length_change
<ro# the file s"stem after gro#ing the volumes.

V/VM $ncrease the volume b" or to a given length.

LVM

educe a logical volume.

lvreduce -& to_size "dev"vol_grp"lvol_name


-& indicates the number of megab"tes.

vxresize -g disk_group -% vx s vol_name to_length vxassist -b shrinkby vol_name length


V/VM educe a volume b" or to a given length.

vxassist -b shrinkto vol_name newlength


2hrin% the file s"stem before reducing the volume.

Task Type

Description

xample

LVM

$mport and activate a volume group.

vgimport -v 4dev4vol_grp' "dev"dsk"disk_name vgchange -a y "dev"vol_grp vxdg -t ( -n newname import disk_group


,ption 9 in the vxdiskadm menu performs this tas%.

V/VM

$mport a dis% group to ma%e the specified dis% group accessible on the local machine.

LVM

./port and deactivate an LVM volume group, and its associated logical volumes.

vgchange -a n vol_group vgexport "dev"vol_group

1eport a dis% group to disable access to the vxdg deport disk_group specified dis% group. 7 dis% group cannot V/VM be deported if an" volumes in the dis% ,ption 8 in the vxdiskadm menu performs this group are currentl" open. tas%. LVM V/VM LVM V/VM 3ac% up volume group configuration information. 3ac% up volume group configuration information. estore volume group configuration to a particular ph"sical volume. estore volume group configuration to a particular ph"sical volume. $ncrease or decrease secondar" s#ap space. LVM .nlarge an e/isting s#ap logical volume, or add a ne# s#ap logical volume. V/VM 7dd a ne# s#ap volume &'(-)* 11i Version 1.+ onl"-. emove a volume group. LVM This destro"s a volume group b" removing its last dis% and removing it from "etc"lvmtab.

vgc gbackup vol_grp dgc gbackup vol_grp

"pathname"filename "pathname"filename

vgc grestore -n "dev"vol_grp "dev"rdsk"disk_name dgc grestore -n "dev"vol_grp "dev"rdsk"disk_name lvextend$to increase s#ap space lvreduce$to decrease s#ap space vxassist make swapvol2 size
&'(-)* 11i Version 1.+ onl"-

vgremove "dev"vol_grp
This is preceded b" lvremove and vgreduce do#n to the last dis%.

vxdg deport disk_group


V/VM 1estro" a dis% group.

vxdg init disk_group


LVM ./tend a volume group b" adding LVM dis%s to the volume group.

vgextend "dev"vol_grp"' "dev"dsk"disk_name vxdiskadd disk_name

V/VM 7dd one or more dis%s to the dis% group.

Task Type

Description

xample

,ption 1 in the vxdiskadm main menu performs this tas%. LVM V/VM educe a volume group b" reducing the number of dis%s in a volume group emove a dis% from dis% group.

vgreduce "dev"vol_grp "dev"dsk"disk_name vxdg -g disk_group -k rmdisk disk_name 1)pvcreate "dev"rdsk"second_disk 2)vgextend "dev"vol_grp' "dev"dsk"second_disk !)lvextend -m no_of_mirrors\ "dev"vol_grp"lvol_name "dev"dsk"second_disk pvcreate -* "dev"rdsk"second_disk mkboot -l "dev"dsk"second_disk vgextend "dev"vol_grp' "dev"dsk"second_disk lvextend -m no_of_mirrors\ "dev"vol_grp"root_lvol "dev"dsk"second_disk lvlnboot -r "dev"vol_grp"lvol_name

LVM

Mirroring a dis% involves several steps.

LVM

Mirroring the root dis% involves several steps.

Mirroring a dis% To mirror volumes on a dis% or control default mirroring and causes a dis% to have V/VM its contents mirrored to available space on another dis%. :ote0 oot dis% mirroring is supported on '(-)* 11i Version 1.+ onl". LVM Create a logical volume in LVM volume group. Create a volume of one of these la"out t"pes0 V/VM 7 concatenated volume 7 striped mirror volume 7 LVM 7$1-+ volume

vxmirror -g disk_group -d yes+no disk_name [new_disk_name, vxmirror -d yes disk_name


,ption = in the vxdiskadm menu performs this tas%.

lvcreate -& vol_size "dev"vol_grp vxassist make vol_name length vxassist make vol_name length layout=mirror, stripe vxassist make vol_name length layout=raid# lvdisplay "dev"vol_grp"lvol_name

1ispla" information about logical volumes.

Task Type

Description

xample

1ispla" all volume information. V/VM

vxprint -vt

1ispla" information about a specific volume. vxprint -ht vol_name LVM 1ispla" information about volume groups.

vgdisplay -v "dev"vol_grp vxdisk list

1ispla" dis% group information. V/VM 1ispla" information about a specific dis% group.

vxprint -g disk_group vxdg list vxdisk list disk_group

LVM V/VM LVM V/VM LVM

1ispla" information about ph"sical volumes. pvdisplay "dev"dsk"disk_name 1ispla" information about Volume Manager volumes. emove a logical volume. emove a volume. emove dis%s from a volume group or reduce the number of dis%s in the volume group.

vxin o or vxprint lvremove "dev"vol_grp"lvol_name vxedit rm vol_name vgreduce "dev"vol_grp "dev"dsk"disk_name vxdisk rm disk_group

V/VM

emove dis%s from a dis% group.

vxdg rmdisk disk_name vxdg -g group_name rmdisk disk_name

emove an entire volume group. LVM 3efore attempting to remove the volume vgremove "dev"vol_grp group, "ou must remove the logical volumes using lvremove, and all ph"sical volumes e/cept the last one using vgreduce. 1eport a dis% group. >ou must unmount vxdg deport disk_group and stop an" volumes in the dis% group first.

V/VM

2et up alternate lin%s to a ph"sical volume. LVM $f a dis% has t#o controllers, "ou can ma%e one primar" and the other an alternate lin%.

vgcreate "dev"vol_grp' "dev"dsk"disk_name "dev"dsk"disk_name_2


To remove the lin%0

vgreduce "dev"vol_grp "dev"dsk"disk_name


V/VM The Multipathing dis% devices in the Volume The 1M( feature in V/VM sets up lin%s Manager represent virtual devices #ith one automaticall". $t is not required to set up lin%s or more ph"sical access paths to a separatel". particular ph"sical dis%. 1"namic Multipathing provides reliabilit" of dis% efer to the manual page vxdmp &5- and the

Task Type

Description

xample

access b" d"namicall" s#itching to another ph"sical path in the event of failure of a path. LVM Create a mirrored logical volume.

VERITAS Volume Manager 3.1 Administrator's Guide for more information on 1M(.

lvcreate -l num_log_extents -m 1 -n mirr_lv "dev"vol_grp vxassist make vol_namelength layout=mirrorvxmake plexplex_namesdisk_name vxplex att vol_nameplex_name

V/VM

Create a mirrored volume4ple/ or add a mirror to an e/isting volume.

LVM

educe a single4double mirrored logical volume to an unmirrored logical volume. emove a mirrored logical volume. emove mirrors or reduce the number of ple/es4mirrors.

lvreduce -m 0 "dev"vol_grp"mirr_lv lvremove "dev"vol_grp"mirr_lv vxplex -o rm dis plex_name vxedit -r rm vol_name

V/VM emove a volume #ith the ple/es associated #ith it. LVM V/VM $ncrease the number of mirror copies. 7dd mirrors to a volume or increase the number of ple/es. Convert a mirrored logical volume into t#o logical volumes. 2plit a logical volume. V/VM 2napshot a volume and create a ne# volume.

lvextend -m 2 "dev"vol_grp"lvol_name vxassist mirror vol_name lvsplit -s backup "dev"vol_grp"lvol_name vxassist snapshot vol_name new_vol_name lvmerge "dev"vol_grp"split_vol_name' "dev"vol_grp"lvol_name
split?vol?name= active logical volume

LVM

LVM

Combine t#o logical volumes bac% into a mirrored logical volume

V/VM :o V/VM equivalent. Move a mirrored logical volume from one dis% to another.

LVM

pvmove -n "dev"vol_grp"lvol_name' "dev"dsk"disk_name "dev"dsk"disk_name2 vxplex mv orig_plex new_plex lvsync "dev"vol_grp"lvol_name vxvol resync

V/VM Move a ple/. 2"nchroni!e a mirrored logical volume. LVM 2"nchroni!e e/tents #ithin a mirrored logical volume. es"nchroni!e operations for the given

V/VM

Task Type

Description

xample

volumes. LVM 2"nchroni!e e/tents #ithin mirrored logical volumes in a volume group. es"nchroni!e operations for the named volumes, or for volumes residing on the named dis%s. V/VM $f no medianame or volume operands are specified, then the operation applies to all volumes. LVM 2tart a volume.

vgsync "dev"vol_grp

vxrecover -s vol_name

lvchange -a y "dev"vol_grp"lvol_name vxrecover -s vol_name

V/VM 2tart a volume. v/vol start vol_name LVM 2top a volume.

lvchange -a n "dev"vol_grp"lvol_name vxvol stop vol_name pvchange -z y "dev"dsk"disk_name vxedit set spare=on disk_name

V/VM 2top a volume. LVM Ma%e a dis% available as a hot spare.

V/VM Ma%e a dis% available as a hot spare.

Table 3-3 Additional VxVM Tasks !it" no LVM e#ui$alents


Task Description xample

'ot-relocation0 in addition to using dis%s as hot spares, the hot relocation facilit" can also use an" available free space in the dis% group. $f no dis%s have been designated as spares #hen a failure of a redundant ob6ect occurs, V/VM automaticall" uses an" available free space in the dis% group in #hich the failure occurs. $f there is not enough spare dis% space, a combination of spare space and free space is used. 7fter a dis% is repaired, "ou can move all the hot-relocated subdis%s bac% to the original dis% using the vxunreloc&1M- utilit". ename a dis%

:o action needed for hot relocation. To move hot-relocated subdis%s bac% to the original dis%0

vxunreloc disk_name vxedit rename old_diskname new_diskname


v/dis% offline disk_name

,ffline a dis%.

7lternativel", menu option 1@ of vxdiskadm performs this tas%.

vxdisk online disk_name


,nline a dis%. 2elect menu option 1A of vxdiskadm.

Task Description

xample

.vacuate a dis%.

vxevac -g disk_group medianame new_medianame


2elect menu option B of vxdiskadm.

eplace a dis%.

ecover volumes on a dis%.

vxrecover -g disk_group vol_name medianame vxdisk list meta_device vxdg -t( -n newdg_name vxedit -v rename name newname

1ispla" a 1M( node. ename a dis% group.

ename a volume. )pdate the "usr" stab file #ith the ne# name. 7dd a 1 L log to a volume.

vxassist addlog vol_name vxassist snapshot vol_name temp_vol_name vxrecover -g disk_group volume medianame vxmend ix clean plex_name

Create a snapshot cop" of a volume.

ecover a volume.

epair a mirror 1isable a mirror emove a log from a volume. Move a subdis%.

vxplex att plex_name vxplex det plex_name vxassist remove log vol_name vxsd mv old_subdisk new_subdisk vxsd -s size splitsubdisk new_subdisk1 new_subdisk2 vxsd -oinsubdisk1 subdisk2 new_subdisk

2plit a subdis%.

Coin subdis%s.

You might also like