Question & Answer
Question
Can JFS2 filesystems created on AIX 6 be imported and mounted on previous versions of AIX?
Answer
The answer depends on the type of AIX 6 enhancement that has been added or created on the JFS2 filesystem.
$ lsvg -l efsvg
efsvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
efslv01 jfs2 20 20 1 closed/syncd /efstest
jfs2lv jfs2 20 20 1 closed/syncd /inlinesnap
fslv07 jfs2 20 20 1 closed/syncd /jfstest
loglv01 jfs2log 1 1 1 closed/syncd N/A
In this example, the filesystem /efstest is a JFS2 filesystem with EFS (Encrypted Filesystem) enabled on it.
# lsfs -q /efstest
Name Nodename Mount Pt VFS Size Options Auto Accounting
/dev/efslv01 -- /efstest jfs2 655360 rw yes no
(lv size: 655360, fs size: 655360, block size: 4096, sparse files: yes, inline log: no, inline log size: 0, EAformat: v2, Quota: no, DMAPI: no, VIX: yes, EFS: yes, ISNAPSHOT: no)
/inlinesnap is a filesystem created with Inline Snapshots
# lsfs -q /inlinesnap
Name Nodename Mount Pt VFS Size Options Auto Accounting
/dev/jfs2lv -- /inlinesnap jfs2 655360 rw no no
(lv size: 655360, fs size: 655360, block size: 4096, sparse files: yes, inline log: no, inline log size: 0, EAformat: v2, Quota: no, DMAPI: no, VIX: yes, EFS: no, ISNAPSHOT: yes)
Attempt to import into an AIX 5.3 system, which does not contain these enhancements.
# importvg -y aix61vg hdisk19
aix61vg
# lsvg -l aix61vg
aix61vg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
efslv01 jfs2 20 20 1 closed/syncd N/A
jfs2lv jfs2 20 20 1 closed/syncd /inlinesnap
fslv07 jfs2 20 20 1 closed/syncd /jfstest
loglv01 jfs2log 1 1 1 closed/syncd N/A
1. Volume group containing EFS-enabled JFS2 filesystem
The volume group will import, but the filesystem information will not be read correctly from the superblock. Note above after the import the mount point lists "N/A" for efslv01.
There will also not be any information for the filesystem added to /etc/filesystems.
# mkdir /efstest
# mount /dev/efslv01 /efstest
mount: 0506-322 Cannot determine log device to use for /dev/efslv01 (/efstest).
# mount -o log=/dev/loglv01 /dev/efslv01 /efstest
Replaying log for /dev/efslv01.
mount: 0506-324 Cannot mount /dev/efslv01 on /efstest: The media is not formatted or the format is not correct.
Running fsck on the filesystem produces these errors:
# fsck /dev/efslv01
fsck: 0506-040 Cannot find the Vfs value for file system /dev/efslv01.
# fsck -V jfs2 /dev/efslv011
The current volume is: /dev/efslv01
File system version contains unsupported features in primary superblock.
The reason you cannot use the EFS filesystem is because when changing or creating the filesystem with EFS enabled the change made to the filesysetm superblock is not backwards-compatible. Additionally if you had encrypted files in the filesystem they would be inaccessible to earlier versions of AIX since they did not have EFS.
2. Volume group containing JFS2 filesystem with inline snapshots
The volume group will import, and the filesystem will show the correct mount point information.
However the filesystem will only mount read-only, and the snapshot subdirectories will not be available.
On the AIX 6.1 system:
# snapshot -q /inlinesnap
Snapshots for /inlinesnap
Current Name Time
* friday Fri Jan 25 13:49:22 PST 2008
# cd /inlinesnap/.snapshot/friday
# pwd
/inlinesnap/.snapshot/friday
After importing on an AIX 5L system:
# mount /inlinesnap
mount: 0506-324 Cannot mount /dev/jfs2lv on /inlinesnap: JFS2 file system has
read permission only. The device is read-only or the file system
contains unsupported features. Use "-o ro" flag to mount as read-only.
# mount -o ro /inlinesnap
# df
Filesystem 512-blocks Free %Used Iused %Iused Mounted on
/dev/jfs2lv 655360 648840 1% 138 1% /inlinesnap
# cd /inlinesnap/.snapshot/friday
sh: /inlinesnap/.snapshot/friday: not found.
Since External Snapshots are a feature found in AIX 5.2 and 5.3 there is support for the filesystem in those earlier versions of AIX. However the Internal Snapshot feature cannot be used.
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
isg3T1010724