AIX : Create file system on a existing LV?

g0all
g0all used Ask the Experts™
on
Hi,

I'm having a raw lv, lv_test.
Can somebody tell me how to create a file system on that  LV so I'll be able to mount it?

Thanks!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2013
Top Expert 2013

Commented:
OK,

here's somebody to tell you.

crfs -v jfs2 -d lv_test -m /mount/point -A yes
mount /mount/point

Replace /mount/point with the actually desired mountpoint. No need to create it beforehand, crfs will do it for you.

Note that there should be a jfs2 log volume available in the VG.
Check with "lsvg -l vgname |grep log"

If there isn't we will either have to create one or we must specify as an additional parameter "-a logname=INLINE" to configure inline logging for this FS.

"-A yes" means automatic mounting at system restart.

wmp

Author

Commented:
Hi wmp,

Thank you, but I'm doing something wrong, not sure what:

 crfs -v jfs2 -d lv_test -m /test2 -A yes
crfs: 0506-947 lv_test: logical volume must be type jfs2.
Usage: crfs -v Vfs {-g Volumegroup | -d Device} -m Mountpoint
        [-u Mountgroup] [-A {yes|no}] [-t {yes|no}] [-p {ro|rw}]
        [-l Logpartitions] [-n nodename] [-a Attribute=Value]


lslv lv_test
LOGICAL VOLUME:     lv_test                VOLUME GROUP:   rootvg
LV IDENTIFIER:      00d5bb3200004e0000000130e0f804c8.13 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       closed/syncd
TYPE:               raw                    WRITE VERIFY:   off
MAX LPs:            512                    PP SIZE:        64 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                1                      PPs:            1
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    32
MOUNT POINT:        N/A                    LABEL:          None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?:     NO
Most Valuable Expert 2013
Top Expert 2013
Commented:
OK, sorry,

I overlooked that it's a "raw" LV.

We must change the LV type before creating the FS.

chlv -t jfs2 lv_test

Did you find a log volume in the VG?
Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Author

Commented:
So the order is:

chlv -t jfs2 lv_test

 crfs -v jfs2 -d lv_test -m /test2 -A yes

?

Regarding the log:

lsvg -l rootvg |grep log
hd8                 jfs2log    1       1       1    open/syncd    N/A

Is that fine?
Most Valuable Expert 2013
Top Expert 2013

Commented:
OK, correct. And the log is present, that's perfect.

Author

Commented:
Perfect!

Author

Commented:
Short question: that log is related to LV or to VG?
Most Valuable Expert 2013
Top Expert 2013

Commented:
You can configure one single log for all LVs in the VG, one log per LV, or several logs each one for a subset of the LVs in the VG.
If there is only one log in the VG "crfs" assumes this one as the default log and uses it automatically.

The log and its FS must be in the same VG, however. No "cross-VG" logging!

Thx for the points!

Author

Commented:
Thank you so much!!!!!!!!!!!!!!!!!!!!!!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial