Translation(s): English - Italiano


Compatibility

File system check

ext4 is a journaling file system, meaning it maintains a journal of operations not yet committed to disk, and is able to prevent some amount of data loss after a system crash or power failure. If an ext4 filesystem is determined "unclean" on boot (traces of remaining operations in the journal), the system will run fsck and attempt to repair the filesystem, and write uncommited blocks to the lost+found/ directory. At the very least, the filesystem will be restored to a working state.

With systemd, the old method touch /forcefsck no longer works to force a filesystem check on next boot. Instead you have to edit /etc/default/grub and add fsck.mode=force to your kernel command line:

GRUB_CMDLINE_LINUX="fsck.mode=force"

Then do an update-grub and reboot. Afterwards, remove the fsck.mode=force option and update-grub again.

Old Debian releases

ext4 was introduced in kernel 2.6.28. Previous kernels had a development/experimental implementation of ext4 (ext4dev). Old Debian releases (i.e. Lenny, kernel 2.6.26 and earlier) don't support ext4, or only support it in an experimental, read-only mode:

tune2fs -E test_fs /dev/XXX
mount -t ext4dev -o ro /dev/XXX /mnt/ZZZ

See also


CategoryKernel | CategoryStorage | CategorySystemAdministration