Вы находитесь на странице: 1из 5

VXVM - rmdisk and vxdg init - examples

2009 - The whole year i am in dubai. No much career advance. but got chance to h
andle HP XP20K storage which is equivalent to HDS-9900.
Recession time no advice going to work for any guys. Stick to some job for survi
val thats all I can say.
=======================================================================
VXVM: How to find Free disks(Luns)/ unused disks availabel in a SAN environment
and remove them from one host and allocate them to other host.
In this below example, There are few unused( or decommissioned) disk available i
n HOST22, those disks are been removed from that DG (10gtestsbdg) and allocated
to HOST34 by creating new DG JSKsbdg
Storage: Hitachi AMS-1000
host22:
10gtestsbdg free disks
site5-ams1000-2-1008-RG03
268096 site5-ams1000-2-1009-RG03
268096 site5-ams1000-2-1010-RG03
268096 site5-ams1000-2-1011-RG03
268096 site5-ams1000-2-1012-RG03
268096 site5-ams1000-2-1013-RG03
268096 site5-ams1000-2-1014-RG03
268096 site5-ams1000-2-1015-RG03
268096 -

c3t50060E801002A5E7d240s2 c3t50060E801002A5E7d240 0 71
c3t50060E801002A5E7d241s2 c3t50060E801002A5E7d241 0 71
c3t50060E801002A5E7d242s2 c3t50060E801002A5E7d242 0 71
c3t50060E801002A5E7d243s2 c3t50060E801002A5E7d243 0 71
c3t50060E801002A5E7d244s2 c3t50060E801002A5E7d244 0 71
c3t50060E801002A5E7d245s2 c3t50060E801002A5E7d245 0 71
c3t50060E801002A5E7d246s2 c3t50060E801002A5E7d246 0 71
c3t50060E801002A5E7d247s2 c3t50060E801002A5E7d247 0 71

site5-ams1000-2-1016-RG03 c3t50060E801002A5E7d248s2 c3t50060E801002A5E7d248 0 71


268096 site5-ams1000-2-1017-RG03 c3t50060E801002A5E7d249s2 c3t50060E801002A5E7d249 0 71
268096 site5-ams1000-2-1018-RG03 c3t50060E801002A5E7d250s2 c3t50060E801002A5E7d250 0 71
268096 site5-ams1000-2-1019-RG03 c3t50060E801002A5E7d251s2 c3t50060E801002A5E7d251 0 71
268096 site5-ams1000-2-1020-RG03 c3t50060E801002A5E7d252s2 c3t50060E801002A5E7d252 0 71
268096 site5-ams1000-2-1021-RG03 c3t50060E801002A5E7d253s2 c3t50060E801002A5E7d253 0 71
268096 site5-ams1000-2-1022-RG03 c3t50060E801002A5E7d254s2 c3t50060E801002A5E7d254 0 71
268096 site5-ams1000-2-1023-RG03 c3t50060E801002A5E7d255s2 c3t50060E801002A5E7d255 0 71
268096 @HOST34

c2t36d240s2 auto:cdsdisk - (10gtestsbdg) online


c2t36d241s2 auto:cdsdisk - (10gtestsbdg) online
c2t36d242s2 auto:cdsdisk - (10gtestsbdg) online
c2t36d243s2 auto:cdsdisk - (10gtestsbdg) online
c2t36d244s2 auto:cdsdisk - (10gtestsbdg) online
c2t36d245s2 auto:cdsdisk - (10gtestsbdg) online
c2t36d246s2 auto:cdsdisk - (10gtestsbdg) online
c2t36d247s2 auto:cdsdisk - (10gtestsbdg) online
c2t36d248s2 auto:cdsdisk - (10gtestsbdg) online
c2t36d249s2 auto:cdsdisk - (10gtestsbdg) online
c2t36d250s2 auto:cdsdisk - (10gtestsbdg) online
c2t36d251s2 auto:cdsdisk - (10gtestsbdg) online
c2t36d252s2 auto:cdsdisk - (10gtestsbdg) online
c2t36d253s2 auto:cdsdisk - (10gtestsbdg) online
c2t36d254s2 auto:cdsdisk - (10gtestsbdg) online
c2t36d255s2 auto:cdsdisk - (10gtestsbdg) online
HOST34# vxdisk list c2t36d255s2
inqraid -CLI -fx
DEVICE_FILE PORT SERIAL LDEV CTG H/M/12 SSID R:Group PRODUCT_ID
c2t36d255s2 CL2-D 77010846 3FF - s/s/ss 0000 5:03-00 DF600F
c2t36d255s2 - - - - - - - c2t36d255s2 CL2-D 77010846 3FF - s/s/ss 0000 5:03-00 DF600F
c3t32d255s2 CL1-D 77010846 3FF - s/s/ss 0000 5:03-00 DF600F
to HOST34 for JSK@HOST34 new DB..
root@HOST22 # vxprint -vht -g 10gtestsbdg
grep site5-ams1000-2-1007-RG03
sd site5-ams1000-2-1007-RG03-01 data24-01 site5-ams1000-2-1007-RG03 0 71184896 3
/0 c3t50060E801002A5E7d239 ENA
LOGIN:
HOST22: # vxdg -g 10gtestsbdg rmdisk site5-ams1000-2-1008-RG03 site5-ams1000-2-1
009-RG03 site5-ams1000-2-1010-RG03
site5-ams1000-2-1011-RG03 site5-ams1000-2-1012 site5-ams1000-2-1013-RG03 site5-a
ms1000-2-1014-RG03 site5-ams1000-2-1015-RG03

Creating new DG:


HOST34:#vxdg init JSKsbdg site5-ams1000-2-1008-RG03=c2t36d240s2
HOST34:# vxdg -g JSKsbdg adddisk site5-ams1000-2-1009-RG03=c2t36d241s2
site5-ams1000-2-1010-RG03=c2t36d242s2
site5-ams1000-2-1011-RG03=c2t36d243s2
site5-ams1000-2-1012-RG03=c2t36d244s2
site5-ams1000-2-1013-RG03=c2t36d245s2
site5-ams1000-2-1014-RG03=c2t36d246s2
site5-ams1000-2-1015-RG03=c2t36d247s2
Creating Striped Volumes (4 disk stripe) named data01 and data02
#vxassist -g JSKsbdg make data01 284774400 layout=stripe site5-ams1000-2-1008-RG
03 site5-ams1000-2-1009-RG03 site5-ams1000-2-1010-RG03 site5-ams1000-2-1011-RG03
#vxassist -g JSKsbdg make data02 284774400 layout=stripe site5-ams1000-2-1012-RG
03 site5-ams1000-2-1013-RG03 site5-ams1000-2-1014-RG03 site5-ams1000-2-1015-RG03
Creating File systems
mkfs -F vxfs -o largefiles,bsize=8192 /dev/vx/rdsk/JSKsbdg/data01
mkfs -F vxfs -o largefiles,bsize=8192 /dev/vx/rdsk/JSKsbdg/data02
Creating Directories, mounting and changing permissions:
mkdir /oracle/JSK/data01
mkdir /oracle/JSK/data02
mount -F vxfs -o largefiles,log /dev/vx/dsk/JSKsbdg/data01 /oracle/JSK/data01
mount -F vxfs -o largefiles,log /dev/vx/dsk/JSKsbdg/data02 /oracle/JSK/data02
chown oracle:dba /oracle/JSK/data01
chown oracle:dba /oracle/JSK/data02
cp -p /etc/vfstab /etc/vfstab.23-oct-09
After this change put the entries in /etc/vfstab
---------------------------------------------------------------------------------------------------------VXVM - vxprint disk in NODEVICE state, vxdisk list - disk is in "failed" state
Solution :
First check whether vxreattach is possible.
vxreattach Cc c#t#d#s#
Example vxreattach -c c2t29d10s2

This will hopefully show what the disk_name used to be.


If so then run (re-attach in background).
vxreattach -br c2t29d9s2
Find the plexes that are in the DISABLED RECOVER state.
Here we consider that the volume data01 is disabled and that the plex data-01 is
in DISABLED
For all DISABLED RECOVER plexes, perform the commands:
# vxmend -g JSKdg -o force off data01-01
# vxmend on data01-01
# vxmend fix clean data01-01
# vxvol start data01
fsck the volume before mounting.
Reference: http://www.symantec.com/business/support/index?page=content&id=TECH85
01
Posted by satheesh at 10:27 PM 2 comments Links to this post
Sunday, July 5, 2009
---------------VXVM - How to extend Volumes using vxresize and vxassist
1. Verify free space on underlying device:
# vxdg -g datadg free
from the output you will see disks length starts from "0", those disks are free.
# vxassist -g datadg maxsize layout=concat or layout=stripe
# vxassist -g datadg maxgrow datavol
2. Expand the volume using vxassist:
example: #vxassist -g testdg growto datavol 4096000
3. Expand the file system using fsadm:
# fsadm -F vxfs -b "newsize" -r /dev/vx/rdsk/testdg/datavol /datavol
4. Verify that the file system was resized by using df:
# df -k /datavol
The volume can be increased using vxresize command also,
For vxresize command "fsadm" is not required.

in the below example the volume "datavol" is increased from 2GB to 4Gb.
NOTE: you need to mention the total size which the volume need to be grown.
First determine the free space available:
# vxassist -g datadg maxsize layout=concat or layout=stripe
# vxassist -g datadg maxgrow datavol
Determine the filesystem type:
fstyp /datamount or fstyp -v /dev/vx/rdsk/testdg/datavol
# vxresize -b -g testdg datavol 4G or
vxresize -g testdg datavol +2g
Check with df -h or df -k to check if the FS is grown.
------------------

Вам также может понравиться