Tag Info

Hot answers tagged

28

The -C flag will display a progress bar. Performance differences depending on how fsck is called. And very cool, if e2fsck is already running, you can send a USR1 signal for it to start displaying a progress bar. USR2 to stop. Example: killall -USR1 e2fsck From FSCK(8): -C Display completion/progress bars for those filesys- tems ...


17

If all you want to do is avoid an fsck, adding the -f option to shutdown should help with that. shutdown -F to force fsck. tune2fs -l /dev/foo will tell you the interesting bits of information. Here's a start at extracting just what you need: mount -l -t ext3,ext2 | cut -d' ' -f1 | xargs -n1 tune2fs -l | egrep -i 'state|mount|check' If the "Next check ...


16

Most Linuxes these days should perform a forced fsck at boot time when the file /forcefsck is present on the system. If you are at liberty to reboot the VM, run touch /forcefsck Then reboot at your convenience


10

Using tune2fs -l /path/to/device: If "Mount count" will be greater than "Maximum mount counts" then use -c to change the max or -C to change the count If "Last Checked" is not recent enough for the "Check interval" use -i to change the interval or -T to change the last checked


8

A 64 bit kernel and large quantities of RAM will allow the fsck to finish nice and fast. Alternately, there's now an option in e2fsck that'll tell it to store all of it's intermediate results in a directory instead of in RAM, which helps immensely. Create /etc/e2fsck.conf with the following contents: [scratch_files] directory = /var/cache/e2fsck (And, ...


7

it's also a good idea on debian and debian-derivatives like ubuntu to edit /etc/default/rcS on remote servers and set "FSCKFIX=yes" that adds "-y" to the boot time fsck, so it doesn't risk the remote server being stuck waiting for someone to login at the console and run fsck. also, just in case something like happens again, it's worthwhile having a rescue ...


7

from man page for version 1.41 -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 ...


7

Truthfully there isn't much you can do to monitor the operational health of the filesystem itself. This thread explains the reasons why you can't perform an fsck-style check on a filesystem which is online as read/write. In part, you should trust that as a journalling filesystem, XFS is doing it's best to keep your data in good health. You may also take ...


7

Try: fsck -pvcf -- will force a verbose check for bad blocks and automatically repair. If you still have issues then your HDD might have physical problems.


7

The exact method depends on how you have setup luks, and if you have LVM on top of luks or if you just have a filesystem within the luks volume. If you don't have LVM in addition to luks then you would probably do something like this. cryptsetup luksOpen /dev/rawdevice somename fsck /dev/mapper/somename # or cryptsetup luksOpen /dev/sda2 _dev_sda2 fsck ...


7

simfs is not an actual filesystem; it's a map to a directory on the host (by default /vz/private/<veid>). To check the filesystem, you have to check the host filesystem from the host, which also means you have to bring down every container on the host. If you believe it's necessary to check the filesystem, schedule a maintenance period and notify all ...


7

It's probably in use by device-mapper. Check your device-mapper table using dmsetup table. If it's in there, clear the mapping with dmsetup remove <name>. If not, look for errors in dmesg as well. # dmsetup table mpath0: 0 3516173232 multipath 1 queue_if_no_path 0 1 1 round-robin 0 1 1 104:0 1000 mpath0p1: 0 3516162552 linear 253:0 63 Ahah! ...


6

Also the order of events in the syslog makes it sound like the OS was fully up when the fsck was done The root filesystem usually needs to be mounted to run fsck. The rootfs is usually mounted read-only, and then re-mounted read-write after the fsck is complete. Of course the automatic fsck can't always fix all the problems. Sometimes you need to ...


6

I've got an isovfy utility. From the man page: isovfy is a utility to verify the integrity of an iso9660 image. Most of the tests in isovfy were added after bugs were discovered in early versions of mkisofs. It isn't all that clear how useful this is anymore, but it doesn't hurt to have this around. Maybe that will help?


6

I had a similar problem and solved it with fsck after a quick research that led me to this blog post: http://rackerhacker.com/2008/10/13/ext3_dx_add_entry-directory-index-full/ NB: I strongly recommend backing up all your data before doing anything related to the filesystem.


6

use tune2fs: # max mounts before check (-1 = disable) $ tune2fs -c -1 /dev/sda1 # time based (0 = never) $tune2fs -i 0 /dev/sda1


6

There are a few LWN articles that might be of interest: The many faces of fsck Filesystems: chunkfs and reiser4 What ever happened to chunkfs?


6

the other option is you can manually make it skip fsck checks at boot by updating the 6th field in your /etc/fstab: /dev/sda2 / ext3 defaults,errors=remount-ro 0 1 This is the similar to what most fstabs will have 1 means that it should be checked and is a root file system, 2 means it should be checked but will be done in parallel with other file ...


5

You have a mess, basically. If the filesystem will mount read-only you should be looking at copying all the data out of the partition that you want to salvage and starting fresh. There is no "magic" command you can execute to clean up an inconsistent filesystem. fsck tried to help, but if things are so bad that fsck can't put them back together again, short ...


5

According to a paper by Mathur et al. (p. 29), e2fsck time grows linearly with the amount of inodes on a filesystem after a certain point. If the graph is anything to go by, you're more effective with filesystems of up to 10 million inodes. Switching to ext4 would help - under the condition that your filesystem is not loaded to the brim, where the ...


5

You've got a lot of options here. File systems although having a similar basic use all behave differently depending what type of workload you throw at them - its practically a certainty that while one person may swear by the benefits of say ReiserFS another will loath it. From an enterprise point of view the two file systems I'm most familiar with are JFS ...


5

I suspect that you're going to see similar results for any filesystem when you have to run a full check of the filesystem. If you have 1,000,000 inodes in use, it doesn't really matter how they're organized if you have to check the consistency of all of them. Any way you cut it, you're going to be touching 1,000,000 files. The things that will significantly ...


5

From the ok prompt: boot -m milestone=none should do it


5

The console error you are getting is very likely due to xenconsoled not running for some reason. You stated some super uptime, which leads me to believe you are still using Xen 3.1.x, which I believe had a few bugs in that area. Try re-starting xenconsoled (literally, just type xenconsoled if its not already running i.e. you don't see it in 'ps'), it will ...


5

Depends on the filesystem and the actual checking. E.g. it is usually not a good idea to interrupt a reiserfsck --rebuild-tree but nothing can happen when interrupting a read-only fsck of an ext3 filesystem.


5

You set "autofsck" settings in CentOS/Redhat differently then in other distros. You should edit /etc/sysconfig/autofsck with the settings that you want, as described in this mailing list post: http://lists.centos.org/pipermail/centos/2006-November/029837.html


5

Ok, so i found out on CentOS you can do this: touch /forcefsck echo -n "-ys" > /fsckoptions to get a log of what fsck did i had to go on a harder route: Warning: do this at your own risk, i have no ideia of what implications this could have if goes wrong Edited the /etc/rc.sysinit (don't forget to backup) to get the desired behaviour: from line ...


5

Are you using a particular distribution? On Debian based distributions it would be as simple as adjusting /etc/default/rcS and set FSCKFIX to yes. If you want to force a full fsck after every boot, then you could simply write create an empty file named /forcefsck. Though I do not suggest you actually do this.


5

When booting, edit the kernel line in grub and add 'fastboot' to the end (no quotes)- to do that, select the o/s to boot, hit 'e', and then 'e' again when the kernel line is being selected. Once edited hit escape to come back out of the editing mode and 'b' to boot. The changes are not saved for future boots. In future, edit the /etc/fstab line and change ...


5

Since you cannot boot into live disc, this is may sounds a bit weird, but i guess it'll do the job) high level: boot into new (another) instance. attach storage from old instance to new (current). run fsck. detach storage from new (current) and reattach it to old instance.



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