4

I've been having a problem with my Raspberry Pi: it keeps mounting my USB hard drive as read-only. I've been mounting it with sudo mount -t ntfs -o umask=000 /dev/sda1 "/media/My Book" but for some reason it now says mount: warning: /media/My Book/ seems to be mounted read-only when I do so, and ls -l shows it's correct. The drive has its own power supply and it works fine with my laptop, so I think the problem must be with the Pi. What am I doing wrong?

Just to be clear, that command used to work, but now it doesn't. And it's now read-only for EVERYONE, even root:

$ ls -l /media
total 8
dr-xr-xr-x 1 root root 4096 Apr 28 11:11 My Book

The contents appear the same way.

Update: Probably found the cause. From /var/log/syslog:

May 17 19:37:52 raspberrypi kernel: [   64.688724] NTFS driver 2.1.30 [Flags: R/W MODULE].
May 17 19:37:52 raspberrypi kernel: [   65.195397] NTFS volume version 3.1.
May 17 19:37:52 raspberrypi kernel: [   65.195439] NTFS-fs error (device sda1): load_system_files(): Volume is dirty.  Mounting read-only.  Run chkdsk and mount in Windows.

Probably should've tried looking there before...

  • 2
    Is the NTFS on the disk clean? If not, try plugging it into a windows host, run checkdisk and cleanly unmount it. Then try again with the rPi – Hennes May 18 '13 at 0:31
  • I'll try it, but first: is there any chance that could destroy data on the drive? It has all of my backups on it... – Zelda64fan May 18 '13 at 0:38
  • Almost no risk. A MS windows system should not destroy any data with a fsck from on their own designed filesystem. Note that I recommended the disk check from a windows system. I make no such guarantees with FUSE_NTFS or reverse engineered filesystem drivers. – Hennes May 18 '13 at 0:40
  • @Hennes That didn't seem to help...although the check program may have crashed. Is there some way I could (safely) check it from Linux? – Zelda64fan May 18 '13 at 2:08
  • You can also force mount a dirty drive but that's not recommended unless you don't care about the data – nijave Aug 20 '16 at 22:49
4

I don't have Windows, but I fixed the problem by running

sudo ntfsfix /dev/sdc1

The according package for the command is usually named ntfs-3g.

| improve this answer | |
  • This works! Should be the accepted answer. – arainone Jul 13 '18 at 22:48
3

Running chkdsk E: /F on Windows fixed it.

| improve this answer | |
  • Background knowledge: Manu (all) NTFS filesystem drivers will not mount a NTFS volume R/W if they detect something is wrong. This includes when the dirty flag is set. (E.g. it did not get unmounted cleanly; pulling the USB cable before umount finishes etc etc). <strike>fsck</strike> chkdsk on windows checks and marks it back as clean. – Hennes May 18 '13 at 16:20
  • @Hennes so, what do you do if you don't have Windows? – Hi-Angel Aug 20 '16 at 19:49
  • Pray and trust the (reverse engineered?) versions of fsck.ntfs or just not use NTFS at all. – Hennes Aug 21 '16 at 0:02
  • I ran fsck /f on windows 10 and it showed no issues and when I connected it back to Pogoplug, it still mounted it as readonly and the dmesg output still said $LogFile is not clean. Mounting read-only. Mount in Windows.. The Linux ntfs driver is finding something that the windows doesn't find, probably a bug in the Linux ntfs driver? – haridsv Jun 8 '19 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.