<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On Monday 29 October 2012 06:41 PM,
      Dennis Leeuw wrote:<br>
    </div>
    <blockquote cite="mid:508E8070.6040809@umcutrecht.nl" type="cite">
      <blockquote type="cite" style="color: #000000;">
        <blockquote type="cite" style="color: #000000;"><br>
        </blockquote>
        Where is the patch? I can't see it in the email.
        <br>
      </blockquote>
      <br>
      The patch is incorporated in the attached umountiscsi.sh script.
      See the if statement under the :
      <br>
      <br>
      for BLOCK_FILE in $SESSION_DIR/target*/*\:*<i
        class="moz-txt-slash"><span class="moz-txt-tag">/</span>block<span
          class="moz-txt-tag">/</span></i>*; do
      <br>
      <br>
      line.
      <br>
    </blockquote>
    <br>
    No. Please send diffs of the file. Use the diff command on the
    original and the modified file. It is easier to read.<br>
    <br>
    <blockquote cite="mid:508E8070.6040809@umcutrecht.nl" type="cite">
      <br>
      <blockquote type="cite" style="color: #000000;">
        <br>
        <blockquote type="cite" style="color: #000000;">Due to the fact
          that our system does not receive block devices from the iSCSI
          target, but it is logged in,
          <br>
          this means the the BLOCK_FILE contains the search string,
          since/block/  does not exist. It then tries to umount
          <br>
          everything, making the entire system read-only:(
          <br>
          <br>
          With the change I made in umountiscsi.sh this is not happening
          anymore.
          <br>
        </blockquote>
        I can't buy that statement. umountiscsi.sh does not do a remount
        in read-only mode. Typically, the file system is re-mounted
        read-only, only when it senses that the underneath block device
        is mis-behaving.
        <br>
        <br>
        What is your block device underneath the / file system? Is it a
        local disk?
        <br>
      </blockquote>
      <br>
      umountscsi.sh sets BLOCK_DEV to * after the if-statement I added,
      so it does umount *, and due to the fact that we have set remount
      ro on errors, it gets remounted ro is what I expect.
      <br>
    </blockquote>
    <br>
    No. Attempting to umount /, while it is mounted with
    errors=remount-ro, does not trigger an event to remount it with flag
    'ro'. You cannot umount / because it will always be busy. You can
    re-mount it read-only manually, but that is a different story.<br>
    <br>
    20:10:46 root@debian-x64:~# cat /etc/fstab<br>
    # /etc/fstab: static file system information.<br>
    #<br>
    # Use 'vol_id --uuid' to print the universally unique identifier for
    a<br>
    # device; this may be used with UUID= as a more robust way to name
    devices<br>
    # that works even if disks are added and removed. See fstab(5).<br>
    #<br>
    # <file system> <mount point>   <type> 
    <options>       <dump>  <pass><br>
    proc            /proc           proc    defaults        0       0<br>
    /dev/mapper/debian--x64-root /               ext3   
    errors=remount-ro 0       1<br>
    # /boot was on /dev/vda1 during installation<br>
    UUID=baf61a3c-6af3-40c4-9430-6f252f6042ac /boot           ext2   
    defaults        0       2<br>
    /dev/mapper/debian--x64-swap_1 none            swap   
    sw              0       0<br>
    # /dev/hdc        /media/cdrom0   udf,iso9660 user,noauto    
    0       0<br>
    /dev/cdrom        /media/cdrom0   udf,iso9660 user,noauto    
    0       0<br>
    192.168.122.1:/var/tmp/nfs      /var/tmp/nfs    nfs    
    _netdev,auto,soft,intr  0       0<br>
    tmpfs           /tmp            tmpfs   auto    0       0<br>
    <br>
    <br>
    20:10:51 root@debian-x64:~# umount /<br>
    umount: /: device is busy.<br>
            (In some cases useful info about processes that use<br>
             the device is found by lsof(8) or fuser(1))<br>
    <br>
    20:10:53 root@debian-x64:~# mount<br>
    /dev/mapper/debian--x64-root on / type ext3 (rw,errors=remount-ro)<br>
    tmpfs on /lib/init/rw type tmpfs
    (rw,nosuid,size=5242880,mode=755,size=5242880,mode=755)<br>
    tmpfs on /run type tmpfs
    (rw,noexec,nosuid,size=10%,mode=755,size=10%,mode=755)<br>
    tmpfs on /tmp type tmpfs (rw,nosuid,nodev,size=20%,mode=1777)<br>
    proc on /proc type proc (rw,noexec,nosuid,nodev)<br>
    sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)<br>
    udev on /dev type tmpfs (rw,mode=0755)<br>
    tmpfs on /run/shm type tmpfs
    (rw,nosuid,nodev,size=20%,mode=1777,size=20%,mode=1777)<br>
    devpts on /dev/pts type devpts
    (rw,noexec,nosuid,gid=5,mode=620,gid=5,mode=620)<br>
    /dev/vda1 on /boot type ext2 (rw)<br>
    192.168.122.1:/var/tmp/nfs on /var/tmp/nfs type nfs
    (rw,soft,intr,addr=192.168.122.1)<br>
    configfs on /sys/kernel/config type configfs (rw)<br>
    <br>
    20:10:59 root@debian-x64:~# touch /test<br>
    <br>
    20:11:04 root@debian-x64:~# file /test<br>
    /test: empty<br>
    <br>
    <blockquote cite="mid:508E8070.6040809@umcutrecht.nl" type="cite">
      <br>
      To answer your question: the block device is indeed a local disk.
    </blockquote>
    <br>
    If your / goes read-only, it is your local block device at fault.
    Could be a hardware problem, or else, a bug in the kernel. You
    should check the kernel logs.<br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Ritesh Raj Sarraf
RESEARCHUT - <a class="moz-txt-link-freetext" href="http://www.researchut.com">http://www.researchut.com</a>
"Necessity is the mother of invention."
</pre>
  </body>
</html>