Você está na página 1de 2

VERITAS Enterprise Consulting Services - Foundation Suite Cheat Sheet

VERITAS File System Commands


File System Operations
Task
Create a VERITAS file system Of a particular size With largefiles Specific block size Mount a VERITAS file system Unmount a file system View file system information Display file system type Resize a file system Enable largefiles Check a file system Do a full check

Command
mkfs F vxfs special_device mkfs F vxfs special_device size mkfs F vxfs o largefiles special_device mkfs F vxfs o bsize=blocksize special_device mount F vxfs special_device mount_point umount special_device | mount_point mount v fstyp v special_device /usr/lib/fs/vxfs/fsadm -b newsize mount_point fsadm F vxfs o largefiles mount_point fsck F vxfs special_device fsck F vxfs o full y special_device

Example
mkfs F vxfs /dev/vx/rdsk/mydg/myvol mkfs F vxfs /dev/vx/rdsk/mydg/myvol 1g mkfs F vxfs o largefiles /dev/vx/rdsk/mydg/myvol mkfs F vxfs o bsize=8192 /dev/vx/rdsk/mydg/myvol Mount F vxfs /dev/vx/dsk/mydg/myvol /mydir umount /mydir umount /dev/vx/dsk/mydg/myvol

fstyp v /dev/vx/dsk/mydg/myvol /usr/lib/fs/vxfs/fsadm -b 512000 /mydir fsadm F vxfs o largefiles /mydir fsck F vxfs /dev/vx/rdsk/mydg/myvol fsck F vxfs o full y /dev/vx/dsk/mydg/myvol

VERITAS Volume Manager Commands


Disk Operations
Task
Initialise a disk vxdiskadm vxdiskadd c#t#d# vxdisksetup i c#t#d# List disks vxdisk list vxdisk list c#t#d# Scanning for new disks Remove a disk vxdiskconfig vxdg [-g diskgroup] rmdisk diskname vxdisk rm c#t#d# vxdg g mydg rmdisk disk02 vxdisk rm c2t2d0 vxdiskadd c2t2d0 vxdisksetup i c2t2d0 vxdisk list vxdisk list c2t2d0

Command

Example

DMP Operations
Task
Display pathing vxdisk list c#t#d# vxdmpadm getdmpnode nodename=c#t#d#s# vxdmpadm getsubpaths dmpnodename= c#t#d#s# Display controllers vxdmpadm listctlr all vxdmpadm listctlr ctlr=c# vxdmpadm getsubpaths ctlr=c# Disable a controller Enable a controller Display enclosures vxdmpadm disable ctlr=c# vxdmpadm enable ctlr=c# vxdmpadm listenclosure all vxdmpadm listenclosure enc# vxdmpadm listenclosure enc1 vxdmpadm listctlr=c2 vxdmpadm getsubpaths ctlr=c2 vxdmpadm disable ctlr=c3 vxdmpadm disable ctlr=c3

Command
vxdisk list c1t1d0

Example
vxdmpadm getdmpnode nodename=c3t2d1s2 vxdmpadm getsubpaths dmpnodename=c3t2d1s2

Page 1 of 2

VERITAS Enterprise Consulting Services - Foundation Suite Cheat Sheet

Disk Group Operations


Task
Create a disk group List disk groups vxdg list vxdg list diskgroup See free space Add a disk to a disk group Remove a disk from disk group Deport a disk group Import a disk group Rename a disk group vxdg [g diskgroup] free vxdg [-g diskgroup] adddisk diskname vxdg [-g diskgroup] rmdisk diskname vxdg deport diskgroup vxdg import diskgroup vxdg n newdg import diskgroup vxdg n newdg deport diskgroup Destroy a disk group Upgrade a disk group vxdg destroy diskgroup vxdg upgrade diskgroup

Command
vxdg init diskgroup diskname=c#t#d# vxdg list vxdg list mydg vxdg g mydg free

Example
vxdg init mydg disk01=c1t1d0 disk02=c1t1d2

vxdg g mydg adddisk disk02=c1t1d2 vxdg g mydg rmdisk disk02 vxdg deport mydg vxdg import mydg vxdg n yourdg import mydg vxdg n yourdg deport mydg vxdg destroy mydg vxdg upgrade mydg

Volume Operations
Task
Create a Volume

Command
vxassist [-g diskgroup] make volume size vxassist [-g diskgroup] make volume size diskname vxassist [-g diskgroup] make volume size layout=layout diskname where layout can be striped/mirrored/raid5/mirrored-stripe/concatenatedmirror/striped-mirror

Example
vxassist g mydg make myvol 2g vxassist g mydg make myvol 2g disk01 disk02 vxassist g mydg make myvol 2g layout=stripe disk01 disk02 disk03

Resize a volume and file system Resize a volume

vxresize f vxfs volume newsize vxassist [-g diskgroup] growto volume newsize vxassist [-g diskgroup] growby volume length vxassist [-g diskgroup] shrinkto volume newsize vxassist [-g diskgroup] shrinkby volume length

vxresize f vxfs myvol 10g vxassist g mydg growto myvol 5g vxassist g mydg growby myvol 1g vxassist g mydg shrinkto myvol 2g vxassist g mydg shrinkby myvol 1g vxassist g mydg maxsize myvol vxassist g mydg mirror myvol vxassist g mydg remove mirror myvol vxassist g mydg move myvol !disk01 vxassist g mydg relayout myvol layout=stripe vxvol g mydg start myvol vxvol g mydg startall vxrecover g mydg s myvol vxvol g mydg stop myvol vxvol g mydg stopall vxedit g mydg rename myvol yourvol vxassist g mydg remove volume myvol

Find max growth Add a mirror Remove a mirror Move volume to another disk Relayout a volume Start a volume Start all volumes Start a disabled volume Stop a volume Stop all volumes Rename a volume Remove a volume

vxassist [-g diskgroup] maxsize volume vxassist [-g diskgroup] mirror volume vxassist [-g diskgroup] remove mirror volume vxassist [ -g diskgroup] move volume !diskname vxassist [ -g diskgroup] relayout volume layout=layout relayout_options vxvol [-g diskgroup] start volume vxvol [g diskgroup] startall vxrecover [g diskgroup] s volume vxvol [-g diskgroup] stop volume vxvol [g diskgroup] stopall vxedit [-g diskgroup] rename volume newvolume vxassist [g diskgroup] remove volume volume

Page 2 of 2

Você também pode gostar