Hot answers tagged fsck
9
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
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 ...
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
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 ...
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
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 ...
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
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 ...
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 ...
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 ...
2
Fsck returns your filesystem to a consistent state. This is not necessarily the filesystem's “latest” state, because that state might have been lost in the crash. In fact, if there were half-written files at the time of the crash, then the filesystem was not left in a consistent state, and that is precisely what fsck is designed to repair. In other words, ...
2
From the fstab(5) man page:
The sixth field (fs_passno).
This field is used by the fsck(8) program to determine the order
in which filesystem checks are done at reboot time. The root
filesystem should be specified with a fs_passno of 1, and other
filesystems should have a fs_passno of 2. Filesystems within a
...
2
The one explanation that comes to mind is that you have stuff hidden behind a mount point, out of the reach of du.
On Linux, you can make a bind mount of the root filesystem so as to be able to see all of it on a different mount point. Then take a closer look at the stuff that's hidden by mount points in the original view.
mkdir /root/root-rebound
mount -o ...
2
Why would it be set to 0?
I can see a few possible reasons for this.
Because you are running on EC2, your hardware (storage and compute instance) is virtualized. It is much less likely for such a configuration to encounter failures of any sort causing filesystem corruption, and an actual physical defect in the storage (like bad blocks on magnetic storage) ...
2
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 ...
2
The field exists so you can define the order in which filesystems are checked. Different partitions on the same drive should not be checked at the same time since the IO going to each filesystem will compete with one another, and slow the whole process down. Filesystems on different physical disks could be set to check in the same pass to speed up the ...
2
Well, other than run interactively, you can try fsck -y like my answer in the other question :-P
If you want to dd an image on top of the rootfs, your best bet is going to be to do that from your initramfs before mounting the rootfs.
You can do it with the system booted to that rootfs, but this is one of those things where Unix gives you the rope (with the ...
2
I suspect bad thing about spinup time on your drive.
Did you check /var/log/kern.log ?
You may use smartmontools for checking drive sanity (you need root access):
sudo smartctl -a /dev/sdX
or if in root console:
smartctl -a /dev/sdX
smartctl -l error /dev/sdX
Or his graphical interface (GUI): gsmartcontrol.
2
It is possible your VolGroup-lv_root is created on that drive. Check output of following command
pvs
It display physical volumes information about LV.
More info about LVM (1), (2), (3)
1
The problem might be that the drive needs to be initialized by the USB driver and this initialization takes time, so that when the partitions in fstab are mounted, the drive isn't ready yet, but by the time you log in, the drive is ready and mounting or fsck works.
If this is the problem, try adding the option noauto in /etc/fstab and mounting the drive ...
1
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
1
Try booting another liveCD - I recommend SystemRescueCD that is designed specifically for solving problems with linux installations. It is also smaller than typical OS liveCDs. And to be on the safe side, run fsck from the console (no X).
If the standard fsck -p does not work, you can also try e2fsck -y -f.
1
No. You cannot safely fsck a mounted disk. You can force it to, but be aware that doing so can eat your data. To do so, if you are VERY sure you want to, just move to fsck it - fsck will ask for your confirmation to proceed.
You might be able to do what you need using "debugfs" - this can be used on a live filesystem I believe... but please realize it's a ...
1
I doubt there's a way to remove this check specifically, short of modifying the source code. Ignoring all errors from fsck sounds dangerous, what if there was some other problem?
Therefore I'll suggest the following workaround: change the boot scripts to set the system date to some time in the future (say 2038-01-18 on a 32-bit machine) just before running ...
Only top voted, non community-wiki answers of a minimum length are eligible