Steps To Create A File System
This post deals about the various steps involved in creating a file system.
Once a PV is available in the system, admin can list down the PVs by running the following command:
To Create a VG from a PV with Default Name, command used is:
# mkvg hdisk0
This command will create a VG with default name vg00.
Once a VG is created, LV is created with a default name lv00 and admin assigns number of LPs to the LV by running the following command:
# mklv vg00 10
To Check VG information interms of PPs assigned, command used:
# lsvg -p vg00
To Check VG information interms of LPs assigned, command used:
# lsvg -l vg00
To Check complete LV information, command used:
# lslv lv00
# lsvg -l vg00
After LV creation, a directory is created:
# mkdir /test01
After the creation of Directory, a FS is created by running the following command:
# crfs -v jfs -d lv00 -m /test01 -A yes
CRFS stands for create a File System.
-v flag is used to mention the type of file system admin is planning to create.
-d is used to know in which LV the file system will be created and -m for the directory on which the file system will be mounted.
- A flag is used to Activate the FS on Next Reboot.
P.S : there are 2 commands to create a FS:
The only difference between the two is, mkfs only creates a file system whereas crfs not only creates a FS in LV, it also mounts the FS on a directory and updates /etc/filesystem and ODM about the FS created.
A File System created using crfs command will have the same name as that of the directory. here /test01.
Next, admin mounts the FS by running:
# mount /test01
Verifies the FS is mounted or not:
To Display Complete FS information, command used is:
# df -m
Finally, we can check the complete information about PV, VG, LV and FS by running the following command:
# lsvg -o | lsvg -il
This post gave an insight on how a FS is created by creating a VG and LV first on a PV.
keep reading to know how unmounting is done and how a VG is created with a user defined name.
till then, Happy Learning !