VXVM command

download VXVM command

of 21

Transcript of VXVM command

  • 7/27/2019 VXVM command

    1/21

    Veritas Volume Manager command list

    NOTE - private regon is 1024 sectors by default which means

    that it is limited to 2000 obects!when creating e"treemly large dis#groupsv"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 .+/(

    v"vol -g )group* rdpol prefer )volname* )ple"name*

    instead of prefer we can have round or sdeet

    iew configuration(

    v"print -thist dis#s(

    v"dis# list

    v"dis# -o alldgs list shows deported dis#s

    +dding dis#s while solaris is running(

    drvconfig This probes scsi - ,olaris

    dis#s 'reates lin#s in 3dev - ,olaris

    prtvtoc iew the vtoc - ,olarisv"dctl enable .escan for dis#s - eritas

    v"dis# list ,hows the dis# in error as they are not initalied etv"dis#setup init the dis#s

    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. situation

    v"dg -f' to clear hostid of old host and forcing dis#group online

    7estroy a dis# group(

    v"dg destroy )dis# group*

  • 7/27/2019 VXVM command

    2/21

    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* )sie* layou$stripencols$number of colums stripeunit$sie

    'reate a veritas filesystem on this volume( m#fs -8 v"fs 3dev3v"3rds#3)dis# group*3)volume* )sie*

    7elete a volume same as creatiuon but replace ma#e with remove

    .esie a filesystem(

    v"resie -g )dis# group* -8 )fstype* )volume* )sie*

    5f eritas is ever causing you problems! do the following(Touch 3etc3v"3reconfig&d3state&d3install-db

    edit 3etc3system and modify 3etc3vfstabto disable .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$mirrorma#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 ;

  • 7/27/2019 VXVM command

    3/21

    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#09dis#0%

    ma#es a :0/b stripe using dis#s: and ; mirrored across 9 and % and uses

    alog subdis#

    v"assist ma#e martin 100m layout$raid:

    ma#es a 100m raid: volume

    3usr3sbin3v"edit -g rootdg rename dis#12 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 (

    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#02and would be %000bloc#s 4000# 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

  • 7/27/2019 VXVM command

    5/21

    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"es and subdis#s though

    v"print -ht volume

    to display info a stripe loo#s li#e this&&

    N+/E B,ETCDE ,T+TE ,T+TE ENFTG .E+7DO

    D.E8DEHD N+/E OB/E ,T+TE ,T+TE ENFTG +COBT

    N'O3657 /O7E

    ,7 N+/E DEH 75, 75,O88, ENFTG I'O3JO88

    7E5'E /O7E

    v martin fsgen EN+KE7 +'T5E 204%00 ,EE'Tmartin-01

    pl martin-01 martin EN+KE7 +'T5E 20:99; ,T.5DE 4312%

    .6sd 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% >30c1t4d0 EN+

    a mirror li#e this&&&

    v"print -ht martin

    7is# group( rootdg

    N+/E B,ETCDE ,T+TE ,T+TE ENFTG .E+7DO

    D.E8DEH

    D N+/E OB/E ,T+TE ,T+TE ENFTG +COBTN'O3657 /O7E

    ,7 N+/E DEH 75, 75,O88, ENFTG I'O3JO88

    7E5'E /O7E

    v martin fsgen EN+KE7 +'T5E 204%00 ,EE'T

    martin-01

    pl martin-01 martin EN+KE7 +'T5E 20:99; ,T.5DE 4312%

  • 7/27/2019 VXVM command

    6/21

    .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% 230c1t>d0 EN+

    sd dis#0>-01 martin-01 dis#0> 0 :140% >30

    c1t4d0 EN+pl martin-02 martin EN+KE7 TE/D./,7 20:;>2 'ON'+T -

    6O

    sd dis#10-01 martin-02 dis#10 0 20:;>2 0

    c1t1d> EN+

    a raid: li#e this&&&

    uni"= v"print -ht martin7is# group( rootdg

    N+/E B,ETCDE ,T+TE ,T+TE ENFTG .E+7DO

    D.E8DEH

    D N+/E OB/E ,T+TE ,T+TE ENFTG +COBTN'O3657 /O7E

    ,7 N+/E DEH 75, 75,O88, ENFTG I'O3JO88

    7E5'E /O7E

    v martin raid: EN+KE7 +'T5E 40

  • 7/27/2019 VXVM command

    7/21

    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 'E+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# byv"edit rm dis#==-==

    this command show@s you what the lagest stripe youcan currently have L

    v"assist ma"sie layout$stripe

    /a"imum volume sie( 19%>>2 to 1%4:04>2

  • 7/27/2019 VXVM command

    8/21

    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 theple"es use v"assist

    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?sdoins subdis#1 and subdis#1 to create a new subdis#

    ssaadm -t 12> stopstart controller =

    so start3stop dis# trays&&&

    v"recover -s vol?namewill start a volume

    v"recover -swill 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

  • 7/27/2019 VXVM command

    9/21

    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 dis#10move 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 listlists all dis#groups

    v"dis# listlists all dis#s under / control and which group their in

    v"dis# list dis#01

    lists the properties of dis#01

    v"print -vt

    v"print -l volume?namev"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&&

  • 7/27/2019 VXVM command

    10/21

    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-01 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 commandD?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

    lvchangeChanges thecharacteristics of logicalvolumes.

    vxedit

    or

    vxvol set

    Creates, removes, and modifiesVolume Manager records.

    There is no singleequivalent LVMcommand.

    vxresizeesi!es a file s"stem and itsunderl"ing volume at the same time.

    lvlnboot

    Creates root, primar" andsecondar" s#ap anddump volumes. $t also

    creates boot areas on thedis%.

    vxvmboot&'(-)*

    11i Version 1.+ nl"

    (repares volumes to be root, boot,dump, or primar" s#ap volumes &'(-

    )* 11i Version 1.+ onl".

    lvcreate Creates a logical volume. vxassist

    Creates volumes #ith the make

    parameter.

    /ample0 vxassist make

    vol_name100M layout=stripe

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

  • 7/27/2019 VXVM command

    11/21

    LVM Description/Action VxVM Description/Action

    allocated to a logical

    volume.

    growtoor growbyparameter.

    /ample0 vxassist growto

    vol_name200M,

    v/assist gro#b" vol_name100M

    v/assist creates and modifiesvolumes.

    lvreduceecreases dis% spaceallocated to a logicalvolume.

    vxassist

    ecreases a volume in si!e #ith theshrinktoor shrinkby

    parameters.

    /ample0 vxassist shrinkto

    vol_name200M

    Ma%e sure "ou shrin% the file s"stembefore shrin%ing the volume.

    lvremoveemoves one or morelogical volumes from avolume group.

    vxedit

    vxassist

    emoves volumes #ith the -r rm

    parameters.

    /ample0 vxedit -r rm

    vol_name

    emoves a volume #ith the remove

    volumeparameters.

    /ample0 vxassist remove

    volume vol_name

    lvsplit2plits a mirrored logicalvolume into t#o logicalvolumes.

    vxassist

    snapshot

    The snapshotoperation ta%es one

    of the attached temporar" mirrors andcreates a ne# volume #ith thetemporar" mirror as its one ple/.

    /ample0 vxassist snapshot

    vol_namenew_volume

    lvmerge

    everses and convertsthe lvsplitlogical

    volumes to a singlelogical volume.

    There is no equivalent command inV/VM.

    lvsync2"nchroni!es mirrors thatare stale in one or morelogical volumes.

    vxrecover

    vxvol start

    The vxrecovercommand performsres"nchroni!e operations for thevolumes, or for volumes residing onthe named dis%s &medianame or theV/VM name for the dis%.

    /ample0 vxrecovervol_namemedia_name

    pvcreate Ma%es a dis% an LVM vxdisksetup rings a dis% under V/VM control.

  • 7/27/2019 VXVM command

    12/21

    LVM Description/Action VxVM Description/Action

    dis%./ample0 vxdisksetup c0t!d0

    ption 1 in thevxdiskadm

    menuadds or initiali!es one or more dis%s.

    pvdisplayispla"s informationabout ph"sical volumes ina volume group.

    vxdisk list

    Lists information about V/VM dis%s.

    /ample0 vxdisk list

    disk_name

    pvchange

    2ets ph"sical volumecharacteristics toallo#4den" allocation ofadditional ph"sicale/tents from this dis%.

    vxdisk

    vxdisk set

    vxedit

    The vxdiskutilit" performs basic

    administrative operations on V/VMdis%s. perations include initiali!ingand replacing dis%s, as #ell as ta%ingcare of some boo%-%eepingnecessar" for the dis% modelpresented b" the Volume Manager.

    pvmove

    Moves allocated ph"sicale/tents from source todestination #ithin avolume group.

    vxevac

    vxsd mv

    vxdiskadm

    Moves volumes off a dis%.

    (erforms volume operations on asubdis%. Moves the contents of oldsubdis% onto the ne# subdis%s andreplaces old sub dis% #ith the ne#subdis%s for an" associations.

    The vxdiskadmscript presents a

    menu of possible operations to theuser.

    ption 5 in the vxdiskadmmenumoves volumes.

    pvremoveemoves the LVM headerinformation and releasesthe dis% from LVM control.

    vxdiskunsetupemoves the V/VM headerinformation and releases the dis%from V/VM control.

    vgcreate Creates a volume group.

    vxdiskadd

    vxdg init

    Creates a ne# dis% group and4oradds dis%s to a dis% group.

    vgdisplayispla"s information onall volume groups.

    vxdg list

    vxprint

    ispla"s the contents of a dis% group.

    ispla"s information about all ob6ectsor a subset of ob6ects.

    vgchange7ctivates or deactivatesone or more volumegroups.

    vxdg -g

    diskgroupsetactivation=

    mode

    7ctivates a shared dis% group.

    vgextend/tends a volume groupb" adding one or moredis%s to it.

    vxdiskadd

    vxdiskadm

    7dds a dis% to the dis% group.

    ption 1 in the vxdiskadmmenu

    adds dis%s to the dis% group.

  • 7/27/2019 VXVM command

    13/21

    LVM Description/Action VxVM Description/Action

    vgreduceeduces a volume groupb" removing one or moredis%s from it.

    vxdg rmdisk

    vxdisk rm

    vxdiskadm

    emoves dis%s from a dis% group.

    emoves the specified dis% accessrecord b" dis% access name.

    ption 3 in the vxdiskadmmenu

    removes dis%s.

    vgscan2cans all dis%s and loo%sfor logical volume groups.

    vxino

    vxprint

    vxdiskadm

    ispla"s information about volumes.

    ispla"s complete or partialinformation from records in V/VMdis% group configurations.

    ption listin the vxdiskadm

    menu displa"s dis% information.

    vgsync2"nchroni!es mirrors thatare stale in one or morelogical volumes.

    vxrecover2tarts res"nchroni!ation and

    recover" of volumes.

    vgremoveemoves the definition ofa volume group from thes"stem.

    vxdg deport

    vxdiskadm

    eports a dis% group from thes"stem.

    ption 8 in the vxdiskadmmenu

    removes a dis% group.

    vgexportemoves a volume groupfrom the s"stem.

    vxdg deport

    vxdiskadm

    eports a dis% group from thes"stem.

    ption 8 in the vxdiskadmmenu

    removes a dis% group.

    vgimport

    7dds a volume group tothe s"stem b" scanningph"sical volumes #hichhave been e/ported usingvgexport.

    vxdg import

    vxdiskadm

    $mports a dis% group.

    ption 9 in the vxdiskadmmenu

    imports a dis% group.

    :o LVM command vxplex perates on ple/ ob6ects.

    lvchange,

    lvextend,

    lvcreate,

    lvreduce

    (erforms operations onlogical volumes.

    vxvol perates on volume ob6ects.

    vxrootmir&'(-)*

    11i Version 1.+ nl"

    (repares a dis% to support booting&'(-)* 11i Version 1.+ onl".

    :o LVM command vxsd perates on subdis% ob6ects.

    :o LVM command vxmend ;i/es simple misconfigurations

  • 7/27/2019 VXVM command

    14/21

    Table 3-2 LVM and VxVM Task Comparison

    TaskType

    Description xample

    LVM Create an LVM dis%. pvcreate "dev"rdsk"disk_name

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

    vxdiskadddevice_name

    ption 1 in the vxdiskadmmenu adds a dis%

    and initiali!es it.

    LVM Create a volume groupvgcreate "dev"vol_grp"dev"dsk"disk_name

    V/VM Create a dis% group.

    vxdg initdisk_groupdisk_name

    ption 1 in the vxdiskadmmenu performs this

    tas%.

    LVM7dd a ne# dis% to the e/isting volumegroup.

    vgextend "dev"vol_grp"dev"rdsk"disk_name

    V/VM 7dd a dis% to an e/isting dis% group. vxdg -gdisk_groupadddiskdisk=devicename

    LVM/tend a logical volume or increase spaceallocated to a logical volume.

    lvextend -l #0

    "dev"vol_grp"lvol_name

    l$indicates the number of logical e/tents in the

    logical volume

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

    vxresize -gdisk_group-% vxsvol_namelength

    vxassist growtovol_namenew_length

    vxassist growbyvol_namelength_change

  • 7/27/2019 VXVM command

    15/21

    TaskType

    Description xample

    LVM $mport and activate a volume group.

    vgimport -v4dev4vol_grp'"dev"dsk"disk_name

    vgchange -a y "dev"vol_grp

    V/VM$mport a dis% group to ma%e the specifieddis% group accessible on the local machine.

    vxdg -t( -nnewnameimportdisk_group

    ption 9 in the vxdiskadmmenu performs this

    tas%.

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

    vgchange -a nvol_group

    vgexport "dev"vol_group

    V/VM

    eport a dis% group to disable access to thespecified dis% group. 7 dis% group cannotbe deported if an" volumes in the dis%

    group are currentl" open.

    vxdg deportdisk_group

    ption 8 in the vxdiskadmmenu performs this

    tas%.

    LVMac% up volume group configurationinformation.

    vgcgbackup - "pathname"filenamevol_grp

    V/VMac% up volume group configurationinformation.

    dgcgbackup - "pathname"filenamevol_grp

    LVMestore volume group configuration to aparticular ph"sical volume.

    vgcgrestore -n "dev"vol_grp"dev"rdsk"disk_name

    V/VMestore volume group configuration to aparticular ph"sical volume.

    dgcgrestore -n "dev"vol_grp"dev"rdsk"disk_name

    LVM

    $ncrease or decrease secondar" s#ap

    space.

    nlarge an e/isting s#ap logical volume, oradd a ne# s#ap logical volume.

    lvextend$to increase s#ap space

    lvreduce$to decrease s#ap space

    V/VM7dd a ne# s#ap volume &'(-)* 11iVersion 1.+ onl".

    vxassist make swapvol2size

    &'(-)* 11i Version 1.+ onl"

    LVM

    emove a volume group.

    This destro"s a volume group b" removingits last dis% and removing it from"etc"lvmtab.

    vgremove "dev"vol_grp

    This is preceded b" lvremoveand vgreduce

    do#n to the last dis%.

    V/VM estro" a dis% group.

    vxdg deportdisk_group

    vxdg initdisk_group

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

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

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

  • 7/27/2019 VXVM command

    16/21

    TaskType

    Description xample

    ption 1 in the vxdiskadmmain menu

    performs this tas%.

    LVM educe a volume group b" reducing thenumber of dis%s in a volume group

    vgreduce "dev"vol_grp"dev"dsk"disk_name

    V/VM emove a dis% from dis% group.vxdg -gdisk_group-k rmdiskdisk_name

    LVM Mirroring a dis% involves several steps.

    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

    LVMMirroring the root dis% involves severalsteps.

    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

    V/VM

    Mirroring a dis%

    To mirror volumes on a dis% or controldefault mirroring and causes a dis% to haveits contents mirrored to available space onanother dis%.

    :ote0 oot dis% mirroring is supported on'(-)* 11i Version 1.+ onl".

    vxmirror -gdisk_group-d yes+nodisk_name[new_disk_name

    vxmirror -d yesdisk_name

    ption = in the vxdiskadmmenu performs this

    tas%.

    LVMCreate a logical volume in LVM volumegroup.

    lvcreate -&vol_size"dev"vol_grp

    V/VM

    Create a volume of one of these la"out

    t"pes0

    7 concatenated volume

    7 striped mirror volume

    7 7$-+ volume

    vxassist makevol_namelength

    vxassist makevol_namelengthlayout=mirror, stripe

    vxassist makevol_namelengthlayout=raid#

    LVM ispla" information about logical volumes. lvdisplay "dev"vol_grp"lvol_name

  • 7/27/2019 VXVM command

    17/21

    TaskType

    Description xample

    V/VM

    ispla" all volume information.

    ispla" information about a specific volume.

    vxprint -vt

    vxprint -htvol_name

    LVM ispla" information about volume groups. vgdisplay -v "dev"vol_grp

    V/VM

    ispla" dis% group information.

    ispla" information about a specific dis%group.

    vxdisk list

    vxprint -g disk_group

    vxdg list

    vxdisk listdisk_group

    LVM ispla" information about ph"sical volumes. pvdisplay "dev"dsk"disk_name

    V/VMispla" information about Volume Managervolumes.

    vxinoor vxprint

    LVM emove a logical volume. lvremove "dev"vol_grp"lvol_name

    V/VM emove a volume. vxedit rmvol_name

    LVMemove dis%s from a volume group orreduce the number of dis%s in the volumegroup.

    vgreduce "dev"vol_grp"dev"dsk"disk_name

    V/VM emove dis%s from a dis% group.

    vxdisk rmdisk_group

    vxdg rmdiskdisk_name

    vxdg -ggroup_namermdiskdisk_name

    LVM

    emove an entire volume group.

    efore attempting to remove the volumegroup, "ou must remove the logical volumesusing lvremove, and all ph"sical volumes

    e/cept the last one using vgreduce.

    vgremove "dev"vol_grp

    V/VMeport a dis% group. >ou must unmountand stop an" volumes in the dis% group first.

    vxdg deportdisk_group

    LVM

    2et up alternate lin%s to a ph"sical volume.

    $f a dis% has t#o controllers, "ou can ma%eone 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 VolumeManager represent virtual devices #ith oneor more ph"sical access paths to aparticular ph"sical dis%. "namicMultipathing provides reliabilit" of dis%

    The M( feature in V/VM sets up lin%sautomaticall". $t is not required to set up lin%sseparatel".

    efer to the manual page vxdmp &5 and the

  • 7/27/2019 VXVM command

    18/21

    TaskType

    Description xample

    access b" d"namicall" s#itching to anotherph"sical path in the event of failure of apath.

    VERITAS Volume Manager 3.1 Administrator'sGuidefor more information on M(.

    LVM Create a mirrored logical volume. lvcreate -lnum_log_extents-m 1 -nmirr_lv"dev"vol_grp

    V/VMCreate a mirrored volume4ple/ or add amirror to an e/isting volume.

    vxassist makevol_namelengthlayout=mirrorvxmake

    plexplex_namesdisk_name

    vxplex attvol_nameplex_name

    LVM

    educe a single4double mirrored logicalvolume to an unmirrored logical volume.

    emove a mirrored logical volume.

    lvreduce -m 0 "dev"vol_grp"mirr_lv

    lvremove "dev"vol_grp"mirr_lv

    V/VM

    emove mirrors or reduce the number of

    ple/es4mirrors.

    emove a volume #ith the ple/esassociated #ith it.

    vxplex -o rm displex_name

    vxedit -r rmvol_name

    LVM $ncrease the number of mirror copies.lvextend -m 2

    "dev"vol_grp"lvol_name

    V/VM7dd mirrors to a volume or increase thenumber of ple/es.

    vxassist mirrorvol_name

    LVM

    Convert a mirrored logical volume into t#ological volumes.

    2plit a logical volume.

    lvsplit -s backup

    "dev"vol_grp"lvol_name

    V/VM2napshot a volume and create a ne#volume.

    vxassist snapshotvol_namenew_vol_name

    LVMCombine t#o logical volumes bac% into amirrored logical volume

    lvmerge

    "dev"vol_grp"split_vol_name'"dev"vol_grp"lvol_name

    split?vol?name= active logical volume

    V/VM :o V/VM equivalent.

    LVMMove a mirrored logical volume from one

    dis% to another.

    pvmove -n

    "dev"vol_grp"lvol_name'

    "dev"dsk"disk_name"dev"dsk"disk_name2

    V/VM Move a ple/. vxplex mvorig_plexnew_plex

    LVM

    2"nchroni!e a mirrored logical volume.

    2"nchroni!e e/tents #ithin a mirroredlogical volume.

    lvsync "dev"vol_grp"lvol_name

    V/VM es"nchroni!e operations for the given vxvol resync

  • 7/27/2019 VXVM command

    19/21

    TaskType

    Description xample

    volumes.

    LVM2"nchroni!e e/tents #ithin mirrored logicalvolumes in a volume group.

    vgsync "dev"vol_grp

    V/VM

    es"nchroni!e operations for the namedvolumes, or for volumes residing on thenamed dis%s.

    $f no medianame or volume operands arespecified, then the operation applies to allvolumes.

    vxrecover -svol_name

    LVM 2tart a volume.lvchange -a y

    "dev"vol_grp"lvol_name

    V/VM 2tart a volume.

    vxrecover -svol_name

    v/vol start vol_name

    LVM 2top a volume.lvchange -a n

    "dev"vol_grp"lvol_name

    V/VM 2top a volume. vxvol stopvol_name

    LVM Ma%e a dis% available as a hot spare. pvchange -z y "dev"dsk"disk_name

    V/VM Ma%e a dis% available as a hot spare. vxedit set spare=on disk_name

    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 relocationfacilit" can also use an" available free space in the dis% group. $f no dis%shave been designated as spares #hen a failure of a redundant ob6ectoccurs, 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% isrepaired, "ou can move all the hot-relocated subdis%s bac% to the originaldis% using the vxunreloc&1M utilit".

    :o action needed for hot

    relocation.

    To move hot-relocatedsubdis%s bac% to theoriginal dis%0

    vxunreloc disk_name

    ename a dis%

    vxedit rename

    old_disknamenew_diskname

    ffline a dis%.

    v/dis% offline disk_name

    7lternativel", menu option1@ of vxdiskadm

    performs this tas%.

    nline a dis%.

    vxdisk online

    disk_name

    2elect menu option 1A ofvxdiskadm.

    http://docs.hp.com/en/B3921-90010/vxunreloc.1M.htmlhttp://docs.hp.com/en/B3921-90010/vxunreloc.1M.htmlhttp://docs.hp.com/en/B3921-90010/vxunreloc.1M.htmlhttp://docs.hp.com/en/B3921-90010/vxunreloc.1M.html
  • 7/27/2019 VXVM command

    20/21

    Task Description xample

    vacuate a dis%.

    vxevac -g

    disk_groupmedianamenew_medianame

    eplace a dis%. 2elect menu option B ofvxdiskadm.

    ecover volumes on a dis%.

    vxrecover -g

    disk_groupvol_namemedianame

    ispla" a M( node.vxdisk list

    meta_device

    ename a dis% group.vxdg -t( -n

    newdg_name

    ename a volume.

    vxedit -v rename

    namenewname

    )pdate the "usr"stab

    file #ith the ne# name.

    7dd a L log to a volume.vxassist addlog

    vol_name

    Create a snapshot cop" of a volume.

    vxassist snapshot

    vol_nametemp_vol_name

    ecover a volume.

    vxrecover -g

    disk_groupvolumemedianame

    vxmend ix cleanplex_name

    epair a mirrorvxplex att

    plex_name

    isable a mirrorvxplex det

    plex_name

    emove a log from a volume.vxassist remove log

    vol_name

    Move a subdis%.vxsd mvold_subdisknew_subdisk

    2plit a subdis%.vxsd -s sizesplitsubdisknew_subdisk1new_subdisk2

    oin subdis%s.

    vxsd oinsubdisk1subdisk2new_subdisk

  • 7/27/2019 VXVM command

    21/21