Tag Info

Hot answers tagged

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 ...


9

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 ...


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

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 ...


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.


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

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 ...


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

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

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

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

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

You're working from a bad premise, being that badblocks can solve your problem in the first place. When badblocks finds bad sectors on the disk, what it is really telling you is that the hard disk has run out of spare sectors, which means that it has been degrading for some time. Up until the point where badblocks can actually detect this, the hard drive ...


3

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 ...


3

Its handled in the init scripts, in particular /etc/init.d/checkroot.sh. After this message, you should be dropped into a shell (or given a single user password prompt) to run that fsck. Its warning you that there is some error in the filesystem beyond the fairly normal (from unexpected power failures, etc.) and trivial to fix errors that -p will fix ...


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

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. ...


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 ...


3

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 ...


3

I'd run it again. The -cc found badblocks and called the program badblocks to repair them. You might want to just run it as: $ fsck /dev/sdb1 excerpt from fsck.ext3 man page -c This option causes e2fsck to run the badblocks(8) program to find any blocks which are bad on the filesystem, and then marks them as bad by adding them to the bad block ...


3

fsck -N only prints the list of filesystems that would be checked. fsck is a front-end to filesystem-specific programs such as fsck.ext2, fsck.btrfs, … The option -N tells fsck not to invoke those programs but to print the command line that it would use instead. fsck itself doesn't actually read those filesystems, so it doesn't matter whether the filesystems ...


3

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 ...


3

There might still be hope, but your drive seems to have hardware problems (my interpretation of the read error in dmesg output). You should try to make a copy of what is recoverable from that partition onto another drive (to minimize disc access). Use ddrescue for that, it might take a while but gets most if not all of the recoverable data of the partition. ...


3

The filesystem doesn't care about disk geometry; this is a partition table problem. I suggest that you make a dump of the partition table, check the result and overwrite the partition table with this dump. That should correct the CHS entries. sfdisk -d /dev/sdx >sdx.txt cat sdx.txt sfdisk /dev/sdx <sdx.txt


3

In the structure of the /etc/fstab file you can request the filesystem to be checked each time the system is booted - example : /dev/sda1 / ext4 errors=remount-ro,relatime 0 1 /dev/sda2 swap swap defaults 0 0 proc /proc proc defaults 0 0 sysfs /sys sysfs ...


3

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 ...


2

Unfortunately, I think you are quite screwed. If you only messed with the partition table then TestDisk is your best shot, but since you have been resizing (which actually means copying and maybe even deleting), your data is, more or less, corrupted. If you have a backup from before performing the resize operation, this is a good time to use it. Else, I ...



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