LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 05-21-2005, 03:03 PM   #1
Cyber Paladin
LQ Newbie
 
Registered: Mar 2005
Distribution: Debian Sarge, Gentoo 2004.3
Posts: 1

Rep: Reputation: 0
Slow access to VFAT partition and errors in dmesg


Hello all.

1. Background:
I've abandoned Windows about 6 months ago when it reboots my machine right when it loads mup.sys, after I experienced the same problem and re-installed the OS for like a dozen times.
At that time I bought new disks (SATA based) and build my Debian system. The original Windows disks are disabled in BIOS.

Now as I feel comfortable using Debian, I enabled the Windows disk (IDE based) in BIOS and tried to mount it.
I planned to move all important files from the Windows disk to my SATA Linux disks, then I'd re-partition the Windows disk and make some use of the disk.

** A lot of filenames are Chinese, named and created in Windows.

Since the last time I used Windows was like 6 months ago. I lost track of whether I used NTFS or FAT32 as partition type.

2. What I did:
Using fdisk on hdb (hda was a CD-ROM), I found hdb1 and hdb5 to be logical paritions.
hdb1 was my former C:, and hdb5 was my D:
I found the partition type of both being fat32 by using "mount /dev/hdb1 /mnt" and checking "mount" output

I was able to access hdb1 without any problem.
However, all my important data are in hdb5, so I used the mount hdb5 using "mount -t vfat -o iocharset=utf8 -o noatime /dev/hdb5 /mnt"

3. Problem:
"ls" showed some output fairly quick.
But as I used "ls -al", the command was very sluggish. I noticed that the CPU was heavily utilized by this command and my HDD LED on my front panel are flashing like X'Mas trees.
Then, a large number of error blocks like this are logged in dmesg:
Code:
hdb: task_in_intr: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdb: task_in_intr: error=0x04 { DriveStatusError }
ide: failed opcode was: unknown
The "ls -al" command does return with correct file/dir list, but it took like 2-3 minutes to list those around 10 files/dirs in /mnt.
Then sub-dirs showed exactly the same symptom. Meaning it tooks around 3 minutes just to do an "ls -al" for every dir.

4. To make things worse:
Naturally I unmounted /mnt then ran dosfsck on /dev/hdb5. I was too rash and used this "dosfsck -rvw /dev/hdb5".
The first time I ran it, the output conatins lines like this:
Code:
/Fonts
  Contains a free cluster (1245242). Assuming EOF.
and ends with this:
Code:
Read 32 bytes at 58000979968:Input/output error
So I did it again and ran "dosfsck -rvw /dev/hdb5".
This time the "Contains a free cluster" lines are changed to these:
Code:
/Fonts
 Start does point to root directory. Deleting dir.
Then I knew I was did the wrong thing.
It still ends with "Read 32 bytes at 58000979968:Input/output error".

I, terrorized, mounted hdb5 using "mount -t vfat -o ro -o iocharset=utf8 -o noatime /dev/hdb5 /mnt"
Executed "ls -al", then after 3 minutes, the dirs reported in fsck are really gone....

I was very very very fortunate that none of my important files are deleted in the above process. But I still need to browse the dir tree to get my files, waiting 3 minutes in every sub-dir is almost infeasible as there's thousands of them.

I noticed that when I have waited 3 minutes and got a successful "ls -al" output, then without umount/remounting hdb5, subsequent execution of "ls -al" on the same dir is fast like normal operations.

5. My question:
Fairly simple, why did this slow response and I/O error thing happened?
And, is there any way to work around this and get my files home on Linux partitions?

Thank you for all your kindness to crunch through my lenthy post.
Many thanks for any advice or assistance offered.

==
Edit:
Forgot to mention my system spec:
Kernel: 2.6.11-cko4 (with vfat and ntfs support compiled as modules)
Distro: Debian Sarge
Windows disk: ATA disk sitting on IDE0 slave (IDE0 master was a CDROM)

Last edited by Cyber Paladin; 05-21-2005 at 03:08 PM.
 
Old 05-22-2005, 01:57 PM   #2
Half_Elf
Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
this sound like a broken/diying hdd in first thought... however, this may only be hardcore bug about your chipset or something like that.
This part :
[code]hdb: task_in_intr: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdb: task_in_intr: error=0x04 { DriveStatusError }
ide: failed opcode was: unknown[code] seems like wa I saw (often) when one of my hdd was going to die... if you have smart enabled, I suggest you to install "ide-smart" to test the hdd. Still, I can't be sure, this error sound like a bug too, I never got this one. Maybe you should browse the kernel to disable/enable some options? I think I remember there is an option about ide taskfile you could turn off/turn on (no clue on what it will do still).

Now, if the drive contains important data, basic rules are the following :
1- Dont fsck! Usually fsck is the "last chance option". When you do it you have 3 chance out of 4 to loose data.
2 - Disable DMA/any "performance" option. DMA is very intesive for a hdd, if you want to get something from it, make sure to disable it. It will be waaaay slower but your drive have slight more chance of survival.
3 - Dont make the hdd spin unless you have to. In fact, unplugging it would be a good idea. If it is already dying, every spin may getting it closer to his death.

Now, the strange part about your story is that your first partition mount without problem. So the hdd "mecanics" are probably not dying. If this is really an hardware failure, it is probably something about bad sectors or broken head, but still it would be quite surprising.
You might want to look about software problems first, take a look in the kernel, it's a big matter of guess, but see if you could think of any options causing trouble. You might want to try a live distro (like knoppix) to see if it acts the same about your hard drive.

Sorry, I don't feel being very useful, there is no miracle about that kind of problem
 
  


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
automount vfat partition with rw access for any user Simon Bridge Red Hat 12 05-26-2005 09:37 AM
Non Super Users can not access VFAT Partition shane25119 Linux - General 7 09-11-2004 11:25 AM
vfat partition access denied demmylls Linux - General 1 01-19-2004 03:09 AM
file permissions on VFAT partition - access denied cevjr Linux - Security 3 09-04-2003 05:50 PM
Access a vfat mounted partition vector Slackware 2 02-25-2003 10:54 PM


All times are GMT -5. The time now is 05:26 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