Tag Info

Hot answers tagged

10

I was going to suggest hacking e2fsck to disable the specific checks for a last mount time or last write times in the future. These are defined in problem.c / problem.h, and used in super.c. But in looking, I discovered that E2fsprogs 1.41.10 adds a new option to /etc/e2fsck.conf called broken_system_clock. This seems to be exactly what you need, and since ...


10

The answer to your question lies in the e2fsck/problems.c file of the e2fsprogs source code. Looking for the PR_PREEN_OK flag should get you started. As the complete error handling is a bit more involved, due to the multitude of different error conditions that may occur, you are advised to have a closer look at the code if you are concerned about a specific ...


10

The internal structure of filesystems is totally different among each other, so different programs are needed for different filesystems. Even on UNIX/Linux systems there is a dedicated filesystem check program for every filesystem implementation (ext*, xfs, jfs, etc.) Normally the initial command chkdsk/fsck checks the format of the underlying filesystem ...


7

That's one of the most advertised benefits of ext4 (see it mentioned in the Features on Wikipedia). The reason? Filesystem developers worked hard to achieve this. Here's a short summary quoted from Wikipedia: Faster file system checking In ext4, unallocated block groups and sections of the inode table are marked as such. This enables e2fsck to ...


7

This flag does not exist in Upstart's version of shutdown. Ubuntu migrated to using Upstart as its default init system in 6.10, when sysvinit was replaced. See this bug for more information.


7

fsck is the original name for this tool. When new file systems came out they would need specific tools for each one. So fsck just acts as a frontend and will call the appropriate filesystem *fsck for operations that it's not able to do itself. excerpt from the fsck man page fs-specific-options Options which are not understood by fsck are passed to ...


7

It sounds like the hard disk itself is having problems. ("short read," etc.) If so, dmesg | tail will probably show some I/O errors. Another way to check this is to run badblocks -n on the problem partition. Or better, on the entire disk. Whatever you test, it needs to be unmounted. This will take hours on a large modern disk. If there's anything on the ...


6

It has to do with boot order. Highest priority is required for booting (/ and in my opinion /usr /var /tmp ...). The /boot filesystem can do with lower priority because by the time the system can start fsck's, it read the necessary files from boot already. Filesystems for home directories etc. are lower priority during boot process.


6

First of all, as far as I can tell, your disk is fine and everyone should relax. This is a safety feature, you can set a disk to be checked on each mount or after a specified number of mounts. If you have not done so, your system will give you the warnings you show, letting you know that it has been a while since the disk was last checked and that it would ...


6

When fsck runs, it should first try to locate the superblock of a filesystem to begin traversing the filesystem's structure in order to validate it. Since the /dev/sda device corresponds to whole drive, the first portion of the disk will likely contain the partition table or Master Boot Record and fsck will not be able to locate the superblock for a ...


5

e4fsprogs on RHEL5 is just a newer version of e2fsprogs. Red Hat has a policy of not upgrading to newer, binary-incompatible versions of things, so they "had to" stay on the old e2fsprogs they were using, and the solution they came up with to support ext4 was to introduce the newer version as e4fsprogs (with s/2/4/ on all of the command names). To make ...


5

Seems your disk is damaged I recommend you to stop using it. Fsck stands for file system check which is a tool to repair problems in file systems. As the usage of this tool can result in dataloss if some details are not observed (i.e. running it on a mounted file system) strongly recommend you to read this manpage And google a bit before taking any decision. ...


5

In /etc/init.d/checkfs.sh is the line if [ -f /forcefsck ] || grep -s -w -i "forcefsck" /proc/cmdline, so providing forcefsck on the kernel command line or generating a /forcefsck file on shutdown should cause an fsck on the next reboot. To prevent manual fsck runs, ask fsck to try to automatically fix errors with the -y option by uncommenting and changing ...


4

There is a universal tool that can do defragmentation on linux called shake. You can download the source, or for Ubuntu users there's a PPA (the shake package in the official repository is unrelated). I've just tested it on an NTFS filesystem mounted using ntfs-3g and it seemed to work without problems (no errors, the verbose output looks typical). So ...


4

There are things (usually in the kernel, like the NFS threads, swap files, bind mounts, etc.) that can keep a filesystem busy that won't show up in fuser. If you try to fsck a filesystem that is mounted, it will get corrupted. You should find a live CD that doesn't automatically mount your filesystems, like Knoppix or Fedora.


4

If you ran sudo init 6 in the system inside the VirtualBox and that system had corrupted files, then no, init 6 was not the cause of it. There are plenty of other possible causes though, that you may/should investigate. If you ran sudo init 6 in the host OS, and the system inside VirtualBox had file system corruption, then yes, init 6 was the cause of that. ...


4

help ensure the file-system is in a consistent state after an unclean shutdown First thing of note is that XFS, reiser and most configurations of ext only implement meta-data journalling. Which is all about avoiding fsck. The journal is not always replayed on start up - it may be discarded if it's incomplete. There are systems which support full data ...


4

I'm answering this in the general context of "journalled filesystems". I think that if you did a number of "unclean shutdowns" (by pulling the power cord or something) sooner or later you'd get to a filesystem state that would require fsck or the moral equivalent of fsck, xfs_repair. The ext4 fileystsm on my laptop for the most part just replays the ...


4

tl;dr: Take a look at your system logs, or use something like bootlogd, this should show you where the slow down is occurring. My bet would be that it is not fsck. Firstly, fsck can run whenever, it doesn't have to run at boot. What you're probably referring to is that it can only run on an unmounted filesystem, and since / and other filesystems are ...


4

The usual advice is to not run fsck on a mounted file system . You get unreliable results - while fsck is trying to scan the file system, the kernel is still reading and writing data to it, so it will appear, to fsck, inconsistent. Some file systems allow online use of fsck, but not all - FreeBSD, for example, can check a static snapshot of a UFS2 file ...


4

Fsck would change on-disk data w/o notifying kernel's VFS layer, so even reading of disk data can be inconsistent and can't be relied on. In short — don't do, it's a flaw way. Longer and smarter: you should have been using LVM-2. Thus you would make a snapshot, mount it R/O providing access of your users to it, fsck'ed original volume and then mount it R/W ...


4

From the mount manpage, -r, --read-only Mount the filesystem read-only. A synonym is -o ro. Note that, depending on the filesystem type, state and kernel behavior, the system may still write to the device. For example, Ext3 or ext4 will replay its journal if the filesystem is dirty. To prevent this ...


4

When ever you run into an issue where you think you're out of diskspace or you're running out of diskspace there are 2 commands you can run to confirm this. NOTE: Be aware that in addition to running out of diskspace, you might also be running out of inodes. df The command df is the venerable tool for reporting on filesystem usage. Example It has 2 ...


4

You're working from a shaky premise, being that badblocks can solve your problem in the first place. Why badblocks Is an Untrustworthy Repair Method As you use a hard drive, it continually does its best to hide problems from you by swapping fresh sectors in for dodgy ones. The hard disk ships from the factory with a pool of spare sectors for this very ...


4

For example in the case of Debian it's in this init script: /etc/init.d/checkfs.sh (and /etc/init.d/checkroot.sh, and any of their symbolic links): ... if [ -f /forcefsck ] || grep -s -w -i "forcefsck" /proc/cmdline ...


4

It won't work, if the filesystem was installed in a partition (e. g. sda1). fsck and its brethren are tools for performing maintenance on filesystems (hence the name: filesystem ccheck), not of block devices. It is, I suppose, theoretically possible to put a filesystem directly onto a block device by way of something like mke2fs -j /dev/sda, but this is ...


3

As the author explains : systemd honours the sixth field in the fstab lines to do fsck. You can also force fsck at boot time by passing fsck.mode=force as a kernel parameter


3

From man e2fsck: -C fd This option causes e2fsck to write completion information to the specified file descriptor so that the progress of the filesystem check can be monitored. This option is typically used by programs which are running e2fsck. If the file descriptor number is negative, then absolute value of the file descriptor will be used, and ...


3

there is no such tool for linux. you have to boot windows for that.


3

Is the file a database file by chance or something that might be still "open" by a long running program or daemon? Generally, if you didn't see a decrease in disk space it's most likely that something still has the file open. If it truly is the file system itself that is in error (which would be odd), I'm afraid you'll need to umount the disk to run fsck ...



Only top voted, non community-wiki answers of a minimum length are eligible