File Systems
File Systems:
How do I...
List all file systems
lsfs [-q] [-c|-l] {-a | -v Vfs| -u Group | Filesystem ...
List all mounted file systems
Usage: df [-P] | [-IMitv] [-k] [-s] [filesystem ...] [file ...]
Create a Journaled File Filesystem
NOTE: There are may attributes and types of file systems and it is best to us the smit/smitty utility when performing these operation. It is also recommended to create the logical volume for your file system first, then create the file system using this logical volume. Using this method will allow you to give the logical volume a name that is similar to the file system instead of the system generated lv0 lv01 lv02... default.
smit jfs
Usage: crfs -v Vfs {-g Volumegroup | -d Device} -m Mountpoint
[-u Mountgroup] [-A {yes|no}] [-t {yes|no}] [-p {ro|rw}]
[-l Logpartitions] [-n nodename] [-a Attribute=Value]
Expand a file system
chfs -a size=newsize mountpoint
Usage: chfs [-n Nodename] [-m NewMountpoint] [-u Group] [-A {yes|no}]
[-t {yes|no}] [-p {ro|rw}] [-a Attribute=Value] [-d Attribute]
NOTE: File system size is in 512 byte blocks. The smallest allocable chunk of space is 1 PP and chfs will round up to the to that size if you do not specify the exact number of bytes. For example, assume 4 Meg PP size, the / file system is currently 16 Meg (32768 512 bb) and you want to increase the size by 4 Meg (1 PP). There are 3 methods to achieve this.
1. chfs -a size=32769 / (will round up to next PP)
2. chfs -a size=+1 / (will round up to next PP)
3. chfs -a size=40960 / (exact size)
A quick way to get the 512 byte blocks is to take the total number of Meg you want the file system to be and multiply it by 2048 and use that number as the size.
Change a file system mount point
chfs -m newmount oldmount
Defragment a file system
defragfs mountpoint
Usage : defragfs [-q | -r] {device | mount-path}
Verify a file system
fsck -p mountpoint
Usage: fsck [-y|-n|-p] [-f] [-V Vfs] [-d #] [-i #
[-t File] [-o Options] Filesystem ...
NOTE: File system must be unmounted for check to be acurate
Unmount a file system
umount mountpoint
or
unmount mountpoint
Usage: umount [-sf] {-a|-n Node|-t Type|all|allr|Device|File|Directory|Filesystem}
Mount a file system
mount mountpoint
Usage: mount [-fipr] [-n Node] [-o Options] [-t Type] [-{v|V} Vfs]
[-a | all | [[Node:]Device] [Directory]]
Backup a file system
smit backfilesys
Unmount file system
backup -f'device_or_file -'0' filesystem
Usage for backup by name:
backup -i[oqv] [-b Number] [-f Device] [-l Number] [-p[e RegExp]]
Usage for backup by inode:
backup [-Level] [-ucwW] [-b Number] [-f Device] [-L length] [Filesystem]
Restore a file system
smit restfilesys
mount mountpoint
restore options
Usage (see man page)
Remove a file system
rmfs mountpoint
Usage: rmfs Filesystem