Bug 173186

Summary: Can't mount USB VFAT device as read-write
Product: [Fedora] Fedora Reporter: Kim Lux <lux>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: kzak, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-11-15 16:51:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kim Lux 2005-11-14 20:41:26 UTC
Note: I don't know if this is related to unix2dos at all.  I'd like to tag it  
to mount, but mount isn't in the Component list.  Please move as appropriate.    
  
Description of problem:  
  
I periodically mount an IDE VFAT (FAT32) drive to my FC4 computer via USB2.0.  
  
I can mount and read from the drive just fine, but I always get errors when I  
try to write from the drive.     
  
Version-Release number of selected component (if applicable):  
  
which mount  
/bin/mount  
$ mount --version  
mount: mount-2.12p  
  
Other components might be involved.   
  
How reproducible:  
  
Every time.  Tried multiple ways.   
  
Steps to Reproduce:  
1. Try one of the following mount methods, fresh from a umount:  
  
mount /dev/sda1 tmp  
mount -rw /dev/sda1 tmp  
mount -tvfat -rw /dev/sda1 tmp  
mount -tvfat -o rw /dev/sda1 tmp  
  
I'm root when I do all this.   
/dev/sda1 is a FAT32 drive on a USB channel.   
  
2.   
  
cd tmp  
rm -rf test  <where test is a directory with files in it>   
  
Or  
  
su  
konqueror  
browse to tmp  
properties  
shows the following properties for tmp:  
  
Permissions:  
  
Owner: Can View and Modify Content 
User: Can View Content 
Others: Can View Content 
 
Ownership: root 
Group: root  
  
Actual results:  
 
On the remove operation: 
rm -rf Agent 
rm: cannot remove `Agent': Read-only file system 
 
In konqueror, one gets errors trying to remove files via the UI. 
One also gets errors if one tries to change the permissions.  
 
Expected results:  
 
There should be a way to write files to the filesystem.  One should be able to 
change the permissions.  
  
Additional info:  
 
Let me know if you need more info.

Comment 1 Tim Waugh 2005-11-15 10:27:49 UTC
$ rpm -q --qf "%{SOURCERPM}\n" -f /bin/mount
util-linux-2.13-0.10.pre5.src.rpm


Comment 2 Karel Zak 2005-11-15 10:58:09 UTC
Kim, I'd like to see more information about your system. Please, do on system
where is your USB device connected:

 1. dmesg | grep sda
 2. cat /proc/partitions
 3. (after "mount /dev/sda1 /mnt"):  cat /proc/mounts

Thanks.

Comment 3 Kim Lux 2005-11-15 14:59:30 UTC
 
Glad to see I wasn't missing something obvious.  
 
rpm -q --qf "%{SOURCERPM}\n" -f /bin/mount 
util-linux-2.12p-9.12.src.rpm 
 
dmesg | grep sda 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
FAT: Filesystem panic (dev sda1) 
SCSI device sda: 40132503 512-byte hdwr sectors (20548 MB) 
sda: assuming drive cache: write through 
SCSI device sda: 40132503 512-byte hdwr sectors (20548 MB) 
sda: assuming drive cache: write through 
 sda: sda1 
Attached scsi disk sda at scsi11, channel 0, id 0, lun 0 
 
# 
# cat /proc/partitions 
major minor  #blocks  name 
 
   3     0   78150744 hda 
   3     1   16675438 hda1 
   3     2     104422 hda2 
   3     3    1020127 hda3 
   3     4          1 hda4 
   3     5   60348141 hda5 
   8     0   20066251 sda 
   8     1   20065153 sda1 
 
# cat /proc/mounts 
rootfs / rootfs rw 0 0 
/dev /dev tmpfs rw 0 0 
/dev/root / ext3 rw 0 0 
/proc /proc proc rw,nodiratime 0 0 
/proc/bus/usb /proc/bus/usb usbfs rw 0 0 
/sys /sys sysfs rw 0 0 
none /dev/pts devpts rw 0 0 
/dev/hda2 /boot ext3 rw 0 0 
none /dev/shm tmpfs rw 0 0 
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0 
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0 
automount(pid2487) /misc autofs rw 0 0 
automount(pid2489) /net autofs rw 0 0 
/dev/sda1 /home/krlux/tmp vfat 
rw,nodiratime,fmask=0022,dmask=0022,codepage=cp437,iocharset=ascii 0 0 
 
All commands after mounting /dev/sda1 to ~/tmp with "mount /dev/sda1 tmp" 
 
 

Comment 4 Kim Lux 2005-11-15 15:01:41 UTC
 
The physical device here is a USB IDE drive.  
 
I've got a compact flash card formatted FAT32 and a USB card reader that I 
could mount and test if that is helpful.  I remember trying to write to it a 
while back and got the same sort of error.   

Comment 5 Karel Zak 2005-11-15 16:01:35 UTC
From my point of view your device is mounted correctly. It's strange that there
is   "/dev/sda1 /home/krlux/tmp vfat rw" in /proc/mounts and the rm command
returns "Read-only file system". 

Hmm... "FAT: Filesystem panic" are you really sure that FS on your device is in
a good condition? Maybe you should try reformat it at least call fsck.vfat.

Reassigning to kernel.

Comment 6 Kim Lux 2005-11-15 16:35:51 UTC
 
Hold the press.  I just ran fsck -tvfat /dev/sda1 on it and it turns up 
errors.   I mounted another Fat32 drive and I could write to it without 
problems.  I think the problem is a corrupted FAT32 filesystem on the drive. 
 
Don't work on this any further until I investigate. 
 
I never even thought to check that the FAT32 filesystem was sound.  I've been 
using Linux so long I forgot what Windows was really like.  
 
Thanks guys.    

Comment 7 Karel Zak 2005-11-15 16:51:54 UTC
Well, closing as NOTABUG.