LinuxQuestions.org
Help answer threads with 0 replies.
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 04-13-2005, 02:44 AM   #1
pavodive
LQ Newbie
 
Registered: Oct 2004
Distribution: fedora core 3
Posts: 22

Rep: Reputation: 15
Read-only file system usb-disk


I depend heavily on a USD disk to keep updated my work in two computers at work (windoze and Fedora 3) and the one I have at home (Fedora 3). I normally use rsync to update the contents between the hard-disk based and the usb based information.

Everything had been working well until yesterday, in both Fedora machines the system will complain when trying to write to the USB disk. If I try manual copy this is what it says:
Code:
[pavolo@localhost ~]$ cp --preserve=timestamps ~/sync/ga/naval/crea_var.m ///media/usbdisk/sync/ga/naval/
cp: cannot create regular file `///media/usbdisk/sync/ga/naval/crea_var.m': Read-only file system
I've read the mount, fstab and umount manuals many times, have changed the /etc/fstab file to explicitly add the 'rw' and 'user' options for /dev/sda, and even after attempting a
Code:
 mount /dev/sda -o remount
the error keeps coming the same.

for your information, this is my /etc/fstab file (when the USB disk is plugged):
Code:
[pavolo@localhost ~]$ more /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
/dev/hdc                /media/cdrecorder       auto    pamconsole,exec,noauto,fscontext=system_u:object_r:removable_t,managed 0 0
/dev/fd0                /media/floppy           auto    pamconsole,exec,noauto,fscontext=system_u:object_r:removable_t,managed 0 0
/dev/sda                /media/usbdisk          vfat    pamconsole,exec,noauto,iocharset=utf8,noatime,sync,fscontext=system_u:object_r:removable_t,managed 0 0
Also, the changes I made to it (adding rw and user, although those are default) aren't kept, I assume it is fstab-sync that edited my changes (am I right on this?).

The only thing I could relate to this happening is that I updated the kernel (just yesterday around midnight), because before it was working fine.

Is it possible that updating the kernel changed some files that I need to put back into their original state?? (If so, which files and how?)

Did I mess up something?

Thanks!

PavoDive
:newbie:
 
Old 04-13-2005, 09:35 AM   #2
bru
Member
 
Registered: Sep 2003
Location: South Carolina
Distribution: Ubuntu, CentOS, BT4, Debian
Posts: 132

Rep: Reputation: 15
I'm not 100% sure but there is a chance when you updated your kernel you might have ommited something that was there before, unless you let Fedora do the kernel update. Other than that I couldn't tell you.

Another thing, how are you changing your fstab? vi, emacs, pico, gedit...???
There is a cance that you might not be saving the file correctly; also same point, are you trying to change the file as "user" or root?
 
Old 04-13-2005, 09:57 AM   #3
pavodive
LQ Newbie
 
Registered: Oct 2004
Distribution: fedora core 3
Posts: 22

Original Poster
Rep: Reputation: 15
Thanks Bru,

Answering the questions in your reply:

1.- I'm letting yum do the update (still too illiterate to attempt it myself!!);
2.- Of course I've changed fstab when logged in as root
3.- I'm using nano to edit /etc/fstab, saving with the sequence : ^X, y, return

By the way, is it any difference if I used a different editor??

Thanks,

PavoDive
 
Old 04-13-2005, 01:21 PM   #4
pavodive
LQ Newbie
 
Registered: Oct 2004
Distribution: fedora core 3
Posts: 22

Original Poster
Rep: Reputation: 15
to complement my initial post (I have no idea of what information could be relevant, trying this):
this is my /etc/fstab and the output of mount:
Code:
[root@tayrona etc]# more fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
/dev/hdc                /media/cdrom            auto    pamconsole,exec,noauto,fscontext=system_u:object_r:removable_t,managed 0 0
/dev/sda                /media/usbdisk          vfat    pamconsole,exec,noauto,iocharset=utf8,noatime,sync,fscontext=system_u:object_r:removable_t,managed 0 0
[root@tayrona etc]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/hda1 on /boot type ext3 (rw)
none 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)
automount(pid3103) on /misc type autofs (rw,fd=5,pgrp=3103,minproto=2,maxproto=4)
/dev/sda on /media/usbdisk type vfat (rw,nosuid,nodev,sync,noatime,iocharset=utf8,fscontext=system_u:object_r:removable_t,user=pavolo)
[root@tayrona etc]#
and this is what I get when attempting rsync:
Code:
[pavolo@tayrona ~]$ rsync -vrut --delete-after ~/sync/ ///media/usbdisk/sync/
building file list ... done
./
ga/naval/
ga/naval/050411.mat
ga/naval/analisis_050411.txt
ga/naval/check_conds_alt.m
ga/naval/fitness_alt.m
ga/naval/show_ranges.m
hogar/Cuentas
hogar/Cuentas.20050330223508.log
hogar/Cuentas.20050330224656.xac
hogar/Cuentas.20050330224857.xac
hogar/Cuentas.20050413222437.log
hogar/Cuentas.20050413223857.xac
hogar/Cuentas.20050413224318.xac
job-apps/
papers/
papers/snaj-march_pres.log
papers/snaj-march_pres.tex
rsync: mkstemp "/media/usbdisk/sync/ga/naval/.analisis_050411.txt.vSvCNu" failed: Read-only file system (30)
rsync: mkstemp "/media/usbdisk/sync/ga/naval/.check_conds_alt.m.CT83wn" failed: Read-only file system (30)
rsync: mkstemp "/media/usbdisk/sync/ga/naval/.fitness_alt.m.N3bxgg" failed: Read-only file system (30)
rsync: mkstemp "/media/usbdisk/sync/ga/naval/.show_ranges.m.UJH2Z8" failed: Read-only file system (30)
rsync: mkstemp "/media/usbdisk/sync/hogar/.Cuentas.wKAzJ1" failed: Read-only file system (30)
rsync: mkstemp "/media/usbdisk/sync/hogar/.Cuentas.20050330223508.log.HXIREU" failed: Read-only file system (30)
rsync: mkstemp "/media/usbdisk/sync/hogar/.Cuentas.20050330224656.xac.gjElCN" failed: Read-only file system (30)
rsync: mkstemp "/media/usbdisk/sync/hogar/.Cuentas.20050330224857.xac.vS6uIG" failed: Read-only file system (30)
rsync: mkstemp "/media/usbdisk/sync/hogar/.Cuentas.20050413222437.log.6TAs4z" failed: Read-only file system (30)
rsync: mkstemp "/media/usbdisk/sync/hogar/.Cuentas.20050413223857.xac.1ufdst" failed: Read-only file system (30)
rsync: mkstemp "/media/usbdisk/sync/hogar/.Cuentas.20050413224318.xac.cAn87m" failed: Read-only file system (30)
rsync: mkstemp "/media/usbdisk/sync/papers/.snaj-march_pres.log.fPlNYg" failed: Read-only file system (30)
rsync: mkstemp "/media/usbdisk/sync/papers/.snaj-march_pres.tex.CcqhRa" failed: Read-only file system (30)

sent 5541474 bytes  received 300 bytes  2216709.60 bytes/sec
total size is 67770312  speedup is 12.23
rsync error: some files could not be transferred (code 23) at main.c(702)
[pavolo@tayrona ~]$
According to the output of 'mount' the device is rw, however it fails complaining it is Read-only.... If I mount /dev/sda -o remount then it will let me do rsync, but the possibility lasts for few minutes only...

Thanks!
 
Old 04-22-2005, 03:16 AM   #5
pavodive
LQ Newbie
 
Registered: Oct 2004
Distribution: fedora core 3
Posts: 22

Original Poster
Rep: Reputation: 15
Hi to all!

If this is of any help to you (who understand!), this is /var/log/messages around the time I installed the usbdisk. At first I was able to rm some files from it, but after a short while It came with messages like those found in my previous reply to this thread (i.e., that it is a read-only system). /etc/fstab is same as above, with the option set for /dev/sda to be rw. Results of mount say also that it is rw.

Code:
Apr 22 15:53:47 localhost kernel: usb 1-5: new high speed USB device using ehci_hcd and address 2
Apr 22 15:53:49 localhost kernel: SCSI subsystem initialized
Apr 22 15:53:49 localhost kernel: Initializing USB Mass Storage driver...
Apr 22 15:53:49 localhost kernel: scsi0 : SCSI emulation for USB Mass Storage devices
Apr 22 15:53:49 localhost kernel: usbcore: registered new driver usb-storage
Apr 22 15:53:49 localhost kernel: USB Mass Storage support registered.
Apr 22 15:53:54 localhost kernel:   Vendor: Generic   Model: USB Flash Disk    Rev: 2.00
Apr 22 15:53:54 localhost kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Apr 22 15:53:54 localhost scsi.agent[5716]: disk at /devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/host0/target0:0:0/0:0:0:0
Apr 22 15:53:54 localhost kernel: sda: Unit Not Ready, sense:
Apr 22 15:53:54 localhost kernel: : Current: sense key: Unit Attention
Apr 22 15:53:54 localhost kernel:     Additional sense: Not ready to ready change, medium may have changed
Apr 22 15:53:54 localhost kernel: sda : READ CAPACITY failed.
Apr 22 15:53:54 localhost kernel: sda : status=1, message=00, host=0, driver=08
Apr 22 15:53:54 localhost kernel: sd: Current: sense key: Unit Attention
Apr 22 15:53:54 localhost kernel:     Additional sense: Not ready to ready change, medium may have changed
Apr 22 15:53:54 localhost kernel: sda: test WP failed, assume Write Enabled
Apr 22 15:53:54 localhost kernel: sda: assuming drive cache: write through
Apr 22 15:53:54 localhost kernel: sda: Unit Not Ready, sense:
Apr 22 15:53:54 localhost kernel: : Current: sense key: Unit Attention
Apr 22 15:53:54 localhost kernel:     Additional sense: Not ready to ready change, medium may have changed
Apr 22 15:53:54 localhost kernel: sda : READ CAPACITY failed.
Apr 22 15:53:54 localhost kernel: sda : status=1, message=00, host=0, driver=08
Apr 22 15:53:54 localhost kernel: sd: Current: sense key: Unit Attention
Apr 22 15:53:54 localhost kernel:     Additional sense: Not ready to ready change, medium may have changed
Apr 22 15:53:54 localhost kernel: sda: test WP failed, assume Write Enabled
Apr 22 15:53:54 localhost kernel: sda: assuming drive cache: write through
Apr 22 15:53:54 localhost kernel: sda: Unit Not Ready, sense:
Apr 22 15:53:54 localhost kernel: : Current: sense key: Unit Attention
Apr 22 15:53:54 localhost kernel:     Additional sense: Not ready to ready change, medium may have changed
Apr 22 15:53:54 localhost kernel: sda : READ CAPACITY failed.
Apr 22 15:53:54 localhost kernel: sda : status=1, message=00, host=0, driver=08
Apr 22 15:53:54 localhost kernel: sd: Current: sense key: Unit Attention
Apr 22 15:53:54 localhost kernel:     Additional sense: Not ready to ready change, medium may have changed
Apr 22 15:53:54 localhost kernel: sda: test WP failed, assume Write Enabled
Apr 22 15:53:54 localhost kernel: sda: assuming drive cache: write through
Apr 22 15:53:54 localhost kernel:  sda:end_request: I/O error, dev sda, sector 0
Apr 22 15:53:54 localhost kernel: Buffer I/O error on device sda, logical block 0
Apr 22 15:53:54 localhost last message repeated 2 times
Apr 22 15:53:54 localhost kernel:  unable to read partition table
Apr 22 15:53:54 localhost kernel: Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
Apr 22 15:53:55 localhost kernel: SCSI device sda: 511488 512-byte hdwr sectors (262 MB)
Apr 22 15:53:55 localhost kernel: sda: Write Protect is off
Apr 22 15:53:55 localhost kernel: sda: assuming drive cache: write through
Apr 22 15:53:55 localhost kernel: SCSI device sda: 511488 512-byte hdwr sectors (262 MB)
Apr 22 15:53:55 localhost kernel: sda: Write Protect is off
Apr 22 15:53:55 localhost kernel: sda: assuming drive cache: write through
Apr 22 15:53:55 localhost kernel:  sda: unknown partition table
Apr 22 15:53:55 localhost fstab-sync[5789]: added mount point /media/usbdisk for /dev/sda
Apr 22 15:53:55 localhost kernel: FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
Apr 22 15:53:55 localhost kernel: SELinux: initialized (dev sda, type vfat), uses genfs_contexts
Apr 22 15:55:35 localhost kernel: FAT: Filesystem panic (dev sda)
Apr 22 15:55:35 localhost kernel:     fat_free: deleting beyond EOF (i_pos 0)
Apr 22 15:55:35 localhost kernel:     File system has been set read-only
Thanks for your help!

PavoDive
 
Old 04-22-2005, 09:47 AM   #6
ctwardy
LQ Newbie
 
Registered: Nov 2003
Posts: 1

Rep: Reputation: 0
Confirmed. Some extra info.

I have an external firewire/USB drive. On OSX with a much older rsync, it runs fine. Sustained transfer no problem, so drive is OK.

Under Linux, it rsync's OK for awhile, and then gets some sort of I/O error.
After that, it gets "read-only" errors on every attempt.
Unmount/unplug/plug seems to reset things, though I have zombie rsyncs lying around which seem to make the system unstable.

Tonight I'm having good luck with 'cp -auv'.
 
Old 05-23-2005, 05:11 AM   #7
phen
LQ Newbie
 
Registered: Sep 2003
Location: berlin is in germany
Distribution: ubuntu hoary
Posts: 18

Rep: Reputation: 0
what does dmesg say? (type "dmesg" in console)

mine says after i try to delete a file from my usb-mass storage
----
FAT file system panic....
....invalic cluster chain
----


Have no solution yet. Maybe we have got the same problem...

cheers,

kai
 
Old 05-23-2005, 06:53 AM   #8
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
Why is the usb partition /dev/sda and not something like /dev/sda1?

I'm referring to the fstab entry:
/dev/sda on /media/usbdisk type vfat (rw,nosuid,nodev,sync,noatime,iocharset=utf8,fscontext=system_ubject_r:removable_t,user=pavolo)
[root@tayrona etc]

Usually a partition has a number, even if there is only one.

Last edited by jschiwal; 05-26-2005 at 01:24 AM.
 
Old 05-23-2005, 07:23 AM   #9
Ynot Irucrem
Member
 
Registered: Apr 2005
Location: Perth, Western Australia
Distribution: Debian
Posts: 233

Rep: Reputation: 30
I had the same problem and it turned out the usb cable was faulty. it might also have something to do with the way it's partitioned. try repartitioning it so that it it is mounted sda1. you can do this by formatting it in windows.
 
Old 05-23-2005, 09:07 PM   #10
pavodive
LQ Newbie
 
Registered: Oct 2004
Distribution: fedora core 3
Posts: 22

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by phen
what does dmesg say? (type "dmesg" in console)

mine says after i try to delete a file from my usb-mass storage
----
FAT file system panic....
....invalic cluster chain
----


Have no solution yet. Maybe we have got the same problem...

cheers,

kai
Phen: I was also getting that sort of "FAT file system panic", but I'm now convinced of what ctwardy said: It must be a problem with rsync, for now I'm using unison and have no problem whatsoever. If you attempted to use rsync BEFORE deleting the file, it may be rsync; otherwise I think is good idea to follow the other suggestions as to check the conection, cable, etc.
If you're using fedora 3, you may want to read http://www.fedoraforum.org/forum/showthread.php?t=52230 and try the test kernel kernel-2.6.11-1.19_FC3 i586. (as I was having shutdown panics by the same time, I updated the kernel. That solved the SHUTDOWN panics, but I'm not sure if there was any effect on the filesystem panics, who knows?!)

PavoDive
========
 
Old 05-25-2005, 10:22 AM   #11
phen
LQ Newbie
 
Registered: Sep 2003
Location: berlin is in germany
Distribution: ubuntu hoary
Posts: 18

Rep: Reputation: 0
hi!

thanks for your suggestion. but how do i change from rsync to unison?
i am using ubuntu btw. there are others with ubuntu facing the same problem over there at ubuntuforums.

cheers,

kai
 
Old 05-25-2005, 11:17 PM   #12
pavodive
LQ Newbie
 
Registered: Oct 2004
Distribution: fedora core 3
Posts: 22

Original Poster
Rep: Reputation: 15
You can check http://www.cis.upenn.edu/~bcpierce/unison/ the program is pretty good, I've been working for some months wiht it under Fedora 3 and windoze, no problem at all!
I actually find it has some advantages ovr rsync, as it lets you synchronize bi-directionally...

Hope that helps,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to read .chm file in fedora, can't mount ntfs file system ishti_du Linux - Newbie 12 03-06-2007 04:27 AM
USB hard disk read only neranjana Mandriva 7 11-24-2005 03:48 AM
"Read-Only File System" external USB HD logan2004 Linux - Hardware 3 04-01-2005 10:07 AM
Read only USB Disk when in Nautilus djib Linux - Hardware 3 12-30-2004 04:57 PM
Change from Read only to Read Write File System? justiceisblind Linux - Newbie 3 03-03-2002 08:23 PM


All times are GMT -5. The time now is 08:17 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration