Posts Tagged ‘lsvg’
How To Remove VG With No Disk?
How to remove VG with no disk?
Or
How to remove VGDA or VG information?
VGDA information is mostly available in /etc/filesystem and ODM.
Command to remove VGDA information:
Run the command,
# exportvg
This command will remove vg information from /etc/filesystem and ODM.
And this will only happen when VG is not varied on.
Command to check whether the VG is varied on or not:
# lsvg –o | lsvg –il
Command to vary off a VG:
# varyoff vg <vgname>
Happy learning !
Steps To Create A VG With User Defined Name
Steps To Create A VG With User Defined Name
This Blogpost deals about steps to create a VG with user defined name. Initially we discussed about how to create a VG with default name.
End users in an environment sometimes require VG LV creation with a defined name as per requirement. In this case, users cannot rely on default naming provided by the OS.
The various commands used in creating a VG and LV with user defined name will be discussed here in this particular post.
Check the PV information by running:
# lspv
Create a VG with user defined name “oracle_vg” (for eg) by running the following command:
# mkvg –y oracle_vg –S 32 hdisk0 hdisk5
Interpretation for the above command:
# mkvg –y vgname –S (for scalable), -N (for Normal), -B (for Big) <PP size> PV
Admin can verify the VG information by running the following commands:
# lsvg
OR
# lsvg oracle_vg
OR
# lsvg –p oracle_vg
Once a VG is created, a LV with user defined name (oracle_lv) is created on top of it by running the following command:
# mklv –y oracle_lv –t jfs/jfs2 oracle_vg 10 hdisk5
Interpretation for the above command:
# mklv –y lvname –t <type of LV> <vgname> <Number of LPs> PV
Admin can verify the LV creation by running:
# lslv oracle_lv
OR
# lslv –l oracle_lv
Next Step is to create a directory:
# mkdir /ora
Then create a FS on oracle_lv with /ora as mount directory:
# crfs –v jfs/jfs2 –d oracle_lv –m /ora –A yes
Now Mount the FS:
# mount /ora
Verify the FS:
# mount
Complete FS information:
# lsfs
Complete PV, VG information:
# Lsvg –o | lsvg –il
Next, I will discuss Steps to increase/decrease size of a FS.
Happy Learning !
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:
# lspv
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
OR
# 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:
1. crfs
2. mkfs
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:
# mount
To Display Complete FS information, command used is:
# df -m
OR
# lsfs
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 !




