Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
04-18-2011, 11:08 AM
|
#1
|
Senior Member
Registered: Jun 2009
Posts: 1,795
Rep:
|
shutdown's F switch, what e2fsck switches does that equate to
if I do a "shutdown -rF now" on a server, it will force all volumes to be checked as it reboots.
my question is, which i can't figure out from reading the man pages for e2fsck and shutdown, is what switches does it use when it automatically runs an e2fsck on each volume? i'm assuming a -y since it never prompts, but what else? is it physically checking the entire disk for bad blocks, etc etc?
|
|
|
04-18-2011, 12:46 PM
|
#2
|
Member
Registered: Aug 2010
Location: Beaverton, Oregon, USA
Distribution: Pfsense, Ubuntu, Centos, Fedora, Redhat, Scientfic, MacOS
Posts: 76
Rep:
|
Hello,
the -f or -F options for shutdown don't equate to any fsck options: they are simply a flag for the run control (rc) scripts to execute fsck upon boot. On redhat/Centos systems, you will find the fsck options in the /etc/rc.d/rc.sysinit file.
--jason
|
|
|
04-19-2011, 07:07 AM
|
#3
|
Senior Member
Registered: Jun 2009
Posts: 1,795
Original Poster
Rep:
|
Right, but I mean how do I tell how it runs fsck. I guess what I'm trying to ask is when you do the -F with shutdown, when it runs fsck or e2fsck, what options of the file system check program are used. Looking in /etc/rc.d/rc.sysinit i see the following lines with fsck in them. I dont have a /fsckoptions file, so does this mean it would just run fsck with no options at all?
# Mount /proc (done here so volume labels can work with fsck)
if [ -f /fsckoptions ]; then
fsckoptions=`cat /fsckoptions`
if [ -f /forcefsck ] || strstr "$cmdline" forcefsck ; then
fsckoptions="-f $fsckoptions"
elif [ -f /.autofsck ]; then
[ -f /etc/sysconfig/autofsck ] && . /etc/sysconfig/autofsck
fsckoptions="$AUTOFSCK_OPT $fsckoptions"
fsckoptions="-C $fsckoptions"
fsckoptions="-V $fsckoptions"
initlog -c "fsck -T -a / $fsckoptions"
# Possibly update quotas if fsck was run on /.
initlog -c "fsck -T -t noopts=_netdev -R -A -a $fsckoptions"
rm -f /fastboot /fsckoptions /forcefsck /.autofsck /halt /poweroff
# create the crash indicator flag to warn on crashes, offer fsck with timeout
touch /.autofsck
|
|
|
04-24-2011, 11:44 AM
|
#4
|
Senior Member
Registered: Jun 2009
Posts: 1,795
Original Poster
Rep:
|
does anyone have any clues? I'm trying to equate what exact disk check runs when you use shutdown's F option. to me it almost appears its running a e2fsck with they y option because it never prompts, and the bad blocks check because it takes quite a while. I'm not having any luck finding anything on the web that tells me exactly what's happening though.
|
|
|
All times are GMT -5. The time now is 05:34 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|