EUCLEAN
Linux / POSIXERRORNotableFilesystemHIGH confidence
Structure Needs Cleaning
Production Risk
High — filesystem may be corrupted; run fsck before mounting.
What this means
EUCLEAN (errno 117) is returned when a filesystem structure is inconsistent and needs to be cleaned — typically after an unclean shutdown. Most commonly seen with ext2/ext3/ext4 and UBIFS.
Why it happens
- 1Filesystem was not cleanly unmounted and has journal inconsistencies
- 2UBIFS flash filesystem has corruption that needs fsck
How to reproduce
Mounting a filesystem that needs fsck after crash.
trigger — this will error
trigger — this will error
// mount() returns EUCLEAN for dirty filesystem
mount("/dev/sdb1", "/mnt/data", "ext4", 0, NULL);
// Returns -1, errno = EUCLEANexpected output
mount: Structure needs cleaning (EUCLEAN)
Fix
Run fsck on the filesystem
WHEN When EUCLEAN is returned on mount
Run fsck on the filesystem
# Unmount first (if mounted) umount /dev/sdb1 # Run filesystem check fsck -y /dev/sdb1 # Or for ext filesystems specifically: e2fsck -f /dev/sdb1
Why this works
fsck repairs filesystem metadata inconsistencies; -y answers yes to all repair prompts.
What not to do
✕ Force mount with -o nocheck to bypass fsck
Running with a dirty filesystem risks further corruption and data loss.
Sources
Official documentation ↗
Linux Programmer Manual fsck(8)
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev