VXVM-8 (Volume –Disk Removal)
What we will learn
in Next Few Pages,
·
Online
remove disks from volume
Well, I have a
volume of 3g and used only 200mb, and I know that it is not going to cross
400-500m ever.
So want to remove
some disks and use somewhere else.
root@pr-01:>/# df
-kh /test-vol/
Filesystem size used
avail capacity Mounted on
/dev/vx/dsk/mydg/myvol-1
2.7G 119M
2.4G 5% /test-vol
root@pr-01:>/#
vxprint -htq -uh
Disk group: mydg
dg mydg default default
14000 1411625739.18.pr-01
dm d2 c2t2d0s2 auto
32.87m 923.00m -
dm d3 c2t3d0s2 auto
32.87m 923.00m -
dm d4 c2t4d0s2 auto
32.87m 923.00m -
v myvol-1
- ENABLED ACTIVE
2.70g SELECT -
fsgen
pl myvol-1-01 myvol-1
ENABLED ACTIVE 2.70g
CONCAT - RW
sd d2-01 myvol-1-01 d2
0.00 923.00m 0.00
c2t2d0 ENA
sd d3-01 myvol-1-01 d3
0.00 923.00m 923.00m
c2t3d0 ENA
sd d4-01 myvol-1-01 d4
0.00 923.00m 1.80g
c2t4d0 ENA
well… all good,
But I don’t know
which disk has data and which are free,
root@pr-01:>/#
vxprint -g mydg -F '%sdnum' d2
1
root@pr-01:>/#
vxprint -g mydg -F '%sdnum' d3
1
root@pr-01:>/#
vxprint -g mydg -F '%sdnum' d4
1
Great… all o/p is 1
means every disk has data
NOW… squeeze /
adjust data in 1 disk and let’s free 2 disks
root@pr-01:>/#
vxresize -g mydg myvol-1 800M alloc=d3,d4
alloc=d3,d4 means
remove data from these disks and adjust to another available disk in that
volume.
Now, Check the data
status
root@pr-01:>/#
vxprint -g mydg -F '%sdnum' d2
1
root@pr-01:>/#
vxprint -g mydg -F '%sdnum' d3
0
root@pr-01:>/#
vxprint -g mydg -F '%sdnum' d4
0
Well… it is adjusted
in d2, d3 & d4 are free to remove
root@pr-01:>/#
vxdg -g mydg rmdisk d3
root@pr-01:>/#
vxdg -g mydg rmdisk d4
root@pr-01:>/#
vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 auto:none - - online invalid
c2t2d0s2 auto:sliced d2 mydg online
c2t3d0s2 auto:sliced - - online
c2t4d0s2 auto:sliced - - online
root@pr-01:>/#
vxprint -htq -uh
Disk group: mydg
dg mydg default default
14000 1411625739.18.pr-01
dm d2 c2t2d0s2 auto
32.87m 923.00m -
v myvol-1
- ENABLED ACTIVE
800.00m SELECT -
fsgen
pl myvol-1-01 myvol-1
ENABLED ACTIVE 800.00m
CONCAT - RW
sd d2-01 myvol-1-01 d2
0.00 800.00m 0.00
c2t2d0 ENA
No comments:
Post a Comment