mount -rw / ISSUE

Discussion in 'New to FreeNAS?' started by Decibel1000, Jan 11, 2013.

  1. Offline

    Decibel1000

    Member Since:
    Nov 13, 2012
    Messages:
    4
    Message Count:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Decibel1000, Jan 11, 2013

    Hello people,
    I'm having some issues that might be caused by not understanding very well the concept of FreeNAS using a thumb drive for the system volume (and this being R/O), however this is not the subject of this post.

    I'm creating a backup script of several SMB shares that should start from the NAS server, so the files should be pulled from the FreeNAS server. For that to work I understand that I need the password data stored at the .nsmbrc file (root user) so the script can map the SMB shares without prompting for a password.
    Without understanding very well how this system volume R/O concept works, I used the "mount -rw /" command to make the root user home directory R/W so I could make the changes I need. I could notice that after that the server started responding very slow to the terminal commands, but I kept going on. After having done the changes I made the system R/O again using the "mount -ur /" command to bring back the original volume attributes. After that the server froze, or almost froze. the only way I could bring it back was using a ctrl-alt-del from the console to a soft boot, and it took maybe 5 minutes to complete the restart.
    After this restart the system was OK again. I went trough the whole procedure again trying to understand what happened and had the same results. After a restart the server came back to life again without issues.
    So my question: what is happening? Is this procedure to alter configuration files wrong? I imagine that using the "mount -ur /" would also make the /var dir R/O. This might explain system hanging.

    Thanks a ton for your help.
  2. Offline

    Ef57uiKnN6

    Member Since:
    Mar 25, 2012
    Messages:
    28
    Message Count:
    28
    Likes Received:
    1
    Trophy Points:
    3
    Ef57uiKnN6, Jan 11, 2013

    Encounter exactly the same issue with my new FreeNAS box.
    I thought that there is a serious problem, because I was used to get the prompt back very quickly after remounting read-only on my old box.

    In my case it turns out that I was just a little bit to impatient.

    New box:
    Code (text):
    1.  
    2. [root@freenas2 ~]# time mount -uw /; time mount -ur /
    3. + mount -uw /
    4.  
    5. real    0m0.007s
    6. user    0m0.000s
    7. sys 0m0.002s
    8. + mount -ur /
    9.  
    10. real    3m5.638s
    11. user    0m0.000s
    12. sys 0m0.093s
    13. [root@freenas2 ~]#
    14.  
    Old box:
    Code (text):
    1.  
    2. [root@freenas ~]# time mount -uw /; time mount -ur /
    3. + mount -uw /
    4.  
    5. real    0m0.011s
    6. user    0m0.000s
    7. sys 0m0.005s
    8. + mount -ur /
    9.  
    10. real    0m17.332s
    11. user    0m0.000s
    12. sys 0m0.182s
    13. [root@freenas ~]#
    14.  
  3. Offline

    Decibel1000

    Member Since:
    Nov 13, 2012
    Messages:
    4
    Message Count:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Decibel1000, Jan 11, 2013

    Actually it's not only a lag after issuing the command. The server seems to hang as even the web interface doesn't respond any more.
    Please, can you explain those numbers from your example? What those three minutes actually mean?

    EDIT: I think I was impatient too ... :) However, this three minute figure isn't quite good. The whole system hangs during this time. Why it happens?
  4. Offline

    cyberjock Forum Guard Dog/Admin

    Member Since:
    Mar 25, 2012
    Messages:
    13,576
    Message Count:
    13,576
    Likes Received:
    700
    Trophy Points:
    113
    cyberjock, Jan 11, 2013

    USB sticks don't handle random writes very well. If you have logs and other stuff going on it can create very long latency issues that may make you think the server is frozen. I bet if you do the 'mount -ur /' and wait it out for 5 mins or so it'll clear up.
  5. Offline

    Decibel1000

    Member Since:
    Nov 13, 2012
    Messages:
    4
    Message Count:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Decibel1000, Jan 11, 2013

    I'm setting the thumb drive to R/O, so no logs, no nothing is being written there.
    As Ef57uiKnN6 exemplified, in some FreNAS older version this didn't seem to happen...

Share This Page