Re: mounting /var/run as mfs

From: Igor Sobrado (sobrado_at_string1.ciencias.uniovi.es)
Date: 11/12/03

  • Next message: David Lord: "Re: Which BSD?"
    Date: 12 Nov 2003 09:15:33 +0100
    
    

    Igor Sobrado <sobrado@string1.ciencias.uniovi.es> wrote:
    > Brian A. Seklecki <lavalamp@spiritual-machines.org> wrote:
    >>
    >> Would you like to send-pr(1) on this or shall I? Contact me off-group if
    >> you wish. The best way to approach a possible debug on this is to setup
    >> the RC shutdown scripts to run "sh -x" so we can see what is going wrong
    >> right there at the end of /etc/rc.shutdown
    >
    > I will trace the shutdown script today. That is a very nice idea.
    > At least we will know where it locks.

    I have spend some hours shutting down my laptop to isolate the bug.
    It is not an easy task! I believe that /etc/rc.shutdown runs without
    problems. I changed the first line on the script to "#!/bin/sh -x"
    and added some echoes. It seems that the script does not hang.

    Next step was removing all the system information files in /var/run.
    After removing all entries in /var/run I am unable to umount that mfs.
    It is looked by inetd(8) yet. Of course, killing the next process is
    not possible when /var/run is locked:

       mount_mfs -s 1m swap /var/run

    Again, the computer does not shut down cleanly:

       syncing disks... 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 giving up

    ...more filesystems damaged.

    Next test: I added a "inetd=NO" entry to /etc/rc.conf, and rebooted
    the machine. Without inetd(8) running I shut down the computer again.
    Same problem here.

    Last test: without inetd(8) running I removed all the system information
    files in /var/run and rebooted the computer. This time, the computer
    rebooted without problems:

       syncing disks... done

    In short, the operating system does not shut down cleanly if /var/run
    is a mount point for a mfs locked by ANY process. The key here, is
    that the operating system locks too /var/run if it is a directory
    instead of a mounting point for a mfs. But in this case the operating
    system is able to shut down without damaging any filesystem.

    I hope that this information will be useful for fixing this bug.

    Igor.

    -- 
    Igor Sobrado, UK34436 - sobrado@acm.org
    

  • Next message: David Lord: "Re: Which BSD?"

    Relevant Pages

    • Re: How to find the operating system bit (x86/x64/ia64)
      ... Reading back, I realize there was one point that I may not have made explicit: the values represent an OS architecture, not necessarily a specific manufacturer. ... AMD64 for PROCESSOR_ARCHITECTURE. ... It turns out that you already have the answer with the script Paul showed if you just check the value he points to rather than using the post-processing via MsgBox. ... I need further granularity in case a 64 bit operating system ...
      (microsoft.public.scripting.vbscript)
    • Re: Help in checking the OS type...
      ... It lists me out the operating system name thanks for the same. ... I need to develop a script where in i need to first check the type ... Then the Total Space of each ...
      (perl.beginners)
    • Re: problem with logoff script
      ... the script engine as a process on the workstation and should execute cleanly ... var fso = new ActiveXObject; ... sho.popup('An error occured attempting to get the Operating System Type. ... // Retrieve the script application ...
      (microsoft.public.win2000.group_policy)
    • Re: Talking to *n*x
      ... > more directly with the operating system and I was ... If you're adept at writing shell ... > well write a shell script. ... output from or feed input to a sub-process, ...
      (comp.unix.programmer)
    • Re: How to pass variable to operating system.
      ... Tnx Aho for answering. ... Why must the script take arguments? ... I only need to pass them to the operating system. ... (even if it is the shell) ...
      (alt.php)