VXVM-5 (Volume’s)
What we will learn in
Next Few Pages,
1. Volumes Basics
2. Volume mount
3. Volume removal
4. Concatenated / striped volumes creation
Vxvm builds volumes
using virtual objects of VM disks, Dg’s, Subdisks & Plexes
It’s Mirage… it doesn’t exists
physically, but used everywhere
A volume is a virtual disk device that
appears to applications, databases, and files systems like a physical disk
device, but does not have the physical limitations of a physical disk device.
Subdisks: it’s like normal partition we do in UFS, it
won’t span other disk, and Public region of disk in a Dg can be divided in to
one or more subdisks.
Plexes: vxvm uses subdisks to build plexes, Plex
consists of one or more subdisks located on one / more disk drives.
SO the
hierarchy is …
Phy
Disk > VM Disk > Subdisks > Plex > Volume >
Dg
A volume consists of two or more plexes, by definition a volume with
two plexes is mirrored.
OK…
Let’s create Volumes,
#vxassist –g <Dg Name> make <vol-name> size layout=format
diskname
CONCATENATED VOL’s
root@pr-01:>/# vxassist -g testdg2 make convol 100m
root@pr-01:>/# vxprint -htq convol
Disk group: testdg2
v convol - ENABLED ACTIVE
204800 SELECT -
fsgen
pl convol-01 convol ENABLED
ACTIVE 204800 CONCAT
- RW
sd test-disk3-01 convol-01
test-disk3 0 204800 0
c2t3d0 ENA
vxprint –htq will give u complete details about Dg’s / Volumes /
Subdisks /plex
here
v is
volume i.e. convol
pl one
plex convol-01
sd is
subdisk whose name is test-disk3-01 under plex convol-01 , the disk name on
which it made is test-disk3 and the device name is c2t3d0
If want
to create volume on particular disk, then we can assign it too
root@pr-01:>/#
vxassist -g testdg2 make convolx 100m test-disk4
root@pr-01:>/#
vxprint -htq convolx
Disk
group: testdg2
v convolx
- ENABLED ACTIVE
204800 SELECT -
fsgen
pl
convolx-01 convolx ENABLED
ACTIVE 204800 CONCAT
- RW
sd
test-disk4-01 convolx-01 test-disk4
0 204800 0
c2t4d0 ENA
Well…
noticed one thing that we did not given any layout, Means by default
concatenated volume will create if nothing specified.
Now I
don’t want these volumes & need to remove,
root@pr-01:>/#
vxassist -g testdg2 remove volume convol
root@pr-01:>/#
vxassist -g testdg2 remove volume convolx
OK… So
what if we create a volume and mount it
for use,
root@pr-01:>/#
vxassist -g testdg2 make testvol 100m
root@pr-01:>/#
mkdir /testvol-1
root@pr-01:>/#
mkfs -F vxfs /dev/vx/rdsk/testdg2/testvol
version 9 layout
204800 sectors, 102400 blocks of size 1024,
log size 1024 blocks
rcq size 1024 blocks
largefiles supported
root@pr-01:>/#
mount -F vxfs /dev/vx/dsk/testdg2/testvol /testvol-1/
root@pr-01:>/#
cd /testvol-1/
root@pr-01:>/testvol-1#
mkfile 10m file1
root@pr-01:>/testvol-1#
ls -l
total
20494
-rw------T 1 root
root 10485760 Sep 23 18:05
file1
drwxr-xr-x 2 root
root 96 Sep 23 18:04
lost+found
REMOVE A VOLUME,
root@pr-01:>/testvol-1#
cd /
root@pr-01:>/#
umount /testvol-1/
root@pr-01:>/#
vxassist -g testdg2 remove volume testvol
Now… all
good
Well…
let’s create
STRIPED VOLUME,
root@pr-01:>/#
vxassist -g testdg2 make st-vol 100m layout=striped
root@pr-01:>/#
vxprint -htq st-vol
Disk
group: testdg2
v st-vol
- ENABLED ACTIVE
204800 SELECT st-vol-01 fsgen
pl
st-vol-01 st-vol ENABLED
ACTIVE 204800 STRIPE
2/128 RW
sd
test-disk3-01 st-vol-01 test-disk3
0 102400 0/0
c2t3d0 ENA
sd
test-disk4-01 st-vol-01 test-disk4
0 102400 1/0
c2t4d0 ENA
root@pr-01:>/#
vxassist -g testdg2 maxsize
Maximum
volume size: 3575808 (1746Mb)
Well…
it went on both disks, Great
For
striping at least 2 disks are required…
MIRRORED VOLUME,
RAID 1,
root@pr-01:>/#
vxassist -g testdg2 make mr-vol 200m
layout=mirror
root@pr-01:>/#
vxprint -htq mr-vol
Disk
group: testdg2
v mr-vol
- ENABLED ACTIVE
409600 SELECT -
fsgen
pl
mr-vol-01 mr-vol ENABLED
ACTIVE 409600 CONCAT
- RW
sd
test-disk3-01 mr-vol-01 test-disk3
0 409600 0
c2t3d0 ENA
pl
mr-vol-02 mr-vol ENABLED
ACTIVE 409600 CONCAT
- RW
Here 1st the striping is done, then the striped set are
mirrored, As we can see in the diagram
In the
language of Veritas it is called MIRROR-STRIPE
Don’t
know why it is called opposite of the name
VxVM vxassist ERROR V-5-1-1065 Too few disks for striping; at least 4
disks are needed
Oops…
root@pr-01:>/#
vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 auto:none - - online invalid
c2t2d0s2 auto:sliced test-disk2 test-dg1
online
c2t3d0s2 auto:sliced test-disk3 testdg2
online
c2t4d0s2 auto:sliced test-disk4 testdg2
online
c2t5d0s2 auto:sliced - - online
c2t6d0s2 auto:none - - online invalid
root@pr-01:>/#
vxdg -g testdg2 adddisk test-disk5=c2t5d0
root@pr-01:>/#
vxdg -g testdg2 adddisk test-disk6=c2t6d0
VxVM
vxdg ERROR V-5-1-10127 associating disk-media test-disk6 with c2t6d0s2:
Disk private region contents are
invalid
root@pr-01:>/#
vxdisksetup -i c2t6d0 format=sliced
root@pr-01:>/#
vxdg -g testdg2 adddisk test-disk6=c2t6d0
root@pr-01:>/#
vxassist -g testdg2 make 0+1vol 500m layout=mirror-stripe
root@pr-01:>/#
vxprint -htq 0+1vol
Disk
group: testdg2
v 0+1vol
- ENABLED ACTIVE
1024000 SELECT -
fsgen
pl
0+1vol-01 0+1vol ENABLED
ACTIVE 1024000 STRIPE
2/128 RW
sd
test-disk5-01 0+1vol-01 test-disk5
0 512000 0/0
c2t5d0 ENA
sd
test-disk6-01 0+1vol-01 test-disk6
0 512000 1/0
c2t6d0 ENA
pl
0+1vol-02 0+1vol ENABLED
ACTIVE 1024000 STRIPE
2/128 RW
sd
test-disk3-02 0+1vol-02 test-disk3
409600 512000 0/0 c2t3d0
ENA
sd
test-disk4-02 0+1vol-02 test-disk4
409600 512000 1/0 c2t4d0
ENA
See…
the o/p
test-disk5-01 test-disk6-01 test-disk3 test-disk4-02 S.DISK’s
c2t5d0 c2t6d0
c2t3d0 c2t4d0
PHY DISKs
PHY DISKs
This
would be diagram for the 0+1 Operation.
RAID 1+0,
Veritas
call it stripe-mirror (just opposite of name)
root@pr-01:>/#
vxassist -g testdg2 remove volume 0+1vol
root@pr-01:>/#
vxassist -g testdg2 make 1+0vol maxsize layout=stripe-mirror
root@pr-01:>/#
vxprint -htq 1+0vol
v 1+0vol
- ENABLED ACTIVE
2961408 SELECT 1+0vol-03 fsgen
pl
1+0vol-03 1+0vol ENABLED
ACTIVE 2961408 STRIPE
2/128 RW
sv
1+0vol-S01 1+0vol-03 1+0vol-L01 1 1480704
0/0 2/2 ENA
sv
1+0vol-S02 1+0vol-03 1+0vol-L02 1 1480704
1/0 2/2 ENA
v 1+0vol-L01
- ENABLED ACTIVE
1480704 SELECT -
fsgen
pl
1+0vol-P01 1+0vol-L01 ENABLED
ACTIVE 1480704 CONCAT
- RW
sd
test-disk5-02 1+0vol-P01 test-disk5
0 1480704 0
c2t5d0 ENA
pl
1+0vol-P02 1+0vol-L01 ENABLED
ACTIVE 1480704 CONCAT
- RW
sd
test-disk3-03 1+0vol-P02 test-disk3
409600 1480704 0 c2t3d0 ENA
v 1+0vol-L02
- ENABLED ACTIVE
1480704 SELECT -
fsgen
pl
1+0vol-P03 1+0vol-L02 ENABLED
ACTIVE 1480704 CONCAT
- RW
sd
test-disk6-02 1+0vol-P03 test-disk6
0 1480704 0
c2t6d0 ENA
pl
1+0vol-P04 1+0vol-L02 ENABLED
ACTIVE 1480704 CONCAT
- RW
sd
test-disk4-03 1+0vol-P04 test-disk4
409600 1480704 0 c2t4d0 ENA
wooooooooo……
what happened to o/p ????
RAID 5,
root@pr-01:>/#
vxassist -g testdg2 make raid5-vol 500m layout=raid5
root@pr-01:>/#
vxprint –htq
v raid5-vol
- ENABLED ACTIVE
1024000 RAID -
raid5
pl
raid5-vol-01 raid5-vol ENABLED ACTIVE
1024000 RAID 3/32
RW
sd
test-disk5-01 raid5-vol-01 test-disk5 0
512000 0/0 c2t5d0
ENA
sd
test-disk6-01 raid5-vol-01 test-disk6 0
512000 1/0 c2t6d0
ENA
sd
test-disk3-02 raid5-vol-01 test-disk3 409600 512000 2/0
c2t3d0 ENA
pl
raid5-vol-02 raid5-vol ENABLED LOG
2880 CONCAT -
RW
sd
test-disk4-02 raid5-vol-02 test-disk4 409600 2880 0
c2t4d0 ENA
No comments:
Post a Comment