Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
FAT32 becomes read-only and unable to unmount
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
blaksaga
Guru
Guru


Joined: 19 May 2003
Posts: 461
Location: Omaha, NE, USA

PostPosted: Thu Apr 15, 2004 3:37 am    Post subject: FAT32 becomes read-only and unable to unmount Reply with quote

Lately my FAT32 partition (/mnt/share) keeps becoming "read-only."

Code:

localhost root # touch /mnt/share/test.txt
touch: cannot touch `/mnt/share/test.txt': Read-only file system


permissions are fine

Code:

localhost root # ls -l /mnt | grep share
drwxrwxrwx   10 root     root         8192 Dec 31  1969 share


On top of that I cannot unmount it

Code:

localhost root # umount /mnt/share
umount: /mnt/share: device is busy
umount: /mnt/share: device is busy
localhost root # umount -f /mnt/share
umount2: Device or resource busy
umount: /dev/hda6: not mounted
umount: /mnt/share: Illegal seek
umount2: Device or resource busy
umount: /mnt/share: device is busy


Could this be a corrupt filesystem or do you think a process is locking it up?

Here's my fstab
Code:

localhost root # cat /etc/fstab
# /etc/fstab: static file system information.
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.10 2002/11/18 19:39:22 azarah Exp $
#
# noatime turns of atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail and tail freely.
 
# <fs>                  <mountpoint>    <type>          <opts>                 <dump/pass>
 
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hda1               /boot           ext2            noauto,noatime         1 2
/dev/hda3               /               reiserfs        notail                 0 1
/dev/hda5               none            swap            sw                     0 0
/dev/hda6               /mnt/share      vfat            defaults,umask=000     0 0
/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro,user         0 0
/dev/cdroms/cdrom1      /mnt/dvdrom     iso9660         noauto,ro,user         0 0
/dev/fd0                /mnt/floppy     auto            noauto,user            0 0
proc                    /proc           proc            defaults               0 0
 
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink). Adding the following
# line to /etc/fstab should take care of this:
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will use almost no
#  memory if not populated with files)
 
tmpfs                   /dev/shm        tmpfs           defaults               0 0

_________________
[ blaksaga.com ]
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Thu Apr 15, 2004 9:29 am    Post subject: Reply with quote

Do not use defaults on a vfat partition!
These include exec, dev, and others - useless and possibly unwise.
Code:
noatime,noexec,nodev,users,uid=<username>,gid=<groupname>,umask=022

Is what I use.

Also, you don't check or print your mount output, so it's hard to say.
To find out whether something is locking the mount, run
Code:
lsof | grep "/mnt/share"

You may have to emerge lsof first.
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
blaksaga
Guru
Guru


Joined: 19 May 2003
Posts: 461
Location: Omaha, NE, USA

PostPosted: Thu Apr 15, 2004 4:26 pm    Post subject: Reply with quote

adaptr wrote:
Do not use defaults on a vfat partition!
These include exec, dev, and others - useless and possibly unwise.
Code:
noatime,noexec,nodev,users,uid=<username>,gid=<groupname>,umask=022

Is what I use.

Also, you don't check or print your mount output, so it's hard to say.
To find out whether something is locking the mount, run
Code:
lsof | grep "/mnt/share"

You may have to emerge lsof first.


Thanks for the reply,

lsof yielded no results.

I changed my fstab to what you suggested and then was able to umount and remount. Should I set uid=root or uid=blaksaga or does it matter?
_________________
[ blaksaga.com ]
Back to top
View user's profile Send private message
blaksaga
Guru
Guru


Joined: 19 May 2003
Posts: 461
Location: Omaha, NE, USA

PostPosted: Thu Apr 15, 2004 4:28 pm    Post subject: Reply with quote

Oops...then after I open nautilus and browse for a few minutes it becomes read-only again... !?

I have no clue wtf is going on. Once I remount it, it lets me delete files singly, but as soon as I try a rm * it gives me cannot remove: Read-only file system.
_________________
[ blaksaga.com ]
Back to top
View user's profile Send private message
blaksaga
Guru
Guru


Joined: 19 May 2003
Posts: 461
Location: Omaha, NE, USA

PostPosted: Thu Apr 15, 2004 6:15 pm    Post subject: Reply with quote

Kinda what I figured. I rebooted to windows and windows was acting similarly. So I did a checkdisk and damn...you talk about a corrupt filesystem. I still have to find out what kind of damage it has done but it's not pretty.
_________________
[ blaksaga.com ]
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Thu Apr 15, 2004 9:59 pm    Post subject: Reply with quote

So is your conclusion that the default fstab settings caused the pb or that the fat or hardware was faulty and resulted in irratic behaviour.

I have a FAT32 partition on automount and it has never screwed up (since I stopped booting to Win98)

I think I would trust Linux with a fat partition further that I would trust windows with a fat partition.:? But then I may be prejudiced by the ammount of my life I have wasted battling 'other' operating systems. :evil:
Back to top
View user's profile Send private message
blaksaga
Guru
Guru


Joined: 19 May 2003
Posts: 461
Location: Omaha, NE, USA

PostPosted: Thu Apr 15, 2004 10:04 pm    Post subject: Reply with quote

Gentree wrote:
So is your conclusion that the default fstab settings caused the pb or that the fat or hardware was faulty and resulted in irratic behaviour.

I have a FAT32 partition on automount and it has never screwed up (since I stopped booting to Win98)

I think I would trust Linux with a fat partition further that I would trust windows with a fat partition.:? But then I may be prejudiced by the ammount of my life I have wasted battling 'other' operating systems. :evil:


The problem was a corrupt filesystem. I had about 10 files that had "invalid first allocation units" or wtf windows called it. Because of this I could not delete these files in windows or linux. For some reason when linux hit an error deleting them it would make the entire filesystem readonly. In windows, it would delete the icons, but once I hit refresh they were back again. My fstab settings were not the problem. I have no idea what f'ed up my fat32 partition, but considering I haven't booted to windows in over 3 months, I am blaming linux.
_________________
[ blaksaga.com ]
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Thu Apr 15, 2004 11:08 pm    Post subject: Reply with quote

Quote:
For some reason when linux hit an error deleting them it would make the entire filesystem readonly.


I think the 'some reason' is to prevent the risk of further damage once a pb is detected.

I wont blindly defend Linux but remember there are other factors than the OS determining the data on that disk: system hardware and the invisible wavy stuff comming out of the wall.

Have you had a power brown-out or power-off type shutdown?

I once had a hard drive go flaky on me under windows. I was able to recouperate the otherwire hopeless situation using Linux tools. I was impressed.
Back to top
View user's profile Send private message
Souperman
Guru
Guru


Joined: 14 Jul 2003
Posts: 449
Location: Cape Town, South Africa

PostPosted: Sun Jun 27, 2004 9:36 am    Post subject: Reply with quote

My fat32 partition also goes read-only every now and then. Whenever I have an unclean shutdown I first boot back into win2k and check the disk for errors and there haven't been any. I think I'll just change the partition to reiser and leave a few GB for leaving some Windows-only stuff behind (i.e. games).
_________________
moo
Back to top
View user's profile Send private message
Bluepixel
n00b
n00b


Joined: 10 Sep 2003
Posts: 11

PostPosted: Tue Jun 29, 2004 8:45 pm    Post subject: Reply with quote

This smells like a serious kernel bug in the new kernel 2.6

Months ago my laptop worked fine, but after I upgraded to kernel 2.6 I also got the error message that my files system was set to read only. After rebooting, I could only write garbage to the disk. So I reformated the fat32 partition.
Then several days afterwards, the problem occured again. I somewhere read it could happen if you don't unmount it proberly, so I set the sync option in the mount option. It didn't help and I always turned my system off with the shutdown command and not the power button.

Now what I found out, if you start windows when you have written files to your disk, they are gone. They won't appear anywhere anymore on the disk, only some data will reside in the automaticaly created found.000 directory, but the data is not entirely there and useless.

This sucks and must be linux fault because it worked fine before.

I hope someone can report this to the kernel mailing list.
Back to top
View user's profile Send private message
Bluepixel
n00b
n00b


Joined: 10 Sep 2003
Posts: 11

PostPosted: Tue Jun 29, 2004 8:54 pm    Post subject: Reply with quote

Souperman wrote:
My fat32 partition also goes read-only every now and then. Whenever I have an unclean shutdown I first boot back into win2k and check the disk for errors and there haven't been any. I think I'll just change the partition to reiser and leave a few GB for leaving some Windows-only stuff behind (i.e. games).


If I run the normal windows scan disk, then I also don't find any errors. But if I chose the deep (? I don't know how it's called, the one which makes more checks and runs during boot time), windows finds plenty of false linked files.
Back to top
View user's profile Send private message
Souperman
Guru
Guru


Joined: 14 Jul 2003
Posts: 449
Location: Cape Town, South Africa

PostPosted: Wed Jun 30, 2004 8:59 am    Post subject: Reply with quote

Bluepixel wrote:
Souperman wrote:
My fat32 partition also goes read-only every now and then. Whenever I have an unclean shutdown I first boot back into win2k and check the disk for errors and there haven't been any. I think I'll just change the partition to reiser and leave a few GB for leaving some Windows-only stuff behind (i.e. games).


If I run the normal windows scan disk, then I also don't find any errors. But if I chose the deep (? I don't know how it's called, the one which makes more checks and runs during boot time), windows finds plenty of false linked files.

I hadn't noticed missing data. I did do a full scan from Windows on Sunday though and it created a found.000 firectory with a single garbage file in it. 'file' under Linux told me it was MPEG System Stream Data or something similar, but I can't think offhand what it is. So far it has stayed mounted. I guess in future when I'm fiddling with a new kernel, etc. I'll unmount the partition first. My Gentoo doesn't just crash unless I'm trying out a new kernel (usually). On those rare occassions that Linux does lock up on me, I guess I'll just have to run a full error check in Windows which is quite a PITA since it takes 1h+, but oh well.
_________________
moo
Back to top
View user's profile Send private message
gigazeus
n00b
n00b


Joined: 07 Jun 2004
Posts: 2

PostPosted: Wed Jun 30, 2004 1:30 pm    Post subject: Reply with quote

Before, I was using konqueror to browse my vfat partition, and got the same problem...
But since I only use bash commands (like ls, cp, rm, ...) on it, the vfat partition doesn't hang anymore.
Back to top
View user's profile Send private message
Biggles
Tux's lil' helper
Tux's lil' helper


Joined: 06 Nov 2003
Posts: 123
Location: New Zealand

PostPosted: Mon Jul 12, 2004 4:29 am    Post subject: Reply with quote

I have the same problem (becoming read only, can't unmount). lsof shows no processes using it. I did a scan in windows and it reported no errors. To be safe, I defragged it too. Didn't help.
_________________
Never eat anything bigger than your own head.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum