LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-18-2011, 10:08 AM   #1
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Rep: Reputation: 49
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?
 
Old 04-18-2011, 11:46 AM   #2
jason_not
Member
 
Registered: Aug 2010
Location: Beaverton, Oregon, USA
Distribution: Pfsense, Ubuntu, Centos, Fedora, Redhat, Scientfic, MacOS
Posts: 76

Rep: Reputation: 19
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
 
Old 04-19-2011, 06:07 AM   #3
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
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
 
Old 04-24-2011, 10:44 AM   #4
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Is Microsoft trying to equate selling computers without Windows to software piracy as a new wo LXer Syndicated Linux News 2 03-28-2011 08:50 AM
shell script; equate two strings jovie Programming 13 12-21-2009 08:11 AM
snmpwalk 400 switches for switch port status aptget Programming 2 11-17-2009 07:46 PM
Suse 10.2 - Shutdown by power switch RGummi SUSE / openSUSE 2 01-20-2007 08:48 AM
e2fsck Eugney Slackware 2 06-03-2005 11:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration