Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Confused about where the filesystems are built on

Status
Not open for further replies.

dman7777777

IS-IT--Management
Jan 13, 2007
52
US
I was reading my AIX book and it states that the filesystems are built on top of the logical volumes. But, if a Volume Group has more than one logical volume, than how can this command know which logical volume to put the filesystem on?

crfs -v jfs2 -g volumegroup_name -a size=10M -m /fs1
[this command line is from 'AIX commands you should never leave home without']

 
The fact is with crfs command you make the LV attached to the filesystem. The LV doesn't exist before you execute crfs.

 
There are two ways you can create a filesystem!

One way is to define the logical volume first then create the filesystem on that logical volume

The second way is to go ahead and create a filesystem and the logical volume will be automatically created for you

The first choice will give you more control on the size of the logical volume

you can find that when you do:

Code:
smitty jfs
Code:
Add a Journaled File System
Add a Journaled File System on a Previously Defined Logical Volume

Regards,
Khalid
 
Ok, I know if I do 'mklv -y logicalvolume_name volumegroup_name number_of_partitions' it will make a logical volume.


but, if I do 'crfs -v jfs2 -g volume_group_name -a size=10M -m /fs1' it will automatically create a logical volume(and I'm assumeing the lv would be called fs1)?

 
No the name will be lv00 or fslv00 for the first filesystem you create on a system, lv01 or fslv01 for the next etc...

lvNN is the name for the LV being created automatically for JFS filesystems.

fslvNN is for JFS2 filesystems I believe, but they might have changed that back to use the same naming convention for JFS/JSF2 i.e. both using the lvNN naming schema.

In any case you can rename the LV afterwards with the file system unmounted (LV needs to be in a closed state).

And for the other way around:

mklv -y lv_name vg_name num_partitions
crfs -v jfs2 -d lv_name -m /myfsname -Ay -tn -prw

Notice no -asize option: the size will be determined by the size of the LV.
The last 3 options are for automount on boot, no accounting and read/write permission respectively.



HTH,

p5wizard
 
Yes, it will automatically create a logical volume.
No, it wouldn't be called fs1, it normally calls them lv00, lv01, lv02, etc...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top