AIX create new filesystem in 8 steps

How to create new filesystem in AIX from scratch? This post let help you create new filesystem in just 8 steps. Believe me it is much easier than Linux.

Get the new disk allocated from SAN.

  1. Backup the existing disks details.
#lspv > /disk_before
#lspv |wc -l
  1. Scan for new LUN.
#cfgmgr
  1. Identify the new disk device name. Keep note the disk name such as hdisk13.
#lspv |wc -l
#lspv > /disk_new
#diff /disk_before /disk_new
  1. Create new VG named “appdata” with PP (physical partition) size of 512MB.
#mkvg –y appdata –s 512 hdisk13

If it reports error like disk belongs to another volume group. Do recheck the device name and try force (-f) option. It happens when we reuse old disks.

#mkvg –f –y appdata –s 512 hdisk13
  1. Validate the VG created newly. Ensure total and free PP’s counts are as expected.
#lsvg appdata
  1. Create logical volume named “app1” with type of “JFS2”. Size should be mentioned in PP’s count. The volume with 100GB size needs 200 PP’s (200 x 512MB = 100GB).
#mklv –y app1_lv –t jfs2 appdata 200
#lsvg –l appdata
  1. Create JFS2 filesystem and mount point (/opt/app1).
#crfs –v jfs2 –d app1_lv –m /opt/app1 –A yes
#lsvg –l appdata

Note

-A – enable or disable automount upon reboot.

-d – device name (LV name alone). No need to specify VG like we do in Linux.

  1. Mount the filesystem.
#mount /opt/app1
#df –gt

That is it. Any queries please post.

4 thoughts on “AIX create new filesystem in 8 steps

Leave a Reply

Your email address will not be published. Required fields are marked *