Sunteți pe pagina 1din 4

init,add disk, and create new dg:

vxdisk list ** check available disks


vxdisksetup -i c2t1d0 **vxvm init disk
vxdisksetup -i c2t3d0
**create new dg with 2 inited disks
vxdg init newDG ndg-01=c2t1d0 ndg-02=c2t3d0
vxdisk -g newDG list ** check newly disks status
vxdg list ** check newly created dg status
---------------------------------------------
init,add disk to dg:
vxdisk list ** check available disks
vxdisksetup -i c2t5d0 **vxvm init disk
vxdisksetup -i c2t6d0
vxdg -g newDG adddisk ndg-03=c2t5d0 ndg-04=c2t6d0
vxdisk list ** check newly added disks
------------------------------------------------
**remove disk from dg:
vxdg -g newDG rmdisk ndg-03
------------------------------------------
**deport,import dg:
vxdg list
vxdg deport newDG
vxdg list
**identify deported dg:
vxdisk -o alldgs list
OR vxdiskadm option 8(import dg,then choose list)
**on other host:
vxdg import newDG
vxdg list
------------------------------------------
**rename vxvm disk
vxedit -g sdga rename a5k01 sdga-01
-----------------------------------------
destroy DG:
vxdg destroy newDG
___________________________________________
ch 5
search space allocation:
vxdg -g newdg free
vxassist - newdg maxsize layout=mirror ndg-01 ndg-02 ndg-03 ndg-04
vxassist - newdg maxsize layout=nomirror,nostrip ndg-01 ndg-02 ndg-03 ndg-04
vxassist - newdg maxsize layout=raid5 ndg-01 ndg-02 ndg-03 ndg-04
create volume:
vxassist -g dg make volume_name size layout=concat/strip/mirror ndg-01
ndg-02 ndg-03 ndg-04
ex: vxassist -g ndg make vol_concat 100g layout=concat ndg-01 ndg-02
ex: vxassist -g ndg make vol_mirror 100m layout=mirror-concat ndg-01 ndg-02
ex: vxassist -g ndg make vol_strip 300m layout=stripe ndg-01 ndg-02 ndg-
03 ndg-04
ex: vxassist -g ndg make vol_raid5 300m layout=raid5 ndg-01 ndg-02 ndg-03
ndg-04
vxprint -g ndg vol_mirror
vxprint -g ndg vol_raid5
The following examples show each type of supported volume structure.
The layered volumes require a larger minimum number of disk drives to
implement.
# vxassist -g dg3 make newvol 20m \
layout=concat disk01
# vxassist -g dg3 make newvol 20m \
layout=stripe disk01 disk02
# vxassist -g dg3 make newvol 20m \
layout=mirror-concat disk01 disk02
# vxassist -g dg3 make newvol 20m \
layout=mirror-strip disk01 disk02 disk03 disk04
# vxassist -g dg3 make newvol 20m \
layout=concat-mirror disk01 disk02 disk03 disk04
# vxassist -g dg3 make newvol 20m \
layout=stripe-mirror disk01 disk02 disk03 disk04
# vxassist -g dg3 make newvol 20m \
layout=raid5,nolog disk01 disk02 disk03
The vxassist command can frequently determine the best way to use the
specified disk drives (media names) in a volume structure.
**The ownership and permissions of raw volumes can be checked like
ordinary system files. You use the ls command to examine the raw
volume files in the /dev/vx/rdsk/dg_name directories.
# ls -l /dev/vx/rdsk/newDG/testvol
crw------- 1 root root 199,73000 Feb3 20:37 /dev/vx/rdsk/newDG/testvol
Modifying Volume Ownership and Permissions
To run applications, such as ORACLE 9i RAC, it might be necessary to
change read/write permissions and ownership of the raw volumes. You
use the vxedit command to change the raw volume s permissions or
ownership.
# vxedit -g tpcs set user=oracle group=dba mode=660 acct06
**minimum free space -m 1-10%
# newfs -m 10 /dev/vx/rdsk/newDG/vol_01
If you intend to create a large file system that will contain a small number
of very large files, you might be able to decrease the total number of
inodes, for example:
# newfs -i 10240 /dev/vx/rdsk/newDG/vol01
# newfs -o logging /dev/vx/rdsk/newDG/testvol
# mkdir /Test
# vi /etc/vfstab
/dev/vx/dsk/newDG/testvol /dev/vx/rdsk/newDG/testvol /Test
ufs 1 yes logging
# mount /Test
Using DRLs
A DRL is a VxVM log file that tracks data changes made to mirrored
volumes. The DRL speeds recovery time when a failed mirror must be
synchronized with a surviving mirror.
A DRL is a small, special-purpose plex attached to a mirrored volume
which has the following features:
- It is a log that keeps track of the regions within volumes that have
changed as a result of write operations to a plex. It does this by
maintaining a bitmap and storing this information in a log subdisk.
l-After a system failure, only the regions marked as changed (dirty) in
the DRL are recovered.
The following example shows a mirrored volume with a DRL. Notice that
the log subdisk does not reside on either of the mirror disk drives.
# vxprint -g newDG mirvol
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE
v mirvol fsgen ENABLED 4096 - ACTIVE
pl mirvol-01 mirvol ENABLED 7182 - ACTIVE
sd ndg-01-01 mirvol-01 ENABLED 7182 0 -
pl mirvol-02 mirvol ENABLED 7182 - ACTIVE
sd ndg-03-01 mirvol-02 ENABLED 7182 0 -
pl mirvol-03 mirvol ENABLED LOGONLY - ACTIVE
sd ndg-02-03 mirvol-03 ENABLED 33 LOG -
# vxprint -g newDG raidvol
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE
v raidvol raid5 ENABLED 4096 - ACTIVE
pl raidvol-01 raidvol ENABLED 7168 - ACTIVE
sd ndg-02-02 raidvol-01 ENABLED 3591 0 -
sd ndg-01-03 raidvol-01 ENABLED 3591 0 -
sd ndg-03-03 raidvol-01 ENABLED 3591 0 -
pl raidvol-02 raidvol ENABLED 3591 - LOG
sd ndg-04-02 raidvol-02 ENABLED 3591 0 -
Adding a DRL
To prevent I/O bottlenecks, a DRL should not reside on a disk drive used
by its related volume. It is best to specify the disk drive (media name)
where the DRL should be placed.
# vxassist addlog mirvol ndg-02
# vxprint -g newDG mirvol
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE
v mirvol fsgen ENABLED 4096 - ACTIVE
pl mirvol-01 mirvol ENABLED 7182 - ACTIVE
sd ndg-01-01 mirvol-01 ENABLED 7182 0 -
pl mirvol-02 mirvol ENABLED 7182 - ACTIVE
sd ndg-03-01 mirvol-02 ENABLED 7182 0 -
pl mirvol-03 mirvol ENABLED LOGONLY - ACTIVE
sd ndg-02-03 mirvol-03 ENABLED 33 LOG -
# vxassist addlog raidvol ndg-04
# vxprint -g newDG raidvol
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE
v raidvol raid5 ENABLED 4096 - ACTIVE
pl raidvol-01 raidvol ENABLED 7168 - ACTIVE
sd ndg-02-02 raidvol-01 ENABLED 3591 0 -
sd ndg-01-03 raidvol-01 ENABLED 3591 0 -
sd ndg-03-03 raidvol-01 ENABLED 3591 0 -
pl raidvol-02 raidvol ENABLED 3591 - LOG
sd ndg-04-02 raidvol-02 ENABLED 3591 0 -
remove log
# vxassist remove log mirvol
# vxassist remove log raidvol
___________________________________________
EX:
Stop the volume you created in the previous procedure.
# vxvol -g disk_group stop volume_name
Recursively remove the volume.
# vxedit -g disk_group -rf rm volume_name
What is the purpose of the vxedit -f option?
Use the vxprint command to verify the volume status is showing
ENABLED and ACTIVE.
To remove a mirror from a volume, and then create a new mirror,
complete the following steps:
1. Ensure that both plexes (mirrors) in the volume you added are fully
synchronized and show a status of ENABLED and ACTIVE.
2. Use the vxassist command to remove one of the mirrors from your
volume.
For example:
# vxassist -g dgX remove mirror vol_01
3. Use the vxprint command to verify that your volume now has a
single plex and subdisk.
4. Use the vxassist command to re-create the mirrored volume.
5. Use the alloc= parameter to specify the disk media name on which
the new mirror is to be created.
For example:
# vxassist -g dgX mirror vol_01 alloc=dgX03
6. After the vxassist returns, use the vxprint command to verify the
volume has two plexes and its status is ENABLED and ACTIVE.
--------------------------------------------------------------------------------
-
The following is a summary of using the command line to add a file
system to an existing volume.
# mkfs -F ufs /dev/vx/rdsk/dgX/xvol-01 409600
# mkdir /Junk
# vi /etc/vfstab
/dev/vx/dsk/dgX/xvol-01 /dev/vx/rdsk/dgX/xvol-01 /Junk ufs 1 yes logging
# mount -F ufs -o logging /dev/vx/dsk/dgX/xvol-01 /Junk
The disk media name you specify should be on a different disk drive than
the disk drives used by the volume mirrors.
# vxassist remove log volume_name
# vxassist addlog volume_name media_name
--------------------------------------------------------------------------------
--
To resize file systems using the command line, complete the following
steps:
1. Add 2 Mbytes to the size of your mirrored volume and file system
by using the following command:
# vxresize -F ufs -g disk_group volume_name +2m
Note You can also express the +2m as a new volume length without the
plus sign. There are also -s and -x options that ensure the requested size
value is appropriate. You can also specify disk media names (for example,
disk01, disk02) that you want to be used for the new space.
___________________________________________

S-ar putea să vă placă și