IBM AIX: How to create a file system

On IBM AIX, you can create a file system using the crfs command. Below are the steps to create a simple Journaled File System (JFS) on AIX:

  1. Determine Disk and Logical Volume: Identify the physical disk and logical volume that you want to use for the file system. You can use the lspv and lsvg commands to list physical volumes and volume groups, respectively.lspv lsvg
  2. Create a Logical Volume: Use the mklv command to create a logical volume. Replace <volume_group> with the actual volume group name, <logical_volume> with the logical volume name, and <size> with the desired size.mklv -y <logical_volume> -t jfs2 <volume_group> <size>
  3. Create a File System: Use the crfs command to create a file system on the logical volume you just created. Replace <mount_point> with the desired mount point for the file system.crfs -v jfs2 -d <logical_volume> -m <mount_point> -A yes -p rw
    • -v jfs2: Specifies the type of file system as Journaled File System 2 (JFS2).
    • -d <logical_volume>: Specifies the logical volume.
    • -m <mount_point>: Specifies the mount point for the file system.
    • -A yes: Enables automatic mount during system startup.
    • -p rw: Specifies the mount options as read-write.
  4. Mount the File System: Use the mount command to mount the newly created file system.mount <mount_point>
  5. Verify the File System: Use the df command to verify that the file system is mounted.df -g

This is a basic example of creating a JFS2 file system on AIX. Adjust the commands and options based on your specific requirements, such as choosing a different file system type or specifying additional mount options.

Always refer to the AIX documentation or consult with your system administrator for the most accurate and up-to-date information based on your AIX version.

Leave a comment