Ask Your Question
1

How to schedule fsck at reboot for root FS on fedora 20 VM

asked 2014-06-26 22:50:29 -0500

dbaxps gravatar image
[root@vf20rs0626 ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1       4.9G  3.5G  1.4G  72% /
devtmpfs        992M     0  992M   0% /dev
tmpfs          1002M   76K 1002M   1% /dev/shm
tmpfs          1002M  664K 1001M   1% /run
tmpfs          1002M     0 1002M   0% /sys/fs/cgroup

[root@vf20rs0626 ~]# fsck -n /dev/vda1
fsck from util-linux 2.24.2
e2fsck 1.42.8 (20-Jun-2013)
Warning!  /dev/vda1 is mounted.
Warning: skipping journal recovery because doing a read-only filesystem check.
_/ contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Inodes that were part of a corrupted orphan linked list found.  Fix? no

Inode 48960 was part of the orphaned inode list.  IGNORED.
Inode 49001 was part of the orphaned inode list.  IGNORED.
Deleted inode 169173 has zero dtime.  Fix? no

Deleted inode 169225 has zero dtime.  Fix? no

Inode 169251 was part of the orphaned inode list.  IGNORED.
Inode 169260 was part of the orphaned inode list.  IGNORED.
Inode 169312 was part of the orphaned inode list.  IGNORED.
Inode 169315 was part of the orphaned inode list.  IGNORED.
Inode 169449 was part of the orphaned inode list.  IGNORED.
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences:  -(573457--573459) -(573464--573466) -(573470--573472) -573490 -(637977--637979) -(637982--637984) -(637986--637988) -(637995--637997) -638004
Fix? no

Free blocks count wrong (366582, counted=366583).
Fix? no

Inode bitmap differences:  -48960 -49001 -169173 -169225 -169251 -169260 -169312 -169315 -169449
Fix? no

Free inodes count wrong (191982, counted=191961).
Fix? no


_/: ********** WARNING: Filesystem still has errors **********

_/: 120978/312960 files (0.1% non-contiguous), 943883/1310465 blocks
edit retag flag offensive close merge delete

Comments

On healthy FS :-
$ tune2fs -C 1 -c 1 /dev/vda1 && dumpe2fs -h /dev/vda1 work fine
But if rootFS is already currupted system still require manual intervention or CTRL-D

dbaxps gravatar imagedbaxps ( 2014-06-27 13:33:58 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-06-27 07:21:28 -0500

mhayden gravatar image

updated 2014-06-27 07:21:52 -0500

You can force a fsck on the next reboot by running:

touch /forcefsck

Also, I didn't know this until today, but you can do it with the shutdown command as well:

shutdown -rF now

I found that second tip over at: http://www.cyberciti.biz/faq/linux-force-fsck-on-the-next-reboot-or-boot-sequence/ (http://www.cyberciti.biz/faq/linux-fo...)

edit flag offensive delete link more

Comments

It doesn't work for cloud instance of fedora 20 . I already did it. Moreover shutdown -rF now gets immediatelly rejected due to syntax error ( on f20). This action as well as updating /etc/fstab ( 0 1) doesn't work on fedora. I need a kind of linux resque nomount from installation CD ;)

dbaxps gravatar imagedbaxps ( 2014-06-27 07:38:17 -0500 )edit

What type of virtualization technology are you using?

mhayden gravatar imagemhayden ( 2014-06-27 07:41:37 -0500 )edit

Compute node is Fedora 20 (as well) KVM Server.

dbaxps gravatar imagedbaxps ( 2014-06-27 07:44:33 -0500 )edit

Do you have administrative access to the hypervisor? You could access the volume from the hypervisor and fsck the VM's storage from there. Another option might be to boot up with a rescue ISO.

There's also 'nova rescue':

  • http://docs.openstack.org/user-guide/content/novaclient_commands.html (http://docs.openstack.org/user-guide/...)
mhayden gravatar imagemhayden ( 2014-06-27 07:46:32 -0500 )edit

The problem is:- bootable cinder volume for VM is located on glusterfs 3.5 ( replica 2 gluster volume Controller && Compute )

dbaxps gravatar imagedbaxps ( 2014-06-27 07:50:34 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-06-26 22:50:29 -0500

Seen: 7,902 times

Last updated: Jun 27 '14