Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, I have a RHEL 3.4 LDAP server that now appears to have set it's hard drive to read only. I am logged in as root yet cannot create a ...
  1. #1
    Just Joined!
    Join Date
    May 2009
    Posts
    2

    filesystem is read only

    Hi, I have a RHEL 3.4 LDAP server that now appears to have set it's hard drive to read only. I am logged in as root yet cannot create a file or directory anywhere. I've read that remounting with the command `mount -n -o remount /` may help. Is there any danger of erasing data with this command? I am new to Linux so I apologize for dumb questions. Also I've read running `fsck` at bootup to check the HDD. Is this a good option as well? The total disk space on the HDD is about 10 GB so this should not take long right? Thanks for looking into this for me.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Mounting and remounting a file system will not alter the data on it. To lose your data you would have to either format the partition with the mkfs command, or remove data from it explicitly.

    Most Linux systems will run fsck with the -force option after so many mounts (reboots) on a file system. My CentOS system does it after every (I think) 29 mounts. In fact, it did so today after I updated my kernel and rebooted the system. Let it do its thing. It will help keep your system healthy. Unfortunatly, the disc that was checked is a 1.5TB drive that is 85% full, so it took awhile! I went and mowed the lawn. It finished just after I got done... . Anyway, you are right, in that on a 10GB file system, fsck won't take very long - just a few minutes I think.

    As to why it is mounting the drive read-only, it could be because it thinks there could be something wrong with it, and that you DO need to run fsck with the force option on it. You might look in your boot logs to see what the system thinks.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    May 2009
    Posts
    2
    Thanks for you help. I could not reboot it remotely. I had to drive to our datacenter (3 hour drive) and press the power button. I then selected Y when prompted to run fsck. All was good after that.
    I really do appreciate the quick and detailed response. I'm building 2 more ldap servers now to avoid this in the future. I've therefore been very busy with that and other tasks and forgot to thank you.

    Take care!!

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Quote Originally Posted by aromano86 View Post
    Thanks for you help. I could not reboot it remotely. I had to drive to our datacenter (3 hour drive) and press the power button. I then selected Y when prompted to run fsck. All was good after that.
    I really do appreciate the quick and detailed response. I'm building 2 more ldap servers now to avoid this in the future. I've therefore been very busy with that and other tasks and forgot to thank you.
    A suggestion that could reduce the number of 3 hour drives to the data center you need to make. Set up a PC to act as a terminal to the server(s). Set up the servers to use a network console. Install a VNC server on the PC that you can access either directly or via a VPN. Then, when you need to reboot or control the servers, such as in this case, you can connect to the server with the PC as a console over the LAN from your system 3 hours drive away, without ever needing to leave the house! I used to do this when we had servers 1/2 way around the world to deal with, and I do that with clients today. It sure beats having to drive or fly for hours to perform a 3 second fix! Cheaper all around as well!
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...