Sie sind auf Seite 1von 4

Ec:y wcy Ic grcw c VeriIc: vc|ume cnc fi|e :y:Iem

Ic :ee free :pcce in c ci:k grcup:


vxc::i:I -g ccIccg mcx:ize
cr
/u:r/:Lin/vxcg -g ccIccg free ] cwk '{SUM += $5} {prinI I"SUM/2/1024/1024 G8 Free"} ]
Ici| -1
Fi|e Sy:Iem Iype uf: cr vxf::
cf -n /fi|e/:y:Iem/cuIpuI
/fi|e/:y:Iem/cuIpuI : uf:
Ic ccc 7G Ic c vc|ume cnc fi|e :y:Iem:
/eIc/vx/Lin/vxre:ize -F uf: -g DlSKGFCUF VCLUMEN/ME +7g
/eIc/vx/Lin/vxre:ize -F vxf: -g DlSKGFCUF VCLUMEN/ME +7g
Excmp|e::
/eIc/vx/Lin/vxre:ize -F uf: -g ccIccg vc|01 +718m
/eIc/vx/Lin/vxre:ize -F uf: -g ccIccg vc|01 +7g
/eIc/vx/Lin/vxre:ize -F vxf: -g ccIccg vc|01 +7g


fsadm F vxfs |b newsize] |r rawdev] mount_point


1. verify free space on underlying device:

# vxdg g "datavol" free

2. Expand the volume using vxassist:

# vxassist g "datadg" growto "myvol" "newsize"
example: #vxassist g testdg growto datavol 1024000

. 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


Move a disk group to another system
1. Unmount and stop all volumes in the disk group on the first system:
# umoun1 1mn1d1
# vxvo1 - <d1skoup> s1opa11
2. Deport (disable all local access to) the disk group to be moved with this
command:
# vxd dcpo1 <d1skoup>
3. Import (enable local access to) the disk group and its disks from the second
system with:
# vxd 1mpo1 <d1skoup>
4. After the disk group is imported, start all volumes in the disk group with this
command:
# vxccovc - <d1skoup> -sb
The options here indicate that VERITAS Volume Manager will start all the
disabled volumes (-s) in the background (-b).
ow to check for/enable largefile support on vxfs
To check if largefiles are enabled:
# 1us111b1!s1vx!s1!sadm 1moun11po1n1
nolargefiles
Unlike ufs, you can enable vxfs largefile support on the fly with fsadm:
# 1us111b1!s1vx!s1!sadm -o 1ac!11cs 1moun11po1n1

ow to fsck a vxfs filesystem
vxfs contains a filesystem log that will vastly reduce the time required to fsck a
filesystem. When checking the filesystem using the command:
# !sck -F vx!s <pa1h_1o_aW_dcv1cc>
the log will be the only thing checked.
There are times that the log will check cleanly, but the filesystem is still dirty.
To check the filesystem directly, the following options need to be added to fsck:
# !sck -F vx!s -o no1o.!u11 <pa1h_1o_aW_dcv1cc>
The no1o option tells fsck to bypass the log and go directly to the filesystem.
The !u11 option tells !sck to check the entire filesystem. Using these options will
take much longer, but you will be able to !sck the filesystem directly.
isk space
There is no simple command to display the total amount of VxVM disk space
(i.e., the total size of all the public regions or the sum of the free and allocated
disk space under VxVM control).
Listed below are a few examples of how it is possible to use
the vxp1n1 and vxd1sk commands to find the amount of VxVM disk space:
1.) To find the total amount of VxVM disk space (free and used) in a particular
disk group, expressed in 512K blocks:
# vxp1n1 - namc_o!_d1sk_oup -dF "pub1cn" | aWk `C1h {s = 0) {s += S1)
hL {p1n1 s. "S1!K b1ocks")`
For the output in Gigabytes, use:
# vxp1n1 - namc_o!_d1sk_oup -dF "pub1cn" | aWk `C1h {s = 0) {s += S1)
hL {p1n1 s1!0971S!. "C")`
Henceforth all output will be in GigaBytes. Adjust the commands for blocks if
you wish.
2.) To find the total amount of VxVM disk space for all disk groups:
# vxp1n1 -ApqdF "pub1cn" | aWk `C1h {s = 0) {s += S1) hL {p1n1
s1!0971S!. "C")`
3.) To include the space on disks that were in a disk group that was deported,
or space that was not associated with any disk groups but were already under
VxVM or in other words, to find out the total space or capacity of all VxVM disks,
use vxd1sk:
# vxd1sk -q 11s1 | aWk `{ 1! {SS == "on11nc") p1n1 S1)` | xas vxd1sk 11s1
| cp "pub11c." | aWk -F`=` `C1h {s=0) {s+=ShF) hL {p1n1 s1!0971S!.
"C")`
4.) To determine the total amount of free space in a disk group:
# vxass1s1 - <d1skoup> maxs1zc


Resizing VoIumes using vxassist
The following modifiers are used with the vxassist command to resize a volume:
O growto---increase volume to a specified length
O growby---increase volume by a specified amount
O shrinkto---reduce volume to a specified length
O shrinkby---reduce volume by a specified amount
xtending to a Given Length
To extend a volume 94 a specific length, use the following command:

vxassist [-b] [-g diskgroup] growto volume length

Resizing VoIumes using vxvoI
To change the length of a volume using the vxvol set command, use the following
command:

vxvol [-g diskgroup] set len=length volume
For example, to change the length of the volume, vol01, in the disk group, mydg, to 100000
sectors, use the following command:

vxvol -g mydg set len=100000 vol01

Das könnte Ihnen auch gefallen