VXVM-9 (Manual)
What we will learn
in Next Few Pages,
·
Manually create Concat Volume
using vxmake
·
Manually create STRIPE Volume using vxmake
Well, njoyed till creating Dg’s/ Volume’s
and the different layouts.
Ever thought who made the Subdisks &
Plexes for us?
NO?
Never Mind… I also never thought about
it. But there is also a unusual way to create all these,
Let’s have a try…
Steps to Follow,
1. Initialize disk
2. Create Dg
3. Assign disk under Dg
4. Create subdisks
5. Create Plexes
6. Associate plexes with subdisks [actually it is not necessary /skip
this]
7. Create volume
8. Start volume
9. Create FS on volume
10. Mount the FS
STEP 1,
Initialize disk
root@pr-01:>/#
vxdisksetup -i c2t2d0
root@pr-01:>/#
vxdisksetup -i c2t3d0
root@pr-01:>/#
vxdisksetup -i c2t4d0
root@pr-01:>/#
vxdisksetup -i c2t5d0
STEP 2,
Create Dg
root@pr-01:>/#
vxdg init mdg cds=off d2=c2t2d0 d3=c2t3d0 d4=c2t4d0 d5=c2t5d0
STEP 3,
Assign disk under Dg ( this is done in above step)
STEP 4,
Create subdisks
root@pr-01:>/# vxmake -g mdg sd d2-01 d2,0,1900032
root@pr-01:>/# vxmake -g mdg sd d3-01 d3,0,1900032
root@pr-01:>/# vxmake -g mdg sd d4-01 d4,0,1900032
root@pr-01:>/# vxmake -g mdg sd d5-01 d5,0,1900032
Well, subdisks are created but how?
Vxmake command
-g mdg Dg “mdg”
Sd is subdisk
D2-01 D2
is device name from which d2-01 subdisk would be create
D2,0, 1900032 d2 is device name,0 is starting and 1900032 is end (size)
So lets take an example to explain it
more,
Suppose u have a disk of 1g and u want 2
subdisks from it
root@pr-01:>/#
vxprint -htq
Disk group: mdg
dg mdg default default
15000 1411643037.26.pr-01
dm d2 c2t2d0s2 auto
65536 1900032 -
root@pr-01:>/#
vxprint -htq -uh
Disk group: mdg
dg mdg default default
15000 1411643037.26.pr-01
dm d2 c2t2d0s2 auto
32.00m 927.75m -
I had taken that size from o/p of vxprint
–htq
It is in blocks, we need to convert it
in mb/gb for our understanding
1900032*512/1024/1024 = 927
We have to create 2 subdisks from d2
(suppose)
First
1900032/2 = 950016
950016*512/1024/1024 = 463
Ok so we can use this value, Lets create
root@pr-01:>/# vxmake -g mdg sd d2-01 d2,0,950016
root@pr-01:>/#
vxmake -g mdg sd d2-02 d2,950017,1900032
check, the bold one’s…
first sd is d2-01 and it is made from d2
will start from 0 and end at 950016
second sd is d2-02, made from d2 &
will start from 950017 & end at 190032
Now… Fine?
Ok let’s move…
STEP 5,
Create Plexes
root@pr-01:>/#
vxmake -g mdg plex datavol-01 sd=d2-01,d3-01,d4-01,d5-01
datavol-01 is the name of plex which
would be made from sd= d2-01,d3-01,d4-01,d5-01
STEP 6, [skip this step]
Associate plexes with subdisks
root@pr-01:>/# vxsd -g mdg assoc datavol-01 d2-01 d3-01 d4-01
d5-01
VxVM vxsd ERROR V-5-1-979 Subdisk d2-01 is already associated
#vxsd –g <Dg Name> assoc <plex name> <sd1>
<sd2> <sd3> …..
STEP 7,
Create Volume
root@pr-01:>/# vxmake -g mdg -U
fsgen vol myvol plex=datavol-01
-U = usage type i.e. “fsgen” here
Vol myvol vol name is myvol
#vxmake –g <Dg Name> -U <usage type> vol <vol name>
plex=<plex name>
root@pr-01:>/# vxprint -htq
Disk group: mdg
v myvol
- DISABLED EMPTY 7600128
ROUND - fsgen
pl datavol-01 myvol
DISABLED EMPTY 7600128 CONCAT
- RW
sd d2-01 datavol-01 d2
0 1900032 0
c2t2d0 ENA
sd d3-01 datavol-01 d3
0 1900032 1900032
c2t3d0 ENA
sd d4-01 datavol-01 d4
0 1900032 3800064
c2t4d0 ENA
sd d5-01 datavol-01 d5
0 1900032 5700096
c2t5d0 ENA
STEP 8,
Start Volume
root@pr-01:>/# vxvol -g mdg
start myvol
Let’s see what happen after starting the volume
root@pr-01:>/# vxprint -htq
Disk group: mdg
v myvol
- ENABLED ACTIVE
7600128 ROUND -
fsgen
pl datavol-01 myvol
ENABLED ACTIVE 7600128
CONCAT - RW
sd d2-01 datavol-01 d2
0 1900032 0
c2t2d0 ENA
sd d3-01 datavol-01 d3
0 1900032 1900032
c2t3d0 ENA
sd d4-01 datavol-01 d4
0 1900032 3800064
c2t4d0 ENA
sd d5-01 datavol-01 d5
0 1900032 5700096
c2t5d0 ENA
STEP 9,
Create FS on volume
root@pr-01:>/# mkfs -F vxfs
/dev/vx/rdsk/mdg/myvol
version 9 layout
7600128 sectors, 3800064
blocks of size 1024, log size 16384 blocks
rcq size 1024 blocks
largefiles supported
STEP 10,
Mount the FS
root@pr-01:>/# mount -F vxfs
/dev/vx/dsk/mdg/myvol /test-vol
root@pr-01:>/# mount -F vxfs
/dev/vx/dsk/mdg/myvol /test-vol
root@pr-01:>/# cd /test-vol
root@pr-01:>/test-vol# ls
lost+found
root@pr-01:>/test-vol# mkfile
10m f1
root@pr-01:>/test-vol# mkfile
10m f2
root@pr-01:>/test-vol# mkfile
10m f3
root@pr-01:>/test-vol# ls -l
total 61482
-rw------T 1 root root
10485760 Sep 25 17:13 f1
-rw------T 1 root root
10485760 Sep 25 17:13 f2
-rw------T 1 root root
10485760 Sep 25 17:13 f3
drwxr-xr-x 2 root root 96 Sep 25 17:11 lost+found
WELL DONE… we had manually created Volume and using it also but it
was default layout means concat volume.
STRIPE VOLUME
All steps are same as we did previous
DG,
root@pr-01:>/# vxdg init stdg
cds=off d2=c2t2d0 d3=c2t3d0 d4=c2t4d0 d5=c2t5d0
SUBDISK,
root@pr-01:>/# vxmake -g stdg
sd d2-01 d2,0,1900032
root@pr-01:>/# vxmake -g stdg
sd d3-01 d3,0,1900032
root@pr-01:>/# vxmake -g stdg
sd d4-01 d4,0,1900032
root@pr-01:>/# vxmake -g stdg
sd d5-01 d5,0,1900032
PLEX,
root@pr-01:>/# vxmake -g stdg
plex stvol-01 layout=stripe stwidth=64k sd=d2-01,d3-01,d4-01,d5-01
VOLUME,
root@pr-01:>/# vxmake -g stdg
-U fsgen vol stvol plex=stvol-01
START
VOLUME,
root@pr-01:>/#
vxvol -g stdg start stvol
CREATE
FS,
root@pr-01:>/#
mkfs -F vxfs /dev/vx/rdsk/stdg/stvol
version 9 layout
7600128 sectors, 3800064 blocks of size 1024, log size 16384 blocks
rcq size 1024 blocks
largefiles supported
MOUNT
FS,
root@pr-01:>/#
mount -F vxfs /dev/vx/dsk/stdg/stvol /test-vol/
No comments:
Post a Comment