I'm getting some difficulties to create a file system on an AIX server. In Linux the task is easy and takes four commands, but I cannot figure out how to do it in AIX.

On Linux I'd do the following:

lvcreate -L 6G -n oracle_rec_sei data_vg
mkfs -t ext3 /dev/data_vg/oracle_rec_sei
mkdir -p /appli/oracle/REC_SEI
mount /dev/data_vg/oracle_rec_sei /appli/oracle/REC_SEI

On AIX I am trying with the following commands but in this case there isn't a volume group defined. The commands I've found are giving me errors according to the absence of a volume group.

I'm trying to create a filesystem of 0.25G with this commands:

mklv -y lvoractl01HIST -c 1 jfs2 2 --> 2 blocks of 127Mb
crfs -v jfs2 -d /dev/lvoractl01 -m /appli2/oracle/AGEV/oractl01 -a agblksize='4096'
mount /dev/lvoractl01AGEV

I obtained numerous errors with the first command (mklv -y lvoractl01HIST -c 1 jfs2 2) because it needs the definition of a volume group.

What are the steps to create a volume group, a logical volume and a file system (all of a given size) on an AIX host?

  • So your question really is "how do I create a logical volume in AIX that I can later make a file system on?" (guessing from mklv), right? – a CVn Dec 18 '13 at 8:46
  • Yeah, i don't understand exactly the equivalent commands in UNix that i usually use in linux to create filesystem of a desired size. – Jorge Vega Sánchez Dec 18 '13 at 8:49
  • I've edited your question to hopefully clarify exactly what you are looking for. If you feel the edit changes the intent of your question, do feel free to edit further. (I'm not familiar with AIX myself.) – a CVn Dec 18 '13 at 8:57

Create a volume group.


Create a logical volume in the volume group.


Create a filesystem on that logical volume.

crfs or mkfs

Couldn't get more consistent naming than AIX commands (pre-around v6).

Obviously, you can use the man pages to get everything you need. But at their very basic level,

mkvg -y myvg hdisk5 hdisk6 (create a volume group call myvg which contains the physical volumes hdisk5 and hdisk6).

mklv myvg 10G (create a logical volume, with the default name, in the myvg volume group of at least 10GB in size).

crfs -V jfs2 -d /dev/lv01 -m /my/dir/fs (create a filesystem called /my/dir/fs mounted on the /dev/lv01 logical volume, of type jfs2).


If in doubt, there's always: smitty crfs

I know it's a newbie tip, but in there you can press F6 to get the official command that's run by the IBM tool. Then use that in future.

  • Could you edit your answer and explain more clearly please? What is this tool? How does one install it? Run it? How exactly does this answer the OP's question? – terdon Oct 28 '15 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.