LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 07-08-2009, 12:07 PM   #1
jraclarke
Member
 
Registered: May 2006
Location: Farnham, Surrey, UK (Chile until Dec 2011)
Distribution: Fedora Core 14
Posts: 32

Rep: Reputation: 15
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
 
Old 07-08-2009, 12:09 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
What are the mount options?

Code:
mount

Cheers,
Tink
 
Old 07-08-2009, 12:20 PM   #3
jraclarke
Member
 
Registered: May 2006
Location: Farnham, Surrey, UK (Chile until Dec 2011)
Distribution: Fedora Core 14
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Tinkster View Post
What are the mount options?

Code:
mount

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
 
Old 07-08-2009, 12:26 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
And a silly question: that's on the laptop or the workstation?


Cheers,
Tink
 
Old 07-08-2009, 12:39 PM   #5
jraclarke
Member
 
Registered: May 2006
Location: Farnham, Surrey, UK (Chile until Dec 2011)
Distribution: Fedora Core 14
Posts: 32

Original Poster
Rep: Reputation: 15
Sorry, my fault for not mentioning it.

That's for the Workstation.

James
 
Old 07-08-2009, 12:52 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 07-08-2009, 02:15 PM   #7
portamenteff
Member
 
Registered: Feb 2006
Location: Colorado
Distribution: lubuntu, fedora, lightning Linux.
Posts: 180
Blog Entries: 1

Rep: Reputation: 36
Is this a usb harddrive?
If so then give us
Code:
lsusb
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
 
Old 07-08-2009, 02:21 PM   #8
portamenteff
Member
 
Registered: Feb 2006
Location: Colorado
Distribution: lubuntu, fedora, lightning Linux.
Posts: 180
Blog Entries: 1

Rep: Reputation: 36
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.
 
Old 07-08-2009, 02:29 PM   #9
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 347

Rep: Reputation: 34
did your drive has NTFS filesystem?
 
Old 07-08-2009, 03:15 PM   #10
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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.)
 
Old 07-09-2009, 06:23 AM   #11
jraclarke
Member
 
Registered: May 2006
Location: Farnham, Surrey, UK (Chile until Dec 2011)
Distribution: Fedora Core 14
Posts: 32

Original Poster
Rep: Reputation: 15
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
 
Old 07-09-2009, 12:11 PM   #12
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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.
 
Old 07-14-2009, 08:43 AM   #13
jraclarke
Member
 
Registered: May 2006
Location: Farnham, Surrey, UK (Chile until Dec 2011)
Distribution: Fedora Core 14
Posts: 32

Original Poster
Rep: Reputation: 15
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
 
Old 07-14-2009, 11:07 AM   #14
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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.
 
Old 07-14-2009, 12:22 PM   #15
jraclarke
Member
 
Registered: May 2006
Location: Farnham, Surrey, UK (Chile until Dec 2011)
Distribution: Fedora Core 14
Posts: 32

Original Poster
Rep: Reputation: 15
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
read external hard drive mccclxxxv Linux - Hardware 6 06-11-2022 12:58 PM
external firewire hard drive is read only roofninja Ubuntu 5 02-16-2008 03:41 PM
External hard-drive - readonly, can't make it read/write mooseman Linux - Hardware 3 05-18-2007 02:27 AM
New External Hard drive is Detected As Read-Only tubatodd Ubuntu 2 02-11-2007 12:19 PM
Can't read external hard drive alrymala Linux - Security 1 10-23-2005 01:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration