Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Can't change settings of read only file system

  1. #1
    Join Date
    Apr 2008
    Location
    Cologne
    Beans
    49
    Distro
    Ubuntu 10.04 Lucid Lynx

    Can't change settings of read only file system


    When trying to copy files from a local folder into a directory that is a mapping of my QNAP server I get an error message "... Read-only file system" - and this only since a couple of days.

    Trying to change ownership with sudo chown ... also failed with

    cenk@cenk-laptop:/mnt$ sudo chown cenk:cenk nas-video
    chown: changing ownership of `nas-video': Read-only file system

    The directory currently is owned by root/root but has 777 access rights.
    drwxrwxrwx 1541 nobody nogroup 86016 2010-08-21 07:36 nas-music
    drwxrwxrwx 73 nobody nogroup 4096 2010-09-25 14:08 nas-pictures
    drwxrwxrwx 8 root root 12288 2010-09-13 23:27 nas-video

    Here is the fstab line mapping the directory:
    eldenas:/music /mnt/nas-music nfs
    eldenas:/video /mnt/nas-video nfs

    eldenas is my QNAP server.

    No issues with the music directory but with the video one:

  2. #2
    Join Date
    Sep 2010
    Location
    Indian Capital City
    Beans
    916
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Can't change settings of read only file system

    You may need to check the export permissions from the server.

    Can you paste the /etc/exports file from server.

    Also, noticed that 2 of the directories are being owned by nobody/nogroup and one by root

    Can you also paste the owner for those on server
    When you have eliminated the impossible, whatever remains, however improbable, must be the truth !!
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Mark it [SOLVED] if the issue has been resolved

  3. #3
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Can't change settings of read only file system

    It's likely that the filesystem has errors and was mounted read-only by the operating system. That's what usually results in a "read-only file system" error.

    You'll need to unmount it and run something like 'fsck /dev/sda1' to fix the errors. Then try mounting it again and see if it's still read-only.

    You can force the system to remount the filesystem in read-write mode by using the command:

    sudo mount -n -o remount,rw /dev/sda1 /mnt/point

    but that's a last-ditch effort. First find out why the OS was only willing to mount the filesystem read-only. Browsing through /var/log/syslog and /var/log/messages might help, too.

    If the device is an external drive of some sort, chances are it wasn't unmounted properly some time in the past. If you must disconnect the external drive from some reason, umount the filesystems on it first. You should also use "safely remove" if it's a USB device. Some filesystems are more fragile than others on external drives. I have one that I had formatted with XFS; it fell over if I looked at it funny. I never had that problem with XFS on drives mounted in a computer, but it was too fragile a filesystem to use on a device which could be accidentally disconnected or powered off. I reformatted it to ext4, and it's been much more robust.
    Last edited by SeijiSensei; October 2nd, 2010 at 01:27 PM.

  4. #4
    Join Date
    Apr 2008
    Location
    Cologne
    Beans
    49
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Can't change settings of read only file system

    The devices are directories on an external server (QNAP TS410) in my network. I can't find an /etc/exports file. Mounting works fine as I can read all files.

    I don't know how the ownerships get mixed up as I always write from the same ubuntu client logged in under the same uid.

    Once unmounted to which drive should I apply the fsck command?

  5. #5
    Join Date
    Jun 2009
    Beans
    53

    Re: Can't change settings of read only file system

    I just experienced the same problem this morning, and this thread was very helpful for sorting out my problem. Here's my scenario:

    I store all my media (DVD backups, music files, and more) on an external hard disk, formatted HFS+ (non-journaled) so it interoperates with my wife's Mac and with the Western Digital Media Center connected to our TV. Today I mis-read the cues of the WD Media Center and unplugged my external drive prematurely. Not good. No media was playing at the time, but the drive was not ready to be disconnected.

    As soon as I reconnected the drive to my Ubuntu machine, it mounted read-only. So I searched, found this thread, and made some progress with Ubuntu's built-in Disk Utility. First, I unmounted the drive. Then I used Disk Utility's built-in filesystem repair function to bring the drive back to life. The filesystem appears to be fixed and the external drive is accessible again.

    I do have one more question: How can I be sure that my data is safe (i.e., no corrupt)? I've read that a damaged HFS+ filesystem can harm the data on a disk. This hard drive contains literally thousands of files and represents years of collecting (not to mention quite a bit of money!), and I don't want anything to be wrong with the files. How can I be sure none of the data is damaged?

    Thanks in advance for your help.

  6. #6
    Join Date
    Apr 2008
    Location
    Cologne
    Beans
    49
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Can't change settings of read only file system

    Could you please explain in little more detail what exactly you did with the disk-utility.
    The external drive doesn't appear in the list of drives when I start the utility.

  7. #7
    Join Date
    Feb 2005
    Location
    Melbourne, Australia
    Beans
    13,510
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Can't change settings of read only file system

    Quote Originally Posted by SemioticRobotic View Post
    I store all my media (DVD backups, music files, and more) on an external hard disk, formatted HFS+ (non-journaled) so it interoperates with my wife's Mac and with the Western Digital Media Center connected to our TV.
    .........
    I do have one more question: How can I be sure that my data is safe (i.e., no corrupt)? I've read that a damaged HFS+ filesystem can harm the data on a disk. This hard drive contains literally thousands of files and represents years of collecting (not to mention quite a bit of money!), and I don't want anything to be wrong with the files. How can I be sure none of the data is damaged?
    1. Please do not hijack threads, start an new thread with your issue.
    2. Journaling is specifically there to reduce chances of data corruption.
    Regards, David.
    Please use the Forum search and Wiki search for immediate help
    Please mark your thread as Solved when appropriate
    New to technical forums?: How To Ask Questions The Smart Way

  8. #8
    Join Date
    Jun 2009
    Beans
    53

    Re: Can't change settings of read only file system

    Quote Originally Posted by dcstar View Post
    1. Please do not hijack threads, start an new thread with your issue.
    2. Journaling is specifically there to reduce chances of data corruption.
    1. I felt that my problem was relevant to the topic at hand and that others with this problem could benefit from hearing a solution to it.
    2. Linux does not support both reading and writing to journaled HFS+ filesystems; thus, the choice was necessary.

  9. #9
    Join Date
    Jun 2009
    Beans
    53

    Re: Can't change settings of read only file system

    Quote Originally Posted by nafihsus View Post
    Could you please explain in little more detail what exactly you did with the disk-utility.
    The external drive doesn't appear in the list of drives when I start the utility.
    I can try.

    When I popped my external drive into the USB port, Ubuntu was able to mount it, but only as a read-only drive. It appeared on my desktop, but I couldn't move any files TO it (though I could do a quick GRsync simulation to check the integrity of my data). In Disk Utility, I could find the drive listed in the left panel, so I selected it and unmounted it. After doing that, I was able to run the built-in filesystem check, which seemed to get me back up and running.

    I have since reformatted the drive and restored my files from a backup, just to be safe.

  10. #10
    Join Date
    Apr 2008
    Location
    Cologne
    Beans
    49
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Can't change settings of read only file system

    I tried applying the brute force method recommended by SeijiSensei and remounted the drive with "rw" option.Even though the mount command didn't return an error, trying to change ownership still resulted in 'read only file system'.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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