Professional Documents
Culture Documents
Chfs Examples
Chfs Examples
1. To change the file system size of the /test Journaled File System, enter:
chfs -a size=24576 /test
This command changes the size of the /test Journaled File System to 24576 512-byte blocks, or
12MB (provided it was previously no larger than this).
This command increases the size of the /test Journaled File System by 8192 512-byte blocks, or 4 MB.
3. To convert a JFS2 file system to a version which can support NFS4 ACLs, type:
This command changes the mount point of a file system from /test to /test2.
This command removes the accounting attribute from the /home file system. The accounting
attribute is deleted from the /home: stanza of the /etc/filesystems file.
6. To split off a copy of a mirrored fs and mount it read-only for use as an online backup, enter:
7. To change the file system size of the /test Journaled File System, enter:
chfs -a size=64M /test
This changes the size of the /test JFS to 64MB (provided it was previously no larger than this).
chfs -a freeze=off /zml This command thaws the /zml file system.
/etc/filesystems Lists the known file systems and defines their characteristics.
Crfs Examples
1. To make a JFS on the rootvg volume group with nondefault fragment size and nondefault nbpi,
enter:
This command creates the /test file system on the rootvg volume group with a fragment size of 512
bytes, a number of bytes per i-node (nbpi) ratio of 1024, and an initial size of 16MB (512 * 32768).
2. To make a JFS on the rootvg volume group with nondefault fragment size and nondefault nbpi,
enter:
This command creates the /test file system on the rootvg volume group with a fragment size of 512
bytes, a number of bytes per i-node (nbpi) ratio of 1024, and an initial size of 16MB.
3. To create a JFS2 file system which can support NFS4 ACLs, type:
This command creates the /test JFS2 file system on the rootvg volume group with an initial size of 1
gigabyte. The file system will store extended attributes using the v2 format.
Files
/etc/filesystems Lists the known file systems and defines their characteristics.
Mkfs Examples
1. To specify the volume and file system name for a new file system, type:
This command creates an empty file system on the /dev/hd3 device, giving it the volume serial
number vol001 and file system name works. The new file system occupies the entire device. The file
system has a default fragment size (4096 bytes) and a default nbpi ratio (4096).
This command creates an empty 4 MB file system on the /dev/lv01 device with 512-byte fragments
and 1 i-node for each 2048 bytes.
This creates a large file enabled JFS file system with an allocation group size of 64 megabytes and 1
inode for every 131072 bytes of disk. The size of the file system will be the size of the logical volume
lv01.
This command creates an empty 4 MB file system on the /dev/lv01 device with 512-byte fragments
and one i-node for each 2048 bytes.
6. To create a JFS2 file system which can support NFS4 ACLs, type:
This command creates an empty file system on the /dev/lv01 device with v2 format for extended
attributes.
Files
/etc/vfs Contains descriptions of virtual file system types.
/etc/filesystems Lists the known file systems and defines their characteristics.
Mklv Examples
1. To make a logical volume in volume group vg02 with one logical partition and a total of two copies
of the data, type:
mklv -c 2 vg02 1
2. To make a logical volume in volume group vg03 with nine logical partitions and a total of three
copies spread across a maximum of two physical volumes, and whose allocation policy is not strict,
type:
mklv -c 3 -u 2 -s n vg03 9
3. To make a logical volume in vg04 with five logical partitions allocated across the center sections of
the physical volumes when possible, with no bad-block relocation, and whose type is paging, type:
4. To make a logical volume in vg03 with 15 logical partitions chosen from physical volumes hdisk5,
hdisk6, and hdisk9, type:
5. To make a striped logical volume in vg05 with a strip size of 64K across 3 physical volumes and 12
logical partitions, type:
6. To make a striped logical volume in vg05 with a strip size of 8K across hdisk1, hdisk2, and hdisk3
and 12 logical partitions, type:
The mklv command will determine the number of partitions needed to create a logical volume of at
least that size.
K/k KB
M/m MB
G/g GB
Files
/usr/sbin Directory where the mklv command resides.
/tmp Directory where the temporary files are stored while the command is running.