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.
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:
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?)
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?
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??
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...
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
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.
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.
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.
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?!)
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.
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...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.