I don't have a definite answer, Geoff. But I'm wondering if 192M is just too little space to create a JFS2 filesystem. Back in the day, filesystems were megabytes in size, but it's been a long time since I've seen a filesystem smaller than a few gigabytes. Can you try making it a few gigabytes, just to see if that's the issue?
Original Message:
Sent: Thu February 24, 2022 03:35 PM
From: Geoff Bradford
Subject: AIX 7.2 commands to mount filesystem in order to write script
Thanks for all the responses, I am replying to Anker's as it seems to map most closely to my issue. When I look at my VG I see it has PPs=192M which must have come from PowerStore, where I created 2x 100M volumes for testing
# lsvg -l CL_clonedata_vg
CL_clonedata_vg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
root@s20da01:/ # lsvg -L CL_clonedata_vg
VOLUME GROUP: CL_clonedata_vg VG IDENTIFIER: 00fb3c9900004c000000017f22b7149d
VG STATE: active PP SIZE: 4 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 48 (192 megabytes)
MAX LVs: 256 FREE PPs: 48 (192 megabytes)
LVs: 0 USED PPs: 0 (0 megabytes)
OPEN LVs: 0 QUORUM: 2 (Enabled)
TOTAL PVs: 2 VG DESCRIPTORS: 3
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 2 AUTO ON: yes
MAX PPs per VG: 32512
MAX PPs per PV: 1016 MAX PVs: 32
LTG size (Dynamic): 1024 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
PV RESTRICTION: none INFINITE RETRY: no
DISK BLOCK SIZE: 512 CRITICAL VG: no
FS SYNC OPTION: no CRITICAL PVs: no
ENCRYPTION: no
So I successfully created the LV as follows:
mklv -t jfs2 -y CL_clonedata CL_clonedata_vg 192M
CL_clonedata
However the crfs command fails:
crfs -v jfs2 -m /usr/dell/CL_clonedata -d CL_clonedata -A yes
0516-404 allocp: This system cannot fulfill the allocation request.
There are not enough free partitions or not enough physical volumes
to keep strictness and satisfy allocation requests. The command
should be retried with different allocation characteristics.
0516-822 mklv: Unable to create logical volume.
crfs: 0506-973 Cannot create logical volume for log device.
It looks like this error is related to the log device. This is a mystery to me but I guess that the log device should also be on the SAN? It looks like the usual SAN setup (Oracle SAP) is one data vg and 2 log vgs.
In /etc/filesystems it looks like these are related, as in the following entry:
/usr/sap:
dev = /dev/usrsaplv
vfs = jfs2
log = /dev/loglv01
I saw a couple of responses suggesting that I create these in smitty and then look at the command line to see what the commands are. I tried that already, I guess I could try again, though I failed to get it to work before and the command was a ksh script so I had to try to figure out how the variables were being substituted to create the final command. I'm writing my script in Python.
Thanks
Geoff
------------------------------
Geoff Bradford
Original Message:
Sent: Thu February 24, 2022 09:43 AM
From: Anker Lerret
Subject: AIX 7.2 commands to mount filesystem in order to write script
Geoff, I think you're working too hard. A lot of the parameters that you're providing have lovely defaults. Of course, if you truly need to specify them, then specify them. But if you're lazy like me, here's what you do.
mklv -t jfs2 -y sas sas01vg 100G
You need to specify
-t jfs2 so that the logical volume is marked for JFS2.
-y <LVname>...well you don't actually have to, but otherwise you end up with fs00lv and like that. That's confusing and could lead you to issue a command against the wrong logical volume. So if I'm creating a filesystem called "/sas", then I use "-y sas". There are some limits as to length and content of the LV name.
crfs -v jfs2 -m /sas -d sas -A yes
Here you specify
-v jfs2 so that AIX builds a JFS2 filesystem. If I had written the code, it would have figured this out from the LV type (which does, IIRC, *have* to be "jfs2").
-m <mountpoint>
-d <LVname>
-A yes to automount at boot. I consistently forget this.
mount /sas
I consistently forget this too. After it's mounted, remember to chmod and chown as appropriate.
I hope that helps.
And welcome to AIX! It's a great OS.
------------------------------
Anker Lerret
Blue Cross Blue Shield of Massachusetts
Original Message:
Sent: Wed February 23, 2022 02:40 PM
From: Geoff Bradford
Subject: AIX 7.2 commands to mount filesystem in order to write script
Hi, I am an AIX newbie trying to write a script to automate the process of cloning and refreshing volume groups on AIX 7.2.0.0. The source data is on Dell PowerStore storage.
In order to write the script I am trying to determine the commands needed to get the filesystems mounted in AIX. What I have so far is:
- Use PowerStore GUI to create thin clone CL_clonedata and map to host
- Run cfgmgr and physical disks appear in lspv list with no PVID or VG
- Run chdev to add PVIDs to physical disks
- Run mkvg to create volume group: mkvg -y CL_clonedata_vg hdiskpower0 hdiskpower1
- Run mklv to create logical volume: mklv -c 1 -t jfs2 CL_clonedata_vg 1
- This creates a logical volume with the following properties, I don't know if these are correct:
lslv -L fslv00
LOGICAL VOLUME: fslv00 VOLUME GROUP: CL_clonedata_vg
LV IDENTIFIER: 00fb3c9900004c000000017f22b7149d.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: 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
INFINITE RETRY: no PREFERRED READ: 0
ENCRYPTION: no
The next step seems to be to use 'crfs' to create the filesystem, running the command below gives me an error, but I'm not sure what the options should be or if the logical volume has the correct properties.
# /usr/sbin/crfs -v jfs2 -g CL_clonedata_vg -a size=200M -m /usr/dell/CL_clonedata -A yes -p rw -a agblksize=4096 -a logsize=100M
crfs: 0506-963 Invalid attribute value: 100M
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]
Hoping someone in this group can point me in the right direction!
Thanks
Geoff
------------------------------
Geoff Bradford
------------------------------