Rc.shutdown doesn't seem to umount the filesystems correctly

The problem is that each time I shutdown/reboot, there's a message saying "Unmounting Non-API Filesystems" failed, and the next time system boots, fsck will recover journal. I looked into etc/rc.shutdown, found that it calls umount_all in etc/rc.d/functions. I made the following changes to umount_all (just add some echo to record infomation in /tmp/permanent/umount_all_log):
umount_all() {
# $1: restrict to fstype
local mounts
while read -r target fstype options; do
echo "got: $taret $fstype $options"
# match only targetted fstypes
if [[ $1 && $1 != "$fstype" ]]; then
echo "fstype=$1, ignore"
continue
fi
# don't unmount API filesystems
if [[ $target = /@(proc|sys|run|dev|dev/pts) ]]; then
echo "API fs, ignore"
continue
fi
# avoid networked devices
IFS=, read -ra opts <<< "$options"
if in_array _netdev "${opts[@]}"; then
echo "_netdev in ${opts[@]}, ignore"
continue
fi
echo "recorded: $taret $fstype $options"
mounts+=("$target")
done < <(findmnt -mrunRo TARGET,FSTYPE,OPTIONS / | tac)
echo "env:"
env
echo -n "which tac: "
which tac
echo "test tac: expected b\na"
echo -e "a\nb" | tac
echo "test done"
echo "cmd: umount -r" "${mounts[@]}"
echo "findmnt -mrunRo TARGET,FSTYPE,OPTIONS /:"
findmnt -mrunRo TARGET,FSTYPE,OPTIONS /
echo "findmnt -mrunRo TARGET,FSTYPE,OPTIONS / | tac:"
findmnt -mrunRo TARGET,FSTYPE,OPTIONS / | tac
echo "findmnt: "
findmnt
echo "mount:"
mount
umount -r "${mounts[@]}"
) 2>&1 > /tmp/permanent/umount_all_log
and after rebooting, the contents of /tmp/permanent/umount_all_log are:
env:
CONSOLE=/dev/console
SHELL=/bin/sh
TERM=linux
INIT_VERSION=sysvinit-2.88
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUNLEVEL=0
PWD=/
LANG=C
PREVLEVEL=3
SHLVL=1
HOME=/
BOOT_IMAGE=/linux-3.1.6
_=/usr/bin/env
which tac: /usr/bin/tac
test tac: expected b\na
test done
cmd: umount -r
findmnt -mrunRo TARGET,FSTYPE,OPTIONS /:
/ ext4 rw,relatime,user_xattr,barrier=1,data=ordered
/proc proc rw,nosuid,nodev,noexec,relatime
/sys sysfs rw,nosuid,nodev,noexec,relatime
/run tmpfs rw,nosuid,nodev,relatime,mode=755
/dev devtmpfs rw,nosuid,relatime,size=1035396k,nr_inodes=221041,mode=755
/dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620
/tmp tmpfs ro,relatime,size=517804k
/tmp/permanent ext2 rw,relatime,errors=continue
/home ext3 rw,relatime,errors=continue,barrier=1,data=writeback
findmnt -mrunRo TARGET,FSTYPE,OPTIONS / | tac:
findmnt:
TARGET SOURCE FSTYPE OPTIONS
/ /dev/root ext4 rw,relatime,user_xattr,barrier=1,data=ordered
|-/proc proc proc rw,nosuid,nodev,noexec,relatime
|-/sys /sys sysfs rw,nosuid,nodev,noexec,relatime
|-/run /run tmpfs rw,nosuid,nodev,relatime,mode=755
|-/dev udev devtmpfs rw,nosuid,relatime,size=1035396k,nr_inodes=221041,mode=755
| `-/dev/pts devpts devpts rw,nosuid,noexec,relatime,gid=5,mode=620
|-/tmp tmpfs tmpfs ro,relatime,size=517804k
| `-/tmp/permanent /dev/sda7 ext2 rw,relatime,errors=continue
`-/home /dev/sda9 ext3 rw,relatime,errors=continue,barrier=1,data=writeback
mount:
/dev/root on / type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
/sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
/run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=1035396k,nr_inodes=221041,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
tmpfs on /tmp type tmpfs (ro,relatime,size=517804k)
/dev/sda9 on /home type ext3 (rw,relatime,errors=continue,barrier=1,data=writeback)
/dev/sda7 on /tmp/permanent type ext2 (rw,relatime,errors=continue)
it seems that tac does not work when shutting down...
have anyone of you ever experienced such problem? and do you know what's the reason?
Last edited by jiakai (2012-01-01 09:03:24)

karol wrote:
Something's wrong with your tac
[karol@black ~]$ which tac
/usr/bin/tac
[karol@black ~]$ file /usr/bin/tac
/usr/bin/tac: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.27, BuildID[sha1]=0x5390b705e6c9a431be9dd66e418cd52508e6f5a5, stripped
[karol@black ~]$ pacman -Qo tac
/usr/bin/tac is owned by coreutils 8.14-1
Maybe you've created some script named 'tac' and placed it higher up in $PATH:
[karol@black ~]$ cat tac
#!/bin/bash
[karol@black ~]$ sudo mv tac /usr/local/bin/
[karol@black ~]$ which tac
/usr/local/bin/tac
[karol@black ~]$ cat tac_test
#!/bin/bash
echo "test tac: expected b\na"
echo -e "a\nb" | tac
echo "test done"
[karol@black ~]$ ./tac_test
test tac: expected b\na
test done
[karol@black ~]$ sudo rm -f /usr/local/bin/tac
[karol@black ~]$ ./tac_test
test tac: expected b\na
b
a
test done
thx for your reply!
but i also have the following lines in the script:
echo -n "which tac: "
which tac
and the output is:
which tac: /usr/bin/tac
and when i do not actually shutdown/reboot, the output is right.
if i run the following script without root privilege, i got the expected output
$ cat test.sh
#!/bin/bash
. ./functions
umount_all
Last edited by jiakai (2012-01-02 03:15:40)

Similar Messages

  • Why can't I get my printer to print out a playlist from i-tunes? It used to work but now my printer doesn't seem to receive the "print" command.

    Why can't I get my printer to print out a playlist from i-tunes? It used to work, but now the printer doesn't seem to recognize the "print" command coming from i-tunes. The printer works for other applications!

    I  finally solved this problem after toiling with it for a couple of  days.  Solution:  Once you have  burned your CD you must go back into  iTunes to your music/playlists and select the playlist you just burned  and click file; print and you will  get the mosaics that we have been  accustomed to.  I was on hold with  Apple Support when I found this  myself.  Yes......!!! Problem solved..for me anyway.  Good luck!
    Scott

  • Why can I not import the videos from my iPhone 4 onto my desktop (Windows Vista)? When I plug in it imports the photos without a problem but it doesn't seem to import the videos.

    Why can I not import the videos from my iPhone 4 onto my desktop (Windows Vista)? When I plug in it imports the photos without a problem but it doesn't seem to import the videos.

    1.Download the Flash setup file from here: <br />
    [http://fpdownload.adobe.com/get/flashplayer/current/install_flash_player.exe Adobe Flash - Plugin version]. <br />
    Save it to your Desktop.<br />
    2. Close Firefox using File > Exit <br />
    then check the Task Manager > Processes tab to make sure '''firefox.exe''' is closed, <br />
    {XP: Ctrl+Alt+Del, Vista: Shift+Ctrl+ESC = Processes tab}
    3. Then run the Flash setup file from your Desktop.
    * On Vista and Windows 7 you may need to run the plugin installer as Administrator by starting the installer via the right-click context menu if you do not get an UAC prompt to ask for permission to continue (i.e nothing seems to happen). <br />
    See this: <br />
    [http://vistasupport.mvps.org/run_as_administrator.htm]

  • HT1386 I installed Snow Leopard and have the latest version of iTunes. However, when I connect my iPhone, it charges and iPhoto opens, but iTunes doesn't seem to recognize the iPhone. It simply doesn't appear in the left column. What gives?

    I installed Snow Leopard and have the latest version of iTunes. However, when I connect my iPhone 4S, it charges and iPhoto opens, but iTunes doesn't seem to recognize the iPhone. It simply doesn't appear in the left column. What gives?

    http://support.apple.com/kb/TS1591

  • Hello, I've installed Lion but now it says I can't use the Cloud as I need the Apple ID Password to use Back to My Mac. I've obtained several new Apple ID passwords which work ok on my phone but doesn't seem to be the password it's looking for?

    Hello, I've installed Lion but now it says I can't use the Cloud as I need the Apple ID Password to use Back to My Mac. I've obtained several new Apple ID passwords which work ok on my phone but doesn't seem to be the password it's looking for.Does anyone know what's needed please ??

    It's probably looking for the Apple ID & Password you used to purchase Lion, or ML as the case may be.
    Thse are the Mountain Lion forums, is that what you meant?

  • The FTP server configured for this site doesn't seem to match the URL you entered. Make sure that you use the Upload to FTP Host feature in Muse to publish the site directly to the final location and that you are logging on to In-Browser Editing with the

    When i tried to login in inbrowserediting.adobe.com i see that:
    The FTP server configured for this site doesn't seem to match the URL you entered. Make sure that you use the Upload to FTP Host feature in Muse to publish the site directly to the final location and that you are logging on to In-Browser Editing with the same user.
    What does it mean? What is problem?

    Hi,
    I have just created my First website using Muse and Its all been uploaded to my FTP server but i cant access the in browser editing which was the whole reason why i re-done the website for my client using muse
    its saying the following
    "The FTP server configured for this site doesn't seem to match the URL you entered. Make sure that you use the Upload to FTP Host feature in Muse to publish the site directly to the final location and that you are logging on to In-Browser Editing with the same user. server configured for this site doesn't seem to match the URL you entered. Make sure that you use the Upload to FTP Host feature in Muse to publish the site directly to the final location and that you are logging on to In-Browser Editing with the same user."
    Yet i Can access my website fine "www.calmwood.com.au"
    My ftp server responds to either the IP Address or the DNS Address www.calmwood.com.au
    so i am not understanding how it thinks its different. when its fully referenced
    any help would be appreciated.
    thanks

  • My billing address doesn't seem to match the credit card I entered. But I'm 10000% sure that I wrote the adress correct. Is this some kind of error?

    My billing address doesn't seem to match the credit card I entered. But I'm 10000% sure that I wrote the adress correct. Is this some kind of error?@

    contact adobe support by clicking this link and then clicking 'still need help' as soon as it appears, https://helpx.adobe.com/contact.html

  • My product that I downloaded doesn't seemed to include the fuctions i need.

    First the front apperence of labview 2015 doesn't seemed to match the toturals of that same year type as well as seems to be missing the FRC roboRio Project, as well as in the blank VI or any other there doesn't seemed to be the WPI robotics Library program file. Also when i try to open a program under the one i can open theres no robot main or anything include with that.

    I would post your questions in the FRC page if it has to do with the competition.
    https://decibel.ni.com/content/community/academic/student_competitions/frc?view=discussions
    Also if you are on a team you should be able to call in to National Instruments support between 1 and 7pm central.  During this time we have a special group of engineers handling calls from first teams.
    Matt J
    Professional Googler and Kudo Addict
    National Instruments

  • HT5868 I am not hooking up to a new computer - I just plugged into the same computer and it asked me this Trust My Computer question.  I hit Trust - yet it still doesn't seem to find the device on my computer.  It doesn't show up in my iTunes list of devi

    I am not hooking up to a new computer - I just plugged into the same computer and it asked me this Trust My Computer question.  I hit Trust - yet it still doesn't seem to find the device on my computer.  It doesn't show up in my iTunes list of devices.

    Hi Dalegu219,
    Thanks for visiting Apple Support Communities.
    If your iTunes library is on an external hard drive, but iTunes is not recognizing the library, first make sure the right library is selected.
    You can use these steps to make sure iTunes is opening the library on your external drive:
    If iTunes is running, quit iTunes.
    If you're using Windows, hold down the Shift key and from the Start menu, choose All Programs > iTunes > iTunes.
    If you're using a Mac, open iTunes and immediately hold down the Option key.
    You should see one of these screens:
    Pick Choose Library and locate the library on your external hard drive.
    From:
    iTunes: How to open an alternate iTunes Library file or create a new one - Apple Support
    If the right library is selected, but you do not see your songs, try re-creating the library using the instructions found here:
    iTunes: How to re-create your iTunes library and playlists - Apple Support
    Best Regards,
    Jeremy

  • Your billing address doesn't seem to match the credit card you entered.

    Hey everybody,
    I would like to purchase the  phoyoshop+lightroom programm but I constantly get the following error message:
    "Your billing address doesn't seem to match the credit card you entered. Check to make sure you entered this information correctly, and if you still can't place your order, please call us at +1 800-585-0774. If you're not in North America, you can look up a local number here."
    I am positive that the information I entered is correct as I checked and tried it more than ten times.
    Does anybody know what could be the problem and how to fix it?
    Esther

    I have the same issue. Haven't been able to get any work done for almost a week now. I have contacted the support chat 8 times by now - most unhelpful support ever. They all give me the same advice even though i say that i already tried that as if they are reading their answers off a pre-written sheet.
    I have tried 2 credit cards, i have confirmed everything, including the address, with my bank - all good there. Desperate for help, my boss is gonna have my balls soon -.-

  • Cs6: Masking mode doesn't function - can paint the selection correctly - but then clicking the masking tool icon - nor selection ist made. Can I repair that?

    Cs6: Masking mode doesn't function - can paint the selection correctly - but then clicking the masking tool icon - nor selection ist made. Can I repair that?

    Can I repair that?
    Repair what? Your description seems a bit unclear, maybe posting a few screenshots can help clarify the issue.
    Are you talking about Quick Mask Mode?

  • I have white eyes on my pictures and there doesn't seem to be anything to correct this problem (only a red eye button).

    Just wanted to mention that I have the newest ios 6.0.1 software update on my 4s phone and now all my pictures have "white eye".  There doesn't seem to be anything to correct this problem (only a red eye button).

    ....tough croud!
    https://discussions.apple.com/thread/2495024?start=0&tstart=0
    http://thebeginnerslens.com/iphone-photography/white-eye-photos-iphone-4-led-fla sh-apples-biggest-camera-blunder.html

  • How can I change my security questions for my Apple ID. I can't seem to get the questions correct at the moment

    How can I change my security questions for my Apple ID. I can't seem to get the questions correct at the moment

    The Best Alternatives for Security Questions and Rescue Mail
        a. Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
        b. Call Apple Support in your country: Customer Service: Contact Apple support.
        c. Rescue email address and how to reset Apple ID security questions.

  • My HP scanner/printer scans but my iMac doesn't seem to accept the scans in either iPhoto or Pictures.  I've got os 10.6.8 and all the latest sofware updates for the scanner and for iPhoto.  Helpv

    My Hp printer/scanner C5280 used to work fine with my iMac with OS 10.6 but lately after doing the scan it doesn't seem to finish by putting the scan in either iPhoto or in pictures.  I have all the latest sofware updates for both devices. The scanner does the "preview" scan right away and the copier works fine.  Is there some setting I am overlooking?

    Try using Image Capture, you will find it in your Applications folder. In either IC or the method you are using you can tell the application to scan to a destination. It will look similar to:
    If you still have trouble give AppleCare a call or visit your local Apple Store Genius and they can walk you through it. Your problem may be the at you are not defining anything in the preview to be scanned, you do this by dragging the mouse over the area you want scanned and it will draw a box around it.  Here is a screen shot that show's that.

  • How do I export video from a Canon Optura 30 camcorder to my iMac/ iMovies? I've tried a Firewire cable but imovies doesn't seem to recognise the camcorder.

    I've been trying to export video from my Canon Optura 30 camcorder to imovies with a firewire lead, however nothing happens and imovies doesn't semm to reconise the camcorder. Can anyone help please?

    Here is a compatibility chart for iMovie:
    http://help.apple.com/imovie/cameras/en/index.html?lang=en_US
    I did not see yours; however, as long as it has firewire, it should work. Did you read the instructions in both your camcorder manual and in iMovie on the steps needed?
    If you can't get it to work after following the steps, what format does it record in? Is it on a memory card? If so, it'd be easy: just use a USB card reader, plug it in and import your footage that way.

Maybe you are looking for

  • Cannot install iphone on windows 7 64 bit

    My phone no longer recognizes auto play.  I have checked settings and checked drivers. When I look for portable drives, it does not show iphone.  When I try discover - it does not locate. The computer makes a sound when I plug in, but no auto play st

  • How to automate the /content backup daily

    HI Jorg, We are planning to take the /content backup daily from QA servers. Manualy we are doing by entering into package manger ---> create package---> provideing the path as "/content" Building the package and moving to backup location daily. Can y

  • ADF 11g - PivotTable inside TreeTable

    Hello, I develop in Jdeveloper 11g (ADF/BC) and use the component treetable. now my question is is it possible to use inside the treetable a pivottable? Thank's for your reply. Regards, Christian

  • Default currency in FB60

    Hi, I am searching for a way to define a vendor's default currency in transaction FB60. We have entered the default currency in the vendor master (Purchasing data>Order currency>by Plant). When entering the invoice in FB60 the currency still shows as

  • JWindow displaying sporadically

    I have a method that creates a JWindow and displays it, it works when I call it from my main method, as well and a few others, however when I call it from some, it displays just a white box where my JWindow should be, any have any ideas? I the method