Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Lustre 2.5.3
-
None
-
TOSS 2.4-9
-
2
-
9223372036854775807
Description
After a power outage we encountered a hardware error on one of our storage devices that essentially corrupted ~30 files on one of the OSTs. Since then the OST has been read-only and is throwing the following log messages:
[ 351.029519] LustreError: 8974:0:(ofd_obd.c:1376:ofd_create()) fscratch-OST0001: unable to precreate: rc = -5
[ 360.762505] LustreError: 8963:0:(ofd_obd.c:1376:ofd_create()) fscratch-OST0001: unable to precreate: rc = -5
[ 370.784372] LustreError: 8974:0:(ofd_obd.c:1376:ofd_create()) fscratch-OST0001: unable to precreate: rc = -5
I have scrubbed the device in question and rebooted the system bring up the server normally but I am still unable to create a file on that OST.
zpool status -v reports the damaged files and recommended restoring from backup and I'm inclined to simply removing the files. I know how to do this with ldiskfs but I don't know how to with ZFS. At this point I don't know how to proceed.
Attachments
Issue Links
- is related to
-
LU-7585 Implement OI Scrub for ZFS
-
- Resolved
-
For a given Lustre striped regular file, its attributes are distributed to several targets (MDT and OSTs). The filename, owner, mode and permission are stored on the MDT. Each stripe (or OST-object) stores its own size/blocks attribute, client needs to calculate the file size/blocks attribute by sum all related OST-objects' size/blocks attributes. As for the xtime (atime, mtime, ctime) attribute, both the MDT-object and OST-objects store the timestamp. Which one will be used as the file xtime, depends on which ctime is newer.
So directly mount the target as backend filesystem, in spite of "ldiskfs" or "ZFS", you can NOT directly get the file size and xtime attributes. But you can calculate those attributes. For a given OST-object, you can get its MDT-object's FID from the OST-object's PFID EA, the OST-objects with the same MDT-object's FID belong to the same file. Then you can sum related OST-objects' size, and also compare their ctime. So you can get the file's size/time attributes. But consider such process, I am not sure whether it is really more efficient than directly collecting the information from Lustre client.