Does shutdown -rF imply a -y on all the checks on reboot
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Does shutdown -rF imply a -y on all the checks on reboot
I want to do a shutdown -rF 3:00 to reboot my RHEL server at 3am tomorrow and force an e2fsck on each volume. But I want the e2fsck to run with the -y switch so it automatically answers yes so it will fix any problems it find automatically.
I can't find anywhere where it says if it will do this or not. does anyone know or have proof?
Or is there a better way to do what I'm trying to accomplish?
Note that some distros (eg 'buntu 9.10) have removed the -F option for shutdown
[ Check with man shutdownon your server (because you want to know which version your server will be running) ]
In which case the "new way" of forcing a fsck at the next boot is (as root): touch /forcefsck
reboot
The default action is to fix errors automatically.
thanks tredegar. I checked and mine still has the -F option. Glad to know it will automatically fix the errors and not wait for me to press Y over and over.
Looks like I'm safe to run this then and accomplish what I want: shutdown -rF 3:00
Just another quick question, there's probably no way to run a fsck while a volume is online to fix some (but not all since the volume is mounted) errors, so when I do my shutdown -rF it could in theory take less time because some problems will already be fixed?
Looks like I'm safe to run this then and accomplish what I want: shutdown -rF 3:00
To be picky, the man page says time format should be hh:mm so I'd try shutdown -rF 03:00
NEVER run fsck on a mounted partition. fsck is optimised to run as fast as it can: It will run partitions on different disks concurrently, on the same disk, sequentially. On big partitions, this can still take some time.
I just looked through all the messages log files, and there haven't been any errors really at all this month. So maybe I dont even need to do the disk check? or would file system errors show up in a different log?
I just looked through all the messages log files, and there haven't been any errors really at all this month.
"there haven't been any errors really at all" or "there haven't been any errors".?
There's a big difference.
Remember that the kernel will assume the file system [ext2, ext3, ext4, reiserfs, fat32, ntfs, ... the list goes on] is clean unless the filesystem reports an error.
Errors may not be reported by an unclean filesystem. Until they become unmanageable by the filesystem. In which case the kernel may be notified "Disk full", or similar, when it clearly isn't.
If you do a search of LQ for run fsck you'll find the sort of situations that lead to this advice.
So it's a good idea to run fsck from time to time.
And I remind you that you should NEVER run fsck on a mounted partition.
But what was the problem that prompted you to start this thread about running fsck at 03:00 ?
Quote:
ok, wasn't sure if i could get a head start or not.
??
Is a "head start" like a "jump start" for a car with a flat battery ?
[ And is your <SHIFT> key broken? Bad capitalisation tends to indicate .... (You probably guessed it already) ]
There aren't any errors, just status messages, in the messages logs as far back as they go.
I started this thread because we had major file system problems on this server last year, which resulted in fsck's running for almost a whole day on the server and its terabytes of data throughout. It had been years since it last fsck'd before that event, so i'd like to do them regularly now to help avoid such drastic downtime. Sounded like a good idea to me.
Where I come from, a "head start" is doing some smaller tasks before really getting into the meat of a task. Which probably wont make sense either. Say you're going to clean your house on Saturday, you could get a "head start" by going to the store Friday and buying all your cleaning supplies, saving you time Saturday. "Jump starts" are the same here as they are to you :-)
Sorry I missed my shift key starting my last sentence, I will replace my keyboard in case its faulty, LOL ;-) I have no idea what bad capitalization tends to indicate, or capitalisation as you spelled it since we're from different regions of the world. I would think it indicates I forgot to hit shift before I typed my first letter.
Thanks for the help and entertaining comments tredegar, always appreciated.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.