VERITAS Volumanager Cheat Sheet

download VERITAS Volumanager Cheat Sheet

of 5

Transcript of VERITAS Volumanager Cheat Sheet

  • 7/30/2019 VERITAS Volumanager Cheat Sheet

    1/5

    Veritas Volume Manager Guide (Basic):

    Subdisk:

    A subdisk is a set of contiguous disk blocks. A block is a unit of space on the disk. VxVM

    allocates diskspace using subdisks. A VM disk can be divided into one or more subdisks.

    Plexes:

    VxVM uses subdisks to build virtual objects called plexes. A plex consists of one or more

    subdisks located on one or more physical disks

    Volumes:

    A volume is a virtual disk device that appears to applications, databases, and file systems

    like a physical disk device

    Scan new disks:

    # vxdctl -f enable

    # vxdisk -f scandisks

    Partial device discovery:

    devices that were unknown to it earlier:

    # vxdisk scandisks new

    The next example discovers fabric devices:

    # vxdisk scandisks fabric

    The following command scans for the devices c1t1d0 and

    c2t2d0:

    # vxdisk scandisks device=c1t1d0,c2t2d0

    Exclude those that are listed:

    # vxdisk scandisks !device=c1t1d0,c2t2d0

    Manually Initialized

    #vxdisk init c1t15d0s6 type=simple

  • 7/30/2019 VERITAS Volumanager Cheat Sheet

    2/5

    Display the native OS device:

    # vxdisk path | egrep diskname

    # vxdisk -e list

    Select enclosure-based & operating system-based naming

    respectively:# vxddladm set namingscheme=ebn [persistence={yes|no}]

    # vxddladm set namingscheme=osn [persistence={yes|no}]

    Create Disk Group:

    vxdg init group disk=

    Adding a new disk to VG:

    vxdg g adddisk disk=

    Create Volume:

    Vmake approach:

    Identify disks in disk group dg15 that have enough

    free space to create a 13 GB subdisk:# vxdg -g dg1 free

    DISK DEVICE TAG OFFSET LENGTH FLAGS

    disk1 c1t0d0s2 c1t0d0 35302304 61256 -

    disk2 c1t1d0s2 c1t1d0 35302304 61256 -

    The LENGTH column displays the number of free sectors on the disk (each sector is 512bytes).

    Create the subdisks:

    Syntax:

    # vxmake sd subdisk diskname,offset,length

    Plex one:# vxmake -g dg1 sd sub-01 disk1,0,1g

    # vxmake -g dg1 sd sub-02 disk2,0,1g

  • 7/30/2019 VERITAS Volumanager Cheat Sheet

    3/5

    Create the three plexes and associate the subdisks

    with them.

    Syntax:

    # vxmake plex plex sd=subdisk1[,subdisk2,...]

    Plex one named plex-01:

    # vxmake -g dg15 plex plex-01 sd=sub-01,sub-02

    Create the volume consisting of the plex.

    Creating volume vol-01 composed of plexe plex-01

    # vxmake -g -U vol=Plex1[,Plex2,...]

    -U

    fsgen - filesystems

    gen - raw volumes

    raid - supports raid5

    root - suuports root filesystems for booting

    swap - performs no recovery on startup

    relayout - used temporary for disk relayout operations

    # vxmake -g dg15 -U fsgen vol vol-01 plex=Plex1

    Initialize the volume.

    # vxvol start vol-01

    Vxassist Approach:

    # vxassist make layout=[stripe-mirror|concat-mirror|mirror-

    concat|mirror-stripe]

    #vxassist -g make

    Dynamic LUN expansion:

    Current Size of volume:

    vxprint -g -u

    Extend file system:

    #vxassist -g growby

    #vxassist -g growto

    # vxassist -g maxgrow

  • 7/30/2019 VERITAS Volumanager Cheat Sheet

    4/5

    Removal of the disk from system:

    Remove Disk:

    OS disk VS Veritas disk:

    # vxdisk -e list

    Identify the dg name from the disk:

    #vxdisk list

    Find all volumes in the dg:

    #vxprint -g -u

    Stop all volumes in the dg run the same one by one for

    volume:

    #vxvol -g stop

    Remove the volume Double check the right one or data

    will be lost:

    #vxassist -g remove volume

    Remove a particular disk

    #vxdg -g rmdisk

    Destroy Disk Group:#vxdg destroy

    Remove disk form Veritas Control

    #vxdisk rm

    Depot a group:

    vxdg deport

    Import group (clear any flags):

    vxdg import -C

  • 7/30/2019 VERITAS Volumanager Cheat Sheet

    5/5

    Regenerating persistent device names:

    # vxdmpadm getsubpaths dmpnodename=disk_access_name

    # vxdisk list disk_access_name

    Remove the file that contains the existing persistent device name database:

    # rm /etc/vx/disk.info

    Restart the VxVM configuration demon:# vxconfigd -k

    This regenerates the persistent name database