Avatar of g0all
g0all
Flag for Saint Pierre and Miquelon asked on

AIX : Create file system on a existing LV?

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!
Unix OS

Avatar of undefined
Last Comment
g0all

8/22/2022 - Mon
woolmilkporc

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
g0all

ASKER
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
ASKER CERTIFIED SOLUTION
woolmilkporc

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
g0all

ASKER
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?
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
woolmilkporc

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

ASKER
Perfect!
g0all

ASKER
Short question: that log is related to LV or to VG?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
woolmilkporc

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!
g0all

ASKER
Thank you so much!!!!!!!!!!!!!!!!!!!!!!