You are on page 1of 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

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=<device>

Adding a new disk to VG:


vxdg g <group> adddisk disk=<device>

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 512

bytes).

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

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 <dgname> -U <type> vol=Plex1[,Plex2,...] -U <type> 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 <volume> <size> <disk> layout=[stripe-mirror|concat-mirror|mirrorconcat|mirror-stripe] #vxassist -g <group> make <vol> <size>

Dynamic LUN expansion:


Current Size of volume:
vxprint -g <dgname> -u

Extend file system:


#vxassist -g <diskgroup> growby <volume> <len_to_grow_by> #vxassist -g <diskgroup> growto <volume> <new_len> # vxassist -g <diskgroup> maxgrow <volume>

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 <dg name> -u

Stop all volumes in the dg run the same one by one for volume:
#vxvol -g <group> stop <volume>

Remove the volume Double check the right one or data will be lost:
#vxassist -g <group> remove volume <vol>

Remove a particular disk


#vxdg -g <group> rmdisk <diskname>

Destroy Disk Group:


#vxdg destroy <disk group>

Remove disk form Veritas Control


#vxdisk rm <device>

Depot a group:
vxdg deport <group>

Import group (clear any flags):


vxdg import -C <group>

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

You might also like