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

Veritas volume manager.

Administration Disk

Adding Disk to Vertias control:# vxdisksetup -i c0t0d0 Where i will be writes a disk header to the disk, making the disk directly usable. By default it will take disk format will be CDS. # vxdisksetup -i c0t0d0 format=sliced Above command will take Disk in control with SLICED format Rename DISK:Syntax:# vxedit -g sun rename old_name new_name Ex:# vxedit -g sun rename c1t4d0 sun4
Viewing Disks:

To display basic information about all disks: # vxdisk -o alldgs list To display detailed information for a disk: Syntax:# vxdisk -g disk_group list <disk_media_name> Ex:# vxdisk -g datadg list datadg01

Remove Disk from Disk group:Syntax:# vxdg g <group> rmdisk <disk media name> Ex:# vxdg -g sun rmdisk sun4 NOTE :-(it will keep atleast 1 disk in disk group that u has to destroy the DG then it will remove from DG) Remove Disk from VERITAS control:# vxdiskunsetup -C c2t0d0 Where-C option to force de-configuration of the disk, effectively removing the host locks that were detected by vxdiskunsetup.

Administration Disk Group

Create disk group:Syntax:# vxdg init <DG><Disk Media Name>=c0t0d0 (CTD format) Ex:# vxdg init sun sun01=c0t0d0 Adding more disks to same disk group:# vxdg -g sun adddisk sun02=c0t1d0 # vxdg -g sun adddisk sun03=c0t2d0 NOTE :-( IF while vxdisksetup if u give disk "format=sliced" then mentioned "cds=off") In sliced format write PRIVATE region on SLICED 3 & PUBLIC region on SLICED 4

In CDS format write PRIVATE region & PUBLIC region on SLICED 7. Rename DISK group:Syntax:# vxdg -n newdg_name deport olddg_name # vxdg import newdg_name Ex:# vxdg -n ibm deport sun # vxdg import ibm Syntax:# vxdg deport olddg_name # vxdg -n newdg_name import olddg_name Ex:# vxdg deport ibm # vxdg -n sun import ibm Viewing Disk Groups: To display free space in a disk group: Syntax:# vxdg free (for all disk groups that the host can detect) # vxdg -g <disk_group> free (for a specific disk group) Ex:# vxdg g sun free DISK sun1 sun2 DEVICE c2t1d0s2 c2t2d0s2 TAG c2t1d0 c2t2d0 OFFSET LENGTH FLAGS -

15785840 5128480 15728640 5185680

Remove Disk group:Syntax:# vxdg destroy <group name> Ex:# vxdg destroy sun

Administration Subdisk
Within a single disk we can have 4096 sub disks

Create subdisk with vxmake:-

Syntax:# vxmake [-g diskgroup] sd subdisk disk_name,offset (start point),size EX:# vxmake -g sun sd sun3-01 sun3,0,5g # vxmake -g sun sd sun2-02 sun2,15728640,2g # vxmake -g sun sd sun3-02 sun3,10485760,3g (Total=10GB) NOTE: - Offset value we can get from vxdg g <disk group> free command. Subdisks associated with a plex that already exists with vxsd:Syntax:# vxsd [-g diskgroup] assoc plex subdisk1 [subdisk2 subdisk3 ...] EX:# vxsd -g sun assoc manualvol-01 sun3-02

Dissociating subdisks from plexes:-

Syntax:# vxsd [-g diskgroup] [-o force] dis subdisk EX:# vxsd -g mydg dis mydg02-01

Rename subdisk:-

Syntax:# vxedit [-g diskgroup] rename old_subdisk new_subdisk EX:# vxedit -g sun rename sun2-01 ibm01-01

Displaying subdisk Information:-

To display general information for all subdisks # vxprint st To display complete information about a particular subdisk Syntax:# vxprint [-g disk_group] -l subdisk Ex:# vxprint -g mydg -l mydg02-01

Removing subdisks:-

Syntax:# vxedit [-g diskgroup] rm subdisk EX:# vxedit -g sun rm sun2-01 NOTE: - To remove any Sub disk, 1st disassociated subdisk with resp. plex & then remove it

Administration Plex

Create plex with vxmake:Syntax:# vxmake g <disk group> plex <plex name> sd=<subdisk names> Ex:# vxmake -g sun plex sunvol-02 sd=sun2-02,sun3-01 Creating a striped plex:Ex:# vxmake -g sun plex sunvol-01 layout=stripe stwidth=32 ncol=3 sd=sun2-01,sun2-02,sun3-01 # vxmake -g sun plex sunvol-02 layout=stripe stwidth=32 ncol=3 sd=sun3-02,sun4-01,sun4-02 Attached (ASSOC) plex with vxplex:Syntax:# vxplex -g <diskgroup> att volume plex Ex:-

# vxplex -g sun att sunvol sunvol-01 NOTE: -command to add a data plex as a mirror to an existing volume. Dissociating subdisks from plexes:Syntax:vxsd -g <diskgroup>dis <plex name> Ex:vxsd -g sun dis sun3-02
Displaying Plex Information:

To display general information for all plexes # vxprint pt To display complete information about a particular plexes Syntax:# vxprint [-g disk_group] -l subdisk Ex:# vxprint -g mydg -l mydg02-01 Rename plex:Syntax:# vxedit[-g diskgroup] rename old_plex new_plex Ex:# vxedit -g sun rename myvol-01 myhome-01 Remove plex:You can first dissociate the plex and subdisks, and then removethem with the following commands: Syntax:-

# vxplex [-g diskgroup] dis plex Ex:# vxplex -g sun -f dis myvol-01 NOTE:-If its last plex then use -f option Syntax:# vxedit [-g diskgroup] -r rm plex NOTE:-(its will remove plex as well as subdisk that associate with that same plex) If plex is notassociated with any VOLUME then, # vxedit -g sun rm myibm-01

Administration Volume

Create volume with VXASSIST:-

Syntax:# vxassist [-b] [-g diskgroup] make volume Size Ex: # vxassist -g sun make sunvol 50g Create volume with STRIPE volume:Syntax:# vxassist [-b] [-g diskgroup] make volume length layout=stripe # vxassist -g sun make sunvol 50g layout=stripe ncol=2 stwidth=64 (By default ncol=2 & stwidth=128) To change the number of columns or the stripe width, use the ncolumn and

Stripeunit modifiers with vxassist. For example, the following command Creates a striped volume with 5 columns and a 32-kilobyte stripe size: # vxassist -b -g mydg make stripevol 30g layout=stripe ncol=2 stripeunit=32k NOTE: -Where ncol = each disk divided into 2 column & on each column data will write 32kb. Create mirror volume:Syntax:# vxassist [-b] [-g diskgroup] make volume length layout=mirror [nmirror=number] [init=active] Ex:# vxassist -b -g mydg make volmir 5g layout=mirror NOTE: -(IF u want create mirrored-concatenated or concatenated-mirror then change only in layout) To create a volume with 3 instead of the default of 2 mirrors, modify the command to read: # vxassist -b -g mydg make volmir 5g layout=mirror nmirror=3
Run mkfs (Such as newfs in SVM):-

Syntax:# mkfs -Fvxfs /dev/vx/rdsk/dg_name/volume_name EX:# mkfs -Fvxfs /dev/vx/rdsk/sun/mysunvol

Mount File System:Syntax:# mount -Fvxfs /dev/vx/dsk/dg_name/volume_name /mount_point EX:-

# mount -Fvxfs /dev/vx/dsk/sun/mysunvol

/mysunvol

Note: - There is no need to start volume with vxassist command it will start volume automatically.

Create volume with VXMAKE:-

Take following steps to create volume, # vxmake -g sun sd sun3-01 sun3,0,5g # vxmake -g sun sd sun2-02 sun2,15728640,2g # vxmake -g sun plex sunvol-01 layout=stripe stwidth=32 ncol=3 sd=sun201,sun2-02 If the volume does not already exist, a plex (or multiple plexes) can be associated with the volume when it is created using the following command: Syntax:# vxmake -g <Disk Group>-U fsgenvol<Volume name> plex=plex-01,plex02 EX:# vxmake -g mydg-U fsgen vol mysunvol plex=sunvol-01 # vxvol -g sun start mysunvol # mkfs -Fvxfs /dev/vx/rdsk/sun/mysunvol # mount -Fvxfs /dev/vx/dsk/sun/mysunvol /mysunvol

Increase//decrease volume with "vxresize":-

# df -kh /sunvol Filesystem /dev/vx/dsk/sun/sunvol # vxresize -g sun sunvol +2G size used availcapacity Mounted on 10G 19M 9.4G 1% /sunvol

# df -kh /sunvol Filesystem /dev/vx/dsk/sun/sunvol # vxresize -g sun sunvol -5g # df -kh /sunvol Filesystem /dev/vx/dsk/sun/sunvol Rename volume:Syntax:# vxedit [-g diskgroup] rename old_volume new_volume Ex:# vxedit -g sun rename myvol myhome size used availcapacity Mounted on 7.0G 18M 6.5G 1% /sunvol size used availcapacity Mounted on 12G 20M 11G 1% /sunvol

Displaying Volume Information:

Estimating Volume Size: To determine largest possible size for a volume: Syntax:vxassist -g disk_group maxsize attributes Ex:# vxassist -g datadg maxsize layout=raid5 Maximum volume size: 376832 (184Mb) To determine how much a volume can expand: Syntax:vxassist -g disk_group maxgrow volume Ex:-

# vxassist -g datadg maxgrow datavol Volume datavol can be extended by 366592 to 1677312 (819Mb) To display volume configuration information Syntax:# vxprint -g disk_group Options, -vpsd: - Select only volumes (v), plexes (p), subdisks (s),or disks (d). -h: - List hierarchies below selected records. -t: - Print single-line output records that depend upon the configuration record type.
Remove volume:-

Syntax:# vxedit [-g diskgroup] -rf rm volume-name Ex:# vxedit -g sun -rf rm ibmvol2 {OR} Syntax:# vxassist [-g diskgroup] remove volume {volume-name} Ex:# vxassist -g sun remove volume ibmvol3

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