Create jfs2 logical volume on AIX

How to create a jfs2 logical volume on AIX?

First, you need to know:

  • Which volume group you’re going to create the LV. In our case ‘newvg’
[root@aix:/] lsvg -o
rootvg
newvg
  • Volume group PP size. In our case ‘4MB’
[root@aix:/] lsvg newvg|grep "PP SIZE:"
VG STATE:           active                   PP SIZE:        4 megabyte(s)

Now, let’s create the LV named ‘newlv’ with size 8 LPs:

[root@aix:/] mklv -t jfs2 -y newlv newvg 8
newlv

Let’s check logical volume newlv:

[root@aix:/] lsvg -l newvg
newvg:
LV NAME   TYPE   LPs  PPs  PVs    LV STATE     MOUNT POINT
newlv     jfs2    8   8    1    closed/syncd     N/A

[root@aix:/] lslv newlv
LOGICAL VOLUME:     newlv                  VOLUME GROUP:   newvg
LV IDENTIFIER:      000fd1bb0000d4000000015988de0d0f.1 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       closed/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            512                    PP SIZE:        4 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                8                      PPs:            8
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    1024
MOUNT POINT:        N/A                    LABEL:          None
DEVICE UID:         0                      DEVICE GID:     0
DEVICE PERMISSIONS: 432
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?:     NO
INFINITE RETRY:     no
DEVICESUBTYPE:      DS_LVZ
COPY 1 MIRROR POOL: None
COPY 2 MIRROR POOL: None
COPY 3 MIRROR POOL: None

 

Create a jfs2 file system on AIX:

First, you need to know:
– volume group?
– Type of filesystem (jfs, jfs2)?
– Mount point to mount the filesystem?

There are two ways to create filesystems on AIX:
1- Over an existing created logical volume (In this example, we’ll create a new filesystem over logical volume ‘newlv’, size 32M, mounted on /newfs, type jfs2.)

[root@aix:/] crfs -v jfs2 -A yes -d newlv -m /newfs
File system created successfully.
32560 kilobytes total disk space.
New File System size is 65536

NOTE: '-A yes' means to mount automatically the FS

2- Or creating a new LV (In this example we’ll create a new filesystem mounted on /newfs2, size 64MB, type jfs2 inside volume group ‘newvg’)

[root@aix:/] crfs -v jfs2 -g newvg -A yes -m /newfs2 -a size=64M
File system created successfully.
65328 kilobytes total disk space.
New File System size is 131072

NOTE: '-A yes' means to mount automatically the FS

Then, let’s mount filesystems:

[root@aix:/] mount /newfs
[root@aix:/] mount /newfs2

Now, you can check the filesystem with ‘lsfs’ and ‘df’ command:

[root@aix:/] df -m /newfs
Filesystem    MB blocks      Free %Used    Iused %Iused Mounted on
/dev/fslv05       64.00     63.67    1%        4     1% /newfs2
/dev/newlv        32.00     31.67    2%        4     1% /newfs
[root@aix:/] lsfs|grep newfs
/dev/newlv      --         /newfs                 jfs2  65536   --         yes  no
/dev/fslv05     --         /newfs2                jfs2  131072  --         yes  no
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
AIX - How to monitor CPU usage
Viewed 25426 times since Fri, Jun 8, 2018
IBM V7000f Performance Test with Vdbench Tool on IBM AIX
Viewed 15569 times since Thu, Jan 23, 2020
AIX, Storage, System Admin↑ Identifying a Disk Bottleneck Using filemon
Viewed 9505 times since Fri, Apr 19, 2019
IP configuration in AIX
Viewed 2417 times since Tue, Jul 17, 2018
AIX, Monitoring, System Admin↑ NMON recordings
Viewed 2745 times since Fri, Apr 19, 2019
0516-404 allocp: This system cannot fulfill the allocation request. [AIX]
Viewed 4717 times since Thu, Sep 20, 2018
Script to download TL and SP for AIX using NIM and SUMA
Viewed 8758 times since Thu, Feb 21, 2019
Install and configure GNU watch (gwatch) on AIX
Viewed 7493 times since Thu, Feb 21, 2019
Replacing a failed disk (rootvg)
Viewed 2711 times since Mon, May 21, 2018
My LPAR always boots into SMS. Why?
Viewed 3251 times since Tue, Apr 16, 2019