3

When I first mount my external HDD, it claims to be mounted rw:

# mkdir /media/external-hdd
# mount /dev/sdb1 /media/external-hdd
# mount | grep sdb1
/dev/sdb1 on /media/external-hdd type ext3 (rw,relatime,errors=continue,user_xattr,acl,barrier=1,data=ordered)

However, if I attempt to write to it, I get an error, and it now shows up as read-only:

# touch /media/external-hdd/test
touch: cannot touch `/media/external-hdd/test': Read-only file system
# mount | grep sdb1
/dev/sdb1 on /media/external-hdd type ext3 (ro,relatime,errors=continue,user_xattr,acl,barrier=1,data=ordered)

EDIT: I think it has something to do with the ext3 journal, as I get the following when running dmesg:

[4964983.186798] EXT3-fs (sdb1): warning: mounting fs with errors, running e2fsck is recommended
[4964983.187960] EXT3-fs (sdb1): using internal journal
[4964983.187970] EXT3-fs (sdb1): recovery complete
[4964983.192469] EXT3-fs (sdb1): mounted filesystem with ordered data mode
[4964989.011023] end_request: I/O error, dev sdb, sector 976492584
[4964989.011040] Buffer I/O error on device sdb1, logical block 122061317
[4964989.011048] lost page write due to I/O error on sdb1
[4964989.011081] Aborting journal on device sdb1.
[4965081.221503] EXT3-fs (sdb1): error: ext3_journal_start_sb: Detected aborted journal
[4965081.221520] EXT3-fs (sdb1): error: remounting filesystem read-only
brjaga
  • 163
  • 3

1 Answers1

2

Try running fsck on the device before mounting it. It looks like there are errors that the OS wants you to correct before it will let you have full rw access.

you can do this by ensuring that you unmount the drive

umount /dev/xxxx

then type

fsck /dev/xxxx

Where 'xxxx' is the device identifier of the drive in question.

This happens because when you mount a drive, a very quick sanity check is performed in the background. If that check reports problems that don't stop you from accessing the drive, but may cause problems in the future the mount command won't allow you to write to the disk until it's fixed.

It will however allow you to read, in case you would like to try and move the files to a safe place before you try to fix it.

shawty
  • 362