ABC Of AIX

Welcome to the World of AIX learning!!!

Posts Tagged ‘mkvg

VG Commands

leave a comment »

Although we have already discussed the use of VG Commands in detail in previous posts on LVM, this post will give a brief review about the various VG commands we have learned so far.

# mkvg

Command is used to create a new VG.

# extendvg

Command is used to add PVs to VG.

# reducevg

Command is used to remove PV from VG.

# chvg

Command is used to change VG.

# lsvg

Command is used to list all the VG in the system.

# importvg

Command is used to add/install a VG.

# exportvg

Command is used remove the VG from the system. we will discuss about the significance of exportvg command in detail in posts to come.

# reorgvg

Command is used to reorganize the VG.

# syncvg

Command is used to synchronize a VG.

# varyonvg

Command is used to make VG available to the system for use.

# varyoffvg

Command is used to make VG unavailable to the system.

# mirrorvg

Command is used to mirror all LV within a VG.

Happy Learning!

Written by RA

April 20, 2012 at 4:18 pm

Steps To Create A File System

leave a comment »

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

abc of aix

lspv 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

abc of aix

lsvg command

To Check VG information interms of LPs assigned, command used:

# lsvg -l vg00

abc of aix

lsvg -l

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

abc of aix

lsfs command

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 !

Written by RA

February 10, 2012 at 1:17 am