LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-16-2015, 06:09 PM   #1
duplex
Member
 
Registered: Sep 2012
Posts: 38

Rep: Reputation: Disabled
Question STRANGE: fsck: “Filesystem has n clusters but only space for n-m FAT entries (m>0)"


I started a long time copy action onto my external 1TB HD. I went away, and somehow the energy saving mechanism must have realized that the user was idle and suspended the machine. (BTW, what exactly is the definition of "user being idle"? I did not type anything, did not move the mouse, did some cooking, but my process was surely not idle.) Now the HD can be mounted only read-only.

fsck says:

Code:
$ sudo fsck.vfat -V /dev/sdb1
[sudo] password for heino: 
fsck.fat 3.0.26 (2014-03-07)
0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
1) Remove dirty bit
2) No action
? 1
Filesystem has 30516268 clusters but only space for 30516222 FAT entries.
and stops working.

Since VFAT is an MS file system, I started Windows 7 (sigh!) and plugged in the HD. Then you immediately are asked whether you want to check the filesystem. I accepted, with all options to repair it enabled. No errors were reported by Win 7.

Now, when I plug it into my Xubuntu 14.04 machine again and give the above command, I exactly get the same output.

dmesg says:

Code:
[ 6670.108205] usb 2-1: new high-speed USB device number 3 using ehci-pci
[ 6670.243917] usb 2-1: New USB device found, idVendor=2109, idProduct=0701
[ 6670.243930] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6670.243937] usb 2-1: Product: External USB 3.0
[ 6670.243943] usb 2-1: Manufacturer: Intenso
[ 6670.243950] usb 2-1: SerialNumber: 20130527015839
[ 6670.297799] usb-storage 2-1:1.0: USB Mass Storage device detected
[ 6670.298861] scsi6 : usb-storage 2-1:1.0
[ 6670.298966] usbcore: registered new interface driver usb-storage
[ 6672.694335] scsi 6:0:0:0: Direct-Access     Intenso  External USB 3.0 5438 PQ: 0 ANSI: 6
[ 6672.697388] sd 6:0:0:0: Attached scsi generic sg2 type 0
[ 6672.699411] sd 6:0:0:0: [sdb] 1953525164 512-byte logical blocks: (1.00 TB/931 GiB)
[ 6672.700280] sd 6:0:0:0: [sdb] Write Protect is off
[ 6672.700284] sd 6:0:0:0: [sdb] Mode Sense: 23 00 00 00
[ 6672.701149] sd 6:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 6672.712313]  sdb: sdb1
[ 6672.745809] sd 6:0:0:0: [sdb] Attached SCSI disk
[ 6674.320713] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 6674.960732] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 6674.960737] FAT-fs (sdb1): Filesystem has been set read-only
What does that mean? What can I do now?
 
Old 08-05-2015, 11:58 PM   #2
DarkWolf113440
LQ Newbie
 
Registered: Jul 2009
Location: Montana, USA
Distribution: OpenSUSE 13.2
Posts: 12

Rep: Reputation: 4
Hi there duplex. I've never seen that one either, but it sounds as though when your system decided to take a nap, some sort of write operation was pending for the file allocation table that didn't get done. There appears to be a mismatch between how large the FAT thinks the partition is and what the boot record is telling Linux. Either that or the format was somehow corrupt from the start. Why Windows's own repair fails to find any fault is a genuine mystery. If this was happening to me, I would reformat the disk, and try your copy again. As far as your system falling asleep, in this context user activity is generally defined as keyboard/mouse activity. If your trying to do this from within a terminal window in KDE or Gnome or another graphical environment, there should be a setting somewhere to disable sleep/suspend. it can be re-enabled after your done with the copy if you wish. I'm not big on Gnome or most of the others, but in KDE 4.x this can be done from Configure Desktop->Power Management. From a pure CLI environment I recommend either disabling power management from your system BIOS and/or adding "apm=off" or "noapm" to your kernel command line, this should prevent your system from going to sleep.
 
Old 08-09-2015, 03:45 PM   #3
duplex
Member
 
Registered: Sep 2012
Posts: 38

Original Poster
Rep: Reputation: Disabled
Thumbs up

Quote:
Originally Posted by DarkWolf113440 View Post
Hi there duplex. I've never seen that one either, but it sounds as though when your system decided to take a nap, some sort of write operation was pending for the file allocation table that didn't get done. There appears to be a mismatch between how large the FAT thinks the partition is and what the boot record is telling Linux. Either that or the format was somehow corrupt from the start. Why Windows's own repair fails to find any fault is a genuine mystery. If this was happening to me, I would reformat the disk, and try your copy again.
Yes, that is the way I have done it, after nobody in no forum could explain this strange message. I copied all files of the 1TB HD in question to another 1TB HD (for heaven's sake without any error message), reformatted the first one (without any error message), and copied everything back. Now it works just as before, perfectly.


Quote:
As far as your system falling asleep, in this context user activity is generally defined as keyboard/mouse activity. If your trying to do this from within a terminal window in KDE or Gnome or another graphical environment, there should be a setting somewhere to disable sleep/suspend. it can be re-enabled after your done with the copy if you wish. I'm not big on Gnome or most of the others, but in KDE 4.x this can be done from Configure Desktop->Power Management. From a pure CLI environment I recommend either disabling power management from your system BIOS and/or adding "apm=off" or "noapm" to your kernel command line, this should prevent your system from going to sleep.
Yes, I know these settings. But I always thought incorrectly that if I had a long running process, such as computing PI to 1,000,000,000 numbers, my account would not be considered as "idle". This is wrong, how I have just learned.

Bottom line: If you do something time consuming (several hours or even days, disable auto-suspend).

Thank you!
 
  


Reply

Tags
cluster, fat32, fsck, fsckerror, harddrive


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
[SOLVED] Fedora 19 showing Low Disk Space on "filesystem root". oceanmbs Fedora 18 10-23-2014 10:27 AM
[SOLVED] "Not enough space" message copying files from Windows 7 to Ext3 filesystem GTCG Linux - Server 5 05-29-2013 03:11 PM
LXer: Need to fsck a FAT filesystem in Debian? Plus two ways to pour on the juice for LXer Syndicated Linux News 0 01-15-2010 04:30 AM
Thousands of "unattached inode" entries freezing fsck. Nothsa Linux - General 4 05-11-2008 04:56 PM
USB stick, "losing space" - filesystem inconsistensies? iskrem Linux - Hardware 1 11-26-2004 06:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:12 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
Open Source Consulting | Domain Registration