Sei sulla pagina 1di 5

VXVM Volume Operations

VxVM builds volume using virtual objects of VM disks, disk groups, subdisks, and plexes.These
virtual objects can organized easily using vxassist command to create new volume.Here we are
going to see about how to create a new volumes with different layout and volume redundancy.In
the end of the article we see how to destroy the volume in details. Here the assumtion is we
have configured diskgroup with the name of UXDG.
bash-3.00# vxdg list
NAME STATE ID
UXDG enabled,cds 1364022395.37.sfos
1.Creating new volume
Syntax:
#vxassist -g diskgroup make vol_name size layout=format disk-name

1.1 Concatenation volume:

Concatenation volume maps the data in a linear manner using one or more subdisks in a single
plex.No redundancy and single drive failure destroys the entire volume.
# vxassist -g UXDG make uxoravol1 50M
Note:If we didn't specify the format,by default VXVM will make the volume as concatenation.
To display volume details,
# vxprint -hvt
Disk group: UXDG
v uxoravol1 - ENABLED ACTIVE 102400 SELECT - fsgen
pl uxoravol1-01 uxoravol1 ENABLED ACTIVE 102400 CONCAT - RW
sd UXDISK1-01 uxoravol1-01 UXDISK1 0 102400 0 disk_0 ENA

v - volume - uxoravol1
pl - Plex - uxoravol1-01
sd - Subdisk - UXDISK1-01

As per the above output,subdisk(UXDISK1-01) has been created using UXDISK1 and plex(uxoravol1-
01) is sitting on top of subdisk. On top of the plex virtual layer, volume is placed. These virtual
layer provides more flexible on volume level operation.

If you want to make the volume using the specific disk,


bash-3.00# vxassist -g UXDG make uxoravol1 50M UXDISK1

Once you have created the volume,you can use mkfs to create vxfs filesystem.To create VXFS
filesystem
# mkfs -F vxfs /dev/vx/rdsk/UXDG/uxoravol1
version 9 layout
102400 sectors, 51200 blocks of size 1024, log size 1024 blocks
rcq size 1024 blocks
largefiles supported
To create a new mountpoint and mount,
# mkdir /uxoravol1
# mount -F vxfs /dev/vx/dsk/UXDG/uxoravol1 /uxoravol1
# df -h /uxoravol1
Filesystem size used avail capacity Mounted on
/dev/vx/dsk/UXDG/uxoravol1 50M 3.1M 44M 7% /uxoravol1

1.2 Striped volume:

Striping maps data to two or more physical disks for high performance volumes.In this volume two
or more subdisks which are coming from two or more physical disks forms stripped
plex.No redundancy and single drive failure destroys the entire volume.
#vxassist -g UXDG make urstripe 100M UXDISK1 UXDISK2 UXDISK3 layout=stripe stripeunit=32k
bash-3.00# vxprint -hvt
Disk group: UXDG
v urstripe - ENABLED ACTIVE 204800 SELECT urstripe-01 fsgen
pl urstripe-01 urstripe ENABLED ACTIVE 204864 STRIPE 3/64 RW
sd UXDISK1-01 urstripe-01 UXDISK1 0 68288 0/0 disk_0 ENA
sd UXDISK2-01 urstripe-01 UXDISK2 0 68288 1/0 disk_1 ENA
sd UXDISK3-01 urstripe-01 UXDISK3 0 68288 2/0 disk_4 ENA
To create a filesystem and mount it
# mkfs -F vxfs /dev/vx/rdsk/UXDG/urstripe
version 9 layout 204800 sectors, 102400 blocks of size 1024, log size 1024 blocks rcq size
1024 blocks largefiles supported

bash-3.00# mkdir /stripeoravol1

# mount -F vxfs /dev/vx/dsk/UXDG/urstripe /stripeoravol1


# df -h /stripeoravol1
Filesystem size used avail capacity Mounted on
/dev/vx/dsk/UXDG/urstripe 100M 3.1M 91M 4% /stripeoravol1

1.3 Mirror volume:

In mirror volume, data is written identically in to two plexs which were formed with two or more
subdisks.
# vxassist -g UXDG make uxvol2 50M layout=mirror
# vxprint -hvt
Disk group: UXDG
v uxvol2 - ENABLED ACTIVE 102400 SELECT - fsgen
pl uxvol2-01 uxvol2 ENABLED ACTIVE 102400 CONCAT - RW
sd UXDISK2-01 uxvol2-01 UXDISK1 0 102400 0 disk_0 ENA
pl uxvol2-02 uxvol2 ENABLED ACTIVE 102400 CONCAT - RW
sd UXDISK2-02 uxvol2-02 UXDISK2 0 102400 0 disk_1 ENA

Note:
Question may raise how to determine the mirrored volume in VXVM ?
Its so simple. If the volume constructed in the above manner with two or more plex is mirrored
volume.
volume with two plex one way mirror
volume with three plex two way mirror.

1.4 Mirrored-stripe or RAID-0+1(stripping + mirroring)

In this volume,striped plex will be mirrored with another striped plex.

Thanks to www.symantec.com
# vxassist -g UXDG make msvol 50M layout=mirror-stripe
# vxprint -hvt
Disk group: UXDG
v msvol - ENABLED ACTIVE 102400 SELECT - fsgen
pl msvol-01 msvol ENABLED ACTIVE10240 STRIPE2/128 RW
sd UXDISK1-01 msvol-01 UXDISK1 0 51200 0/0 disk_0 ENA
sd UXDISK2-01 msvol-01 UXDISK2 0 51200 1/0 disk_1 ENA
pl msvol-02 msvol ENABLED ACTIVE102400 STRIPE2/128 RW
sd UXDISK3-01 msvol-02 UXDISK3 0 51200 0/0 disk_4 ENA
sd UXDISK4-01 msvol-02 UXDISK4 0 51200 1/0 disk_5 ENA
Like other volumes,you can create filesystem and mount it .

1.5 Striped-mirror or RAID- 1+0 (mirroring +stripping)- Layered volume

In this volume,two mirrored volume will form form a two sub-volumes.These sub-volumes will
from striped plex.Its an example of layered volume.
Thanks to www.symantec.com
# vxassist -g UXDG make smvol 50M layout=stripe-mirror

# vxprint -hvt
Disk group: UXDG

v smvol - ENABLED ACTIVE 102400 SELECT smvol-03 fsgen


pl smvol-03 smvol ENABLED ACTIVE 102400 STRIPE 2/128 RW
sv smvol-S01 smvol-03 smvol-L01 1 51200 0/0 2/2 ENA
sv smvol-S02 smvol-03 smvol-L02 1 51200 1/0 2/2 ENA

v smvol-L01 - ENABLED ACTIVE 51200 SELECT - fsgen


pl smvol-P01 smvol-L01 ENABLED ACTIVE 51200 CONCAT - RW
sd UXDISK1-02 smvol-P01 UXDISK1 0 51200 0 disk_0 ENA
pl smvol-P02 smvol-L01 ENABLED ACTIVE 51200 CONCAT - RW
sd UXDISK3-02 smvol-P02 UXDISK3 0 51200 0 disk_4 ENA
v smvol-L02 - ENABLED ACTIVE 51200 SELECT - fsgen
pl smvol-P03 smvol-L02 ENABLED ACTIVE 51200 CONCAT - RW
sd UXDISK2-02 smvol-P03 UXDISK2 0 51200 0 disk_1 ENA
pl smvol-P04 smvol-L02 ENABLED ACTIVE 51200 CONCAT - RW
sd UXDISK4-02 smvol-P04 UXDISK4 0 51200 0 disk_5 ENA

1.6 RAID-5 (striping with parity)

It provide traditional RAID-5 functionality. It provides the data redundancy using distributed
parity.

bash-3.00# vxassist -g UXDG make smvol 50M layout=raid5


bash-3.00# vxprint -hvt
Disk group: UXDG
v smvol - ENABLED ACTIVE 102432 RAID - raid5
pl smvol-01 smvol ENABLED ACTIVE 102432 RAID 4/32 RW
sd UXDISK1-01 smvol-01 UXDISK1 0 34144 0/0 disk_0 ENA
sd UXDISK2-01 smvol-01 UXDISK2 0 34144 1/0 disk_1 ENA
sd UXDISK3-01 smvol-01 UXDISK3 0 34144 2/0 disk_4 ENA
sd UXDISK4-01 smvol-01 UXDISK4 0 34144 3/0 disk_5 ENA
pl smvol-02 smvol ENABLED LOG 3840 CONCAT - RW
sd UXDISK5-01 smvol-02 UXDISK5 0 3840 0 disk_6 ENA

2.Removing volume.

1. Un-mount the volume.


2. Use vxassist to delete the volume.
# df -h /smvol
Filesystem size used avail capacity Mounted on
/dev/vx/dsk/UXDG/smvol 50M 3.1M 44M 7% /smvol

VXVM protects the accidental of removing the open volume.


bash-3.00# vxassist -g UXDG remove volume smvol
VxVM vxassist ERROR V-5-1-1242 Volume smvol is opened, cannot remove.
bash-3.00# umount /smvol
bash-3.00# vxassist -g UXDG remove volume smvol
bash-3.00# vxprint -hvt
bash-3.00#

Potrebbero piacerti anche