Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Location: Farnham, Surrey, UK (Chile until Dec 2011)
Distribution: Fedora Core 14
Posts: 32
Rep:
External Hard Drive has become read-only
Hi Everyone
I've always used rsync to create a backup of all my files from my work computer to my external hard drive (WD Elements 500GB FAT32 filesystem) and until now have had no problem.
Now I appear to be getting errors with setting times and permissions on the transferred files. Plus no new files are being written across. I have tried copying over files myself but I get:
cp: cannot create regular file `/media/Elements/WorkComputer/local/jclarke/models/mdwarf_mods/28-5.0-0.0.sav': Read-only file system
for example.
However when I do the same thing on my laptop there are no problems!
Is there a way to make my external hard drive writable again, and the twist is that on my computer I do not have root permissions!!
I'm running Fedora 9 on my work computer and Fedora 6 on my laptop.
/dev/sda2 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda6 on /local type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sdc1 on /media/Elements type vfat (rw,nosuid,nodev,uhelper=hal,shortname=lower,uid=1008)
Oops. I misread the question. You the laptop user is the owner, not the workstation user I think. You may try as root on the workstation
Code:
chown username foldername
That may do it. You can always revert with the same command if it doesn't work.
Another option is to create the same username on the workstation and log in as that one? That would eliminate the need to redo the owner of the drive every time.
Is it possible that the drive is ro because it's full? I've found that rsync can sometimes eat lot's of space.
The mount output you posted claims that /media/Elements is mounted rw, so I don't see how you could get a "file system is mounted ro" error message unless the file system has errors.
Suggestion: Reboot the laptop with the USB drive unplugged, log on, plug it in, and try to write to the drive. Then do a tail -20 dmesg to see if there is any "interesting" information there that might help identify the problem.
Since you don't have "root" access to the laptop there's not too much you can do besides identifying the problem. (I assume that this is a company laptop, so you should have an IT department that can help you. Have you talked with them? If you do, you might also ask them why they have you using an old, unsupported OS. And also why they are letting you use an unsupported OS on your desktop -- IIRC, Fedora 9 support was terminated last week.)
Location: Farnham, Surrey, UK (Chile until Dec 2011)
Distribution: Fedora Core 14
Posts: 32
Original Poster
Rep:
Hi Everyone,
Thanks for all the replies so far. I'll try and answer what I can.
On the External's directories and for the external I have the usual drwxr-xr-x permissions. It has always been FAT32 and never NTFS.
I didn't enable SElinux myself but it looks like it has been enabled (see output from dmesg below).
The output I get from lsusb is:
Bus 001 Device 004: ID 1058:1001 Western Digital Technologies, Inc. External Hard Disk
My user id is definitely 1008.
I have however perhaps found a clue. The external hd is writable when I first mount it, however it is only after I run rsync that it becomes read-only. Even if I unmount and remount I can copy files to it. Here is the rsync command I used:
I know that I could just use the "a" option in rsync but I have been trying to diagnose each individual option in turn.
There definitely is something strange from dmesg, this appears both after restarting and mounting, and re-mounting without restart:
usb 1-8: configuration #1 chosen from 1 choice
usb 1-8: New USB device found, idVendor=1058, idProduct=1001
usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-8: Product: External HDD
usb 1-8: Manufacturer: Western Digital
usb 1-8: SerialNumber: 574341535533343830303935
Initializing USB Mass Storage driver...
scsi2 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
scsi 2:0:0:0: Direct-Access WD 5000AAV External 1.05 PQ: 0 ANSI: 4
sd 2:0:0:0: [sdc] 976773168 512-byte hardware sectors (500108 MB)
sd 2:0:0:0: [sdc] Write Protect is off
sd 2:0:0:0: [sdc] Mode Sense: 21 00 00 00
sd 2:0:0:0: [sdc] Assuming drive cache: write through
sd 2:0:0:0: [sdc] 976773168 512-byte hardware sectors (500108 MB)
sd 2:0:0:0: [sdc] Write Protect is off
sd 2:0:0:0: [sdc] Mode Sense: 21 00 00 00
sd 2:0:0:0: [sdc] Assuming drive cache: write through
sdc: sdc1
sd 2:0:0:0: [sdc] Attached SCSI disk
sd 2:0:0:0: Attached scsi generic sg3 type 0
SELinux: initialized (dev sdc1, type vfat), uses genfs_contexts
FAT: Filesystem panic (dev sdc1)
fat_free_clusters: deleting FAT entry beyond EOF
File system has been set read-only
usb 1-8: USB disconnect, address 3
usb 1-8: new high speed USB device using ehci_hcd and address 4
usb 1-8: configuration #1 chosen from 1 choice
scsi3 : SCSI emulation for USB Mass Storage devices
usb 1-8: New USB device found, idVendor=1058, idProduct=1001
usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-8: Product: External HDD
usb 1-8: Manufacturer: Western Digital
usb 1-8: SerialNumber: 574341535533343830303935
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
scsi 3:0:0:0: Direct-Access WD 5000AAV External 1.05 PQ: 0 ANSI: 4
sd 3:0:0:0: [sdc] 976773168 512-byte hardware sectors (500108 MB)
sd 3:0:0:0: [sdc] Write Protect is off
sd 3:0:0:0: [sdc] Mode Sense: 21 00 00 00
sd 3:0:0:0: [sdc] Assuming drive cache: write through
sd 3:0:0:0: [sdc] 976773168 512-byte hardware sectors (500108 MB)
sd 3:0:0:0: [sdc] Write Protect is off
sd 3:0:0:0: [sdc] Mode Sense: 21 00 00 00
sd 3:0:0:0: [sdc] Assuming drive cache: write through
sdc: sdc1
sd 3:0:0:0: [sdc] Attached SCSI disk
sd 3:0:0:0: Attached scsi generic sg3 type 0
SELinux: initialized (dev sdc1, type vfat), uses genfs_contexts
SELinux: initialized (dev 0:16, type nfs), uses genfs_contexts
SELinux: initialized (dev 0:16, type nfs), uses genfs_contexts
SELinux: initialized (dev 0:16, type nfs), uses genfs_contexts
Note the FAT: Filesystem panic.
However even after reading this dmesg I can still copy/create files to the external. It is only after running rsync that the read-only part comes into effect.
Now I'm a little confused: In your first post you stated that the first partition was a 800GB ext3 one. In this last post, you state that "it has always been FAT32."
Anyhow, the error message:
Quote:
FAT: Filesystem panic (dev sdc1)
fat_free_clusters: deleting FAT entry beyond EOF
File system has been set read-only
seems to be telling you that you've tried to create a file that exceeds the 2GB size limit imposed by the FAT32 file system. This is, of course, a problem that using ext3 (or, better, ext4) would have avoided.
Your solution is to make sure your file size does not exceed the limits imposed by the file system you're using.
And what happened to the second partition?
---------------------
Fedora sets SELinux to "enforcing" by default. On a personal system, with an active firewall, I usually use the system-config-selinux command to set it to "permissive" so I get the error messages for review, but not the blocking action.
Location: Farnham, Surrey, UK (Chile until Dec 2011)
Distribution: Fedora Core 14
Posts: 32
Original Poster
Rep:
Hi
I've had a look through to the first post and I can't see anywhere that I mention the External HD to be an ext3 800GB partition! Maybe it was a different post you read?
I have never partitioned the HD, its always been one 500GB FAT32 block. I've taken a look and there are no files that are over 2GB that I'm trying to sync over. Very strange. I'll keep investigating!
Sorry! I was confused myself - another thread I'm following was having NTFS problems, and your thread was in an adjacent tab.
But I think rsync can create large housekeeping files even when the underlying files are less than 2GB in size. Perhaps different rsync options might help.
Location: Farnham, Surrey, UK (Chile until Dec 2011)
Distribution: Fedora Core 14
Posts: 32
Original Poster
Rep:
No problem, I thought it may have been something like that :-)
I have just managed to make rsync work now, when I target it at a different directory on the external hard drive (e.g. a new one I created parallel to the problem dir) and everything copies over fine. I've read somewhere that VFAT can turn read-only to prevent further damage when certain errors are detected. But I would assume this would be the whole drive and not just a particular directory recursively. And looking at these two parallel directories they have exactly the same permissions! Oh well, at least I've managed to back everything up again. Weird stuff!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.