Question & Answer
Question
Why am I seeing an error J2_SNAP_EIO in the errpt -a output?
Answer
This relates to the JFS2 feature called "snapshots", which are a point-in-time image of a filesystem's data. The JFS2 snapshot command creates a new logical volume that contains the data of the original one, at the time the snapshot was created.
For example, say we have an original filesystem, and we create a snapshot logical volume for it:
# lsfs -q /origfs
Name Nodename Mount Pt VFS Size Options Auto
Accounting
/dev/fslv02 -- /origfs jfs2 4194304 rw no
no
(lv size: 4194304, fs size: 4194304, block size: 4096, sparse files: yes, inline log: no, inline log size: 0, reserved: 0, reserved: 0, DMAPI: no, VIX: yes)
In the lsfs -q output the size is reported in 512-byte blocks. So in the above example the filesystem and logical volume are 2Gb in size. We'll make the snapshot filesystem 204Mb (10% of the original).
# snapshot -o snapfrom=/origfs -o size=419430
Snapshot for file system /origfs created on /dev/fslv05
Use of rmlv to remove a snapshot logical volume will result in the generation of J2_SNAP_EIO errors when the original filesystem is mounted again.
# mount /origfs
# errpt -a
--------------------------------------------------------------------------
LABEL: J2_SNAP_EIO
IDENTIFIER: 9C110A13
(...)
Description
Unable to write into a JFS2 snapshot
Probable Causes
Write error on JFS2 snapshot
Recommended Actions
The snapshots for the JFS2 file system are now invalid.
Correct the I/O problem and then create a new snapshot.
(...)
Detail Data
Snapshot Major/Minor device number
0024 0007
Snapshot generation number
0000 0000
FILE SYSTEM DEVICE AND MOUNT POINT
/dev/fslv02, /origfs
In order to recover from the accidental deletion of a snapshot in this manner, use fsck on the original filesystem. You will see a message similar to this:
# umount /origfs
# fsck -y /origfs
The current volume is: /dev/fslv02
Primary superblock is valid.
J2_LOGREDO:log redo processing for /dev/fslv02
Primary superblock is valid.
One or more snapshots in the filesystem have failed.
Snapshots must be removed to continue fsck processing (RELEASED)
*** Phase 1 - Initial inode scan
*** Phase 2 - Process remaining directories
*** Phase 3 - Process remaining files
*** Phase 4 - Check and repair inode allocation map
*** Phase 5 - Check and repair block allocation map
File system is clean.
At this point you can mount the original filesystem and create new snapshots against it.
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
isg3T1022177