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.
- Backup the existing disks details.
#lspv > /disk_before #lspv |wc -l
- Scan for new LUN.
- 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
- 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
- Validate the VG created newly. Ensure total and free PP’s counts are as expected.
- 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
- Create JFS2 filesystem and mount point (/opt/app1).
#crfs –v jfs2 –d app1_lv –m /opt/app1 –A yes #lsvg –l appdata
-A – enable or disable automount upon reboot.
-d – device name (LV name alone). No need to specify VG like we do in Linux.
- Mount the filesystem.
#mount /opt/app1 #df –gt
That is it. Any queries please post.