You are on page 1of 2

VERITAS Enterprise Consulting Services - Foundation Suite Cheat Sheet

VERITAS File System Commands


File System Operations
Task Command Example
Create a VERITAS file system mkfs F vxfs special_device mkfs F vxfs /dev/vx/rdsk/mydg/myvol
Of a particular size mkfs F vxfs special_device size mkfs F vxfs /dev/vx/rdsk/mydg/myvol 1g
With largefiles mkfs F vxfs o largefiles special_device mkfs F vxfs o largefiles /dev/vx/rdsk/mydg/myvol
Specific block size mkfs F vxfs o bsize=blocksize special_device mkfs F vxfs o bsize=8192 /dev/vx/rdsk/mydg/myvol
Mount a VERITAS file system mount F vxfs special_device mount_point Mount F vxfs /dev/vx/dsk/mydg/myvol /mydir
Unmount a file system umount special_device | mount_point
umount /mydir
umount /dev/vx/dsk/mydg/myvol
View file system information mount v
Display file system type fstyp v special_device fstyp v /dev/vx/dsk/mydg/myvol
Resize a file system /usr/lib/fs/vxfs/fsadm -b newsize mount_point /usr/lib/fs/vxfs/fsadm -b 512000 /mydir
Enable largefiles fsadm F vxfs o largefiles mount_point fsadm F vxfs o largefiles /mydir
Check a file system fsck F vxfs special_device fsck F vxfs /dev/vx/rdsk/mydg/myvol
Do a full check fsck F vxfs o full y special_device fsck F vxfs o full y /dev/vx/dsk/mydg/myvol
VERITAS Volume Manager Commands
Disk Operations
Task Command Example
Initialise a disk vxdiskadm
vxdiskadd c#t#d# vxdiskadd c2t2d0
vxdisksetup i c#t#d# vxdisksetup i c2t2d0
List disks vxdisk list vxdisk list
vxdisk list c#t#d# vxdisk list c2t2d0
Scanning for new disks vxdiskconfig
Remove a disk vxdg [-g diskgroup] rmdisk diskname vxdg g mydg rmdisk disk02
vxdisk rm c#t#d# vxdisk rm c2t2d0
DMP Operations
Task Command Example
Display pathing vxdisk list c#t#d# vxdisk list c1t1d0
vxdmpadm getdmpnode nodename=c#t#d#s# vxdmpadm getdmpnode nodename=c3t2d1s2
vxdmpadm getsubpaths dmpnodename= c#t#d#s# vxdmpadm getsubpaths dmpnodename=c3t2d1s2
Display controllers vxdmpadm listctlr all
vxdmpadm listctlr ctlr=c# vxdmpadm listctlr=c2
vxdmpadm getsubpaths ctlr=c# vxdmpadm getsubpaths ctlr=c2
Disable a controller vxdmpadm disable ctlr=c# vxdmpadm disable ctlr=c3
Enable a controller vxdmpadm enable ctlr=c# vxdmpadm disable ctlr=c3
Display enclosures vxdmpadm listenclosure all
vxdmpadm listenclosure enc# vxdmpadm listenclosure enc1
Page 1 of 2

VERITAS Enterprise Consulting Services - Foundation Suite Cheat Sheet

Page 2 of 2

Disk Group Operations
Task Command Example
Create a disk group vxdg init diskgroup diskname=c#t#d# vxdg init mydg disk01=c1t1d0 disk02=c1t1d2
List disk groups vxdg list vxdg list
vxdg list diskgroup vxdg list mydg
See free space vxdg [g diskgroup] free vxdg g mydg free
Add a disk to a disk group vxdg [-g diskgroup] adddisk diskname vxdg g mydg adddisk disk02=c1t1d2
Remove a disk from disk
group
vxdg [-g diskgroup] rmdisk diskname vxdg g mydg rmdisk disk02
Deport a disk group vxdg deport diskgroup vxdg deport mydg
Import a disk group vxdg import diskgroup vxdg import mydg
Rename a disk group vxdg n newdg import diskgroup vxdg n yourdg import mydg
vxdg n newdg deport diskgroup vxdg n yourdg deport mydg
Destroy a disk group vxdg destroy diskgroup vxdg destroy mydg
Upgrade a disk group vxdg upgrade diskgroup vxdg upgrade mydg
Volume Operations
Task Command Example
Create a Volume vxassist [-g diskgroup] make volume size vxassist g mydg make myvol 2g

vxassist [-g diskgroup] make volume size
diskname
vxassist g mydg make myvol 2g disk01 disk02

vxassist [-g diskgroup] make volume size
layout=layout diskname
where layout can be
striped/mirrored/raid5/mirrored-stripe/concatenated-
mirror/striped-mirror
vxassist g mydg make myvol 2g layout=stripe disk01
disk02 disk03
Resize a volume and file system vxresize f vxfs volume newsize vxresize f vxfs myvol 10g
Resize a volume vxassist [-g diskgroup] growto volume newsize vxassist g mydg growto myvol 5g
vxassist [-g diskgroup] growby volume length vxassist g mydg growby myvol 1g
vxassist [-g diskgroup] shrinkto volume newsize vxassist g mydg shrinkto myvol 2g
vxassist [-g diskgroup] shrinkby volume length vxassist g mydg shrinkby myvol 1g
Find max growth vxassist [-g diskgroup] maxsize volume vxassist g mydg maxsize myvol
Add a mirror vxassist [-g diskgroup] mirror volume vxassist g mydg mirror myvol
Remove a mirror vxassist [-g diskgroup] remove mirror volume vxassist g mydg remove mirror myvol
Move volume to another disk vxassist [ -g diskgroup] move volume !diskname vxassist g mydg move myvol !disk01
Relayout a volume
vxassist [ -g diskgroup] relayout volume
layout=layout relayout_options
vxassist g mydg relayout myvol layout=stripe
Start a volume vxvol [-g diskgroup] start volume vxvol g mydg start myvol
Start all volumes vxvol [g diskgroup] startall vxvol g mydg startall
Start a disabled volume vxrecover [g diskgroup] s volume vxrecover g mydg s myvol
Stop a volume vxvol [-g diskgroup] stop volume vxvol g mydg stop myvol
Stop all volumes vxvol [g diskgroup] stopall vxvol g mydg stopall
Rename a volume vxedit [-g diskgroup] rename volume newvolume vxedit g mydg rename myvol yourvol
Remove a volume vxassist [g diskgroup] remove volume volume vxassist g mydg remove volume myvol

You might also like