Linux - Newbie This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
07-08-2009, 12:07 PM
|
#1
|
|
Member
Registered: May 2006
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.
Many thanks in advance.
James
|
|
|
|
07-08-2009, 12:09 PM
|
#2
|
|
Moderator
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,903
|
What are the mount options?
Cheers,
Tink
|
|
|
|
07-08-2009, 12:20 PM
|
#3
|
|
Member
Registered: May 2006
Location: Farnham, Surrey, UK (Chile until Dec 2011)
Distribution: Fedora Core 14
Posts: 32
Original Poster
Rep:
|
Quote:
Originally Posted by Tinkster
What are the mount options?
Cheers,
Tink
|
;----------------------------------------------------------
The output I get from "mount" is:
/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)
Thanks
James
|
|
|
|
07-08-2009, 12:26 PM
|
#4
|
|
Moderator
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,903
|
And a silly question: that's on the laptop or the workstation?
Cheers,
Tink
|
|
|
|
07-08-2009, 12:39 PM
|
#5
|
|
Member
Registered: May 2006
Location: Farnham, Surrey, UK (Chile until Dec 2011)
Distribution: Fedora Core 14
Posts: 32
Original Poster
Rep:
|
Sorry, my fault for not mentioning it.
That's for the Workstation.
James
|
|
|
|
07-08-2009, 12:52 PM
|
#6
|
|
Moderator
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,903
|
OK.
And your user-ID on that box is in fact 1008?
What does an "ls -l /media" say about permissions?
Did you by any chance enable SE on the FC9 box recently?
Cheers,
Tink
|
|
|
|
07-08-2009, 02:15 PM
|
#7
|
|
Member
Registered: Feb 2006
Location: Colorado
Distribution: sabayon
Posts: 175
Rep:
|
Is this a usb harddrive?
If so then give us
then
Code:
chmod 755 device-name
That will give the user read write and execute, group and others read write.
Last edited by portamenteff; 07-08-2009 at 02:15 PM.
Reason: improper html tags
|
|
|
|
07-08-2009, 02:21 PM
|
#8
|
|
Member
Registered: Feb 2006
Location: Colorado
Distribution: sabayon
Posts: 175
Rep:
|
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.
|
|
|
|
07-08-2009, 02:29 PM
|
#9
|
|
Member
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 331
Rep:
|
did your drive has NTFS filesystem?
|
|
|
|
07-08-2009, 03:15 PM
|
#10
|
|
Senior Member
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 3,930
|
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.)
|
|
|
|
07-09-2009, 06:23 AM
|
#11
|
|
Member
Registered: May 2006
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:
rsync -vbtrlgoD --size-only --exclude='*:*' --copy-links /local/home/jclarke/ /media/Elements/
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.
Thanks!
James
|
|
|
|
07-09-2009, 12:11 PM
|
#12
|
|
Senior Member
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 3,930
|
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.
|
|
|
|
07-14-2009, 08:43 AM
|
#13
|
|
Member
Registered: May 2006
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!
Thanks
James
|
|
|
|
07-14-2009, 11:07 AM
|
#14
|
|
Senior Member
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 3,930
|
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.
|
|
|
|
07-14-2009, 12:22 PM
|
#15
|
|
Member
Registered: May 2006
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!
Cheers
James
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:24 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|