Você está na página 1de 4

Veritas File System

Veritas Filesystem ( VxFS) is an extent based, intent logging file system. VxFS is geared toward
Unix environments that require high performance and availability and deal with large amounts of
data.

VxFS features: -

 Extent based allocation


 Extent attributes
 Fast filesystem recovery
 Access control lists (ACL)
 Online administration
 Online backup
 Enchanced I/O and mount options
 Improved synchronous writes
 Support for large filesystems (up to 2 terabytes)
 Support for large files (up to 1 terabytes)
 Veritas quicklog

Version 4 disk Layout

The VxFS version 4 disk layout divides the entire file system space into fixed sized allocation
units. The first allocation unit starts at block zero and all allocation units 32K blocks. All
structural information are contained in files. So expanding the filesystem structures simply
requires extending the appropriate structural files. All version 4 structural files reside in the
structural fileset.

The structural files in version 4 disk layout are:

Contains the object location table (OLT). The OLT, which referenced from the
Object location Table file
superblock is used to locate the other structural files.
Encapsulates the super-block and super-block replicas. Although the primary
Label File location of the super-block is known, the label file can be used to locate upper-bl
copies ifthere is structural damage to the filesystem.
Records device information such as volume length and volume label and contain
Device File
pointers to other structural files.
Hold information on a per- fileset basis. This may include the inode of the fileset
inode list file, the maximum number of inodes allowed, an indication of whether
filesystem supports large files and the inode number of quotas file if the
filesetsupports quotas.
Fileset Header File
When a filesystem is created, there are two filesets, the structural fileset,
whichdefines the file system structure and the primary fileset which contains use
data.
Both the structural fileset and the primary fileset have their own inode lists which
Inode List File are stored in inode list files. Increasing the number of inodes involves increasing
size of the file after expanding the inode allocation unit file.
Hold the free inode map, extended operations map and a summary of the inode
Inode Allocation Unit File
resources.
Log File Maps the block used by the filesystem intent log.
Indicates the allocation state of each AU by defining whether each AU is free
Extent Allocation Unit State
allocated as a whole (no bitmaps allocated) or expanded, in which case the bitma
File
associated with each AU determine which extents are allocated.
Contains the AU summary for each allocation unit, which contains the number o
Extent Allocation Unit
free extents of each size. The summary for an extent is created only when an
Summary File
allocation unit is expanded for use.
Free Extent Map File Contains the free extent maps for each of the allocation units.
If the filesystem supports quotas, there is a quotas file, which is used to track the
Quotas File
resources allocated to each user.

Creating a Filesystem
The mkfs command creates veritas filesystems by writing to a special character device.

To create a file system:

mkfs [-F vxfs] [ generic_option] [-o special_option] device [size]

generic_option Options common to other filesystem types


special_option Options specific to VxFS filesystem
device disk device or Veritas volume
size the size in sectors

example:

mkfs –F vxfs –o largefiles /dev/vx/rdsk/appdg/samba_vol # Option largefiles set

output:

version 4 layout
204800 sectors, 102400 blocks of size 1024, log size 1024 blocks
unlimited inodes, largefiles supported
102400 data blocks, 101280 free data blocks
4 allocation units of 32768 blocks, 32768 blocks
last allocation unit has 4096 data blocks

Note: you do not get the super-block output list as in newfs


Mounting/ Unmounting a Filesystem
Mount a VXFS filesystem mount –F vxfs –o largefiles /dev/vx/rdsk/appdg/samba_vol /samba
Umount a VXFS filesystem umount /samba

Displaying a Filesystem
To see information on a filesystem:

mount -v

/dev/dsk/c0t0d0s0 on / type ufs read/write/setuid/largefiles on Sun May 14 19:42:25 2000


/proc on /proc type proc read/write/setuid on Sun May 14 19:42:25 2000
/fd on /dev/fd type fd read/write/setuid on Sun May 14 19:42:25 2000
swap on /tmp type tmpfs read/write on Sun May 14 19:42:25 2000
/dev/vx/dsk/appdg/samba_vol on /samba type vxfs read/write/log/setuid/largefiles on Sun May 14 19:42

Identifying Filesystem types


Use the fstyp command to identify a filesystem type:

fstyp -v /dev/vx/dsk/appdg/samba_vol or /dev/vx/rdsk/appdg/samba_vol

vxfs
magic a501fcf5 version 4 ctime Sun May 14 19:42:25 2000
logstart 0 logend 0
bsize 1024 size 512000 dsize 512000 ninode 0 nau 0
defiextsize 0 ilbsize 0 immedlen 96 ndaddr 10
aufirst 0 emap 0 imap 0 iextop 0 istart 0
bstart 0 femap 0 fimap 0 fiextop 0 fistart 0 fbstart 0
nindir 2048 aulen 32768 auimlen 0 auemlen 8
auilen 0 aupad 0 aublocks 32768 maxtier 15
inopb 4 inopau 0 ndiripau 0 iaddrlen 8 bshift 10
inoshift 2 bmask fffffc00 boffmask 3ff checksum e123fa77
oltext1 33 oltext2 1282 oltsize 1 checksum2 62b
free 274946 ifree 0
efree 30 28 23 24 15 13 16 12 8 8 5 3 6 6 5 1

Shrink/grow a Filesystem
Use the fsadm command to shrink/grow a filesystem:
Shrink a filesystem /usr/lib/vxfs/fsadm -b 102400 /samba
Grow a filesystem /usr/lib/vxfs/fsadm -b 204800 /samba

Reorganise a Filesystem
Use the fsadm ro reorganise (defrag) a filesystem:

Report on extent fragmentation: /usr/lib/fs/vxfs/fsadm -E /samba


Report on directory fragmentation: /usr/lib/fs/vxfs/fsadm -D /samba
Reorganise extents: /usr/lib/fs/vxfs/fsadm -e /samba
Reorganise directories: /usr/lib/fs/vxfs/fsadm -d /samba

Create and Mount a snapshot filesystem


Use the mount command to create the snap shot filesystem then use vxdump (or tar, dd, cpio) to
backup the filesystem to tape:

mount -F vxfs -o snapof=/dev/vx/dsk/appdg/samba_vol snap,size=208400


Create the snapshot filesystem:
/dev/vx/dsk/rootdg/snapshot/snapshot
Backup the filesystem: vxdump -cf /dev/rmt/1cbn /snapshot
Restore the filesystem (to /restore
vxrestore -vx /restore
filesystem):

Using quotas
Turn on a quota for a filesystem (make sure vxquotaon <mount_point>
filesystem has been mounted with quota
option): Note: a file will be created called quotas (it's a text file)
To setup a users quota vxedquota <username>
To view a users quota: vxquota -v <username>
vxquotaoff <mount_point>
To turn off quota on a filesystem:
Note: The quota file is not removed.

Você também pode gostar