LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Linux will not calculate my free space correctly on fat32 drive (https://www.linuxquestions.org/questions/linux-hardware-18/linux-will-not-calculate-my-free-space-correctly-on-fat32-drive-193812/)

The_Last_Nerd 06-15-2004 12:17 PM

Linux will not calculate my free space correctly on fat32 drive
 
alright i'm in kinda a jam. i'm not exactly a linux noob.. but i'm not super experienced so bare with me lol... alright so i dual boot on my file server. i run winxp and fedora core 1.. both work very well at this point, other than this one problem in linux. when in windows, winxp tells me i have 50gb of space free.. which is correct. as soon as i boot into linux i have no free space and therefore cannot create folders or like like. this is a problem because these are network drives that need to be written to often. this happens on both of my 120gb drives i have.. below is my fstab..

LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda5 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0

LABEL=/home /home ext3 defaults 1 1

/dev/hdc1 /mnt/120GB_Net-B vfat user,rw,exec,uid=500,umask=000 0 0

/dev/hdd1 /mnt/120GB_Net-C vfat user,rw,exec,uid=500,umask=000 0 0


i'm unsure of any argument that might check free space or anything of that sort... and i have not tried reformatting the drive in linux and seeing if it works.. that would be really hard at this point because of the amount of data i have on both drives.. i wouldnt have a place to move it while i reformat. any help would be appreciated.. if you need to see some of my other config files.. just ask i'll post them.. thanks-The_Nerd

BrianNJ 06-15-2004 03:02 PM

have you tried without the uid entry?

The_Last_Nerd 06-15-2004 03:15 PM

no i havent.. lemee give it a shot right now

The_Last_Nerd 06-15-2004 03:19 PM

i just tried without the UID entry and i get the same problem.. any other ideas?

Electro 06-16-2004 02:01 AM

On the 120 GB hard drives, in Windows select all files and directories. Then right click on the selection and click on propertise. Formatting a 120 GB hard drive as FAT32 creates about 32 KB to 64 KB per cluster. If you have a lot of small files, you may have a problem with slack space. You can use Partition Magic to try to optimize slack space.

Try making a file or a directory through Knoppix. If you can, then there is a bug with Fedora. You can try to set your BIOS to LBA for the 120 GB hard drives, but you may run in chance of corrupted data when you write to the hard drive or it may not function at all. Did you try making a directory or a file on the hard drive while you were as su or as root in Fedora.

At the console type "df -h". This will show you how much free space and how much data is taking up.

What does "hdparm -I /dev/hdc" and "hdparm -I /dev/hdd" show. You have to be as su or as root to run hdparm.

What does dmesg and "cat /var/log/syslog" show. You have to be as su or as root to access /var/log/syslog.

BTW, I have an 120 GB hard drive that is formated as FAT32 but it does not give me any trouble storing a little over 70 GB.

The_Last_Nerd 06-16-2004 05:46 AM

alright , i tried knoppix and ran into the same problem, also, i'm in the middle of a move from fedora to slackware on my server, because i've come to like slack from playing with it on my other computers. therefore, if anything from this point looks like its not from fedora, it isnt.. lol. but again i'm having the same problem in slack so it doesnt seem to be a bug with any particular distro. now.. after running those commands in slack i found some intresting things..

root@Crazy-Ivan:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 7.5G 4.1G 3.4G 55% /
/dev/hdc1 112G 112G 0 100% /mnt/hdc1
/dev/hdd1 112G -512Z 132G 101% /mnt/hdd1

woa thats odd, it shows i have no free space on one drive, and that i have used more space than actually avaiable on the other drive. so after that i typed in hdparm..

root@Crazy-Ivan:~# hdparm -I /dev/hdc

/dev/hdc:

ATA device, with non-removable media
Model Number: Maxtor 6Y120P0
Serial Number: Y330MM8E
Firmware Revision: YAR41BW0
Standards:
Supported: 7 6 5 4
Likely used: 7
Configuration:
Logical max current
cylinders 16383 4047
heads 16 16
sectors/track 63 255
--
CHS current addressable sectors: 16511760
LBA user addressable sectors: 234375000
device size with M = 1024*1024: 114440 MBytes
device size with M = 1000*1000: 120000 MBytes (120 GB)
Capabilities:
LBA, IORDY(can be disabled)
Queue depth: 1
Standby timer values: spec'd by Standard, no device specific minimum
R/W multiple sector transfer: Max = 16 Current = 16
Advanced power management level: unknown setting (0x0000)
Recommended acoustic management value: 192, current value: 254
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* NOP cmd
* READ BUFFER cmd
* WRITE BUFFER cmd
* Host Protected Area feature set
* Look-ahead
* Write cache
* Power Management feature set
Security Mode feature set
* SMART feature set
* FLUSH CACHE EXT command
* Mandatory FLUSH CACHE command
* Device Configuration Overlay feature set
* Automatic Acoustic Management feature set
SET MAX security extension
Advanced Power Management feature set
* DOWNLOAD MICROCODE cmd
* SMART self-test
* SMART error logging
Security:
Master password revision code = 65534
supported
not enabled
not locked
not frozen
not expired: security count
not supported: enhanced erase
HW reset results:
CBLID- above Vih
Device num = 0 determined by the jumper
Checksum: correct





root@Crazy-Ivan:~# hdparm -I /dev/hdd

/dev/hdd:

ATA device, with non-removable media
Model Number: WDC WD1200JB-00DUA3
Serial Number: WD-WMACM2161916
Firmware Revision: 75.13B75
Standards:
Supported: 6 5 4 3
Likely used: 6
Configuration:
Logical max current
cylinders 16383 65535
heads 16 1
sectors/track 63 255
--
CHS current addressable sectors: 16711425
LBA user addressable sectors: 234441648
LBA48 user addressable sectors: 234441648
device size with M = 1024*1024: 114473 MBytes
device size with M = 1000*1000: 120034 MBytes (120 GB)
Capabilities:
LBA, IORDY(can be disabled)
bytes avail on r/w long: 74 Queue depth: 1
Standby timer values: spec'd by Standard, with device specific minimum
R/W multiple sector transfer: Max = 16 Current = 16
Recommended acoustic management value: 128, current value: 254
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* READ BUFFER cmd
* WRITE BUFFER cmd
* Host Protected Area feature set
* Look-ahead
* Write cache
* Power Management feature set
Security Mode feature set
* SMART feature set
* FLUSH CACHE EXT command
* Mandatory FLUSH CACHE command
* Device Configuration Overlay feature set
* 48-bit Address feature set
Automatic Acoustic Management feature set
SET MAX security extension
* DOWNLOAD MICROCODE cmd
* SMART self-test
* SMART error logging
Security:
supported
not enabled
not locked
not frozen
not expired: security count
not supported: enhanced erase
HW reset results:
CBLID- above Vih
Device num = 1 determined by the jumper
Checksum: correct





everything looked alright there, i'm not linux gruru, but nothing there looked out of the ordinary. the other thing that caught my eye was when i checked out dmesg

root@Crazy-Ivan:~# dmesg
Linux version 2.4.22 (root@midas) (gcc version 3.2.3) #6 Tue Sep 2 17:43:01 PDT
2003
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000002fff0000 (usable)
BIOS-e820: 000000002fff0000 - 000000002fff8000 (ACPI data)
BIOS-e820: 000000002fff8000 - 0000000030000000 (ACPI NVS)
BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)
767MB LOWMEM available.
On node 0 totalpages: 196592
zone(0): 4096 pages.
zone(1): 192496 pages.
zone(2): 0 pages.
Kernel command line: BOOT_IMAGE=Linux ro root=301
Initializing CPU#0
Detected 1100.022 MHz processor.
Console: colour dummy device 80x25
Calibrating delay loop... 2195.45 BogoMIPS
Memory: 774680k/786368k available (1813k kernel code, 11300k reserved, 614k data
, 116k init, 0k highmem)
Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
Inode cache hash table entries: 65536 (order: 7, 524288 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 65536 (order: 6, 262144 bytes)
Page-cache hash table entries: 262144 (order: 8, 1048576 bytes)
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 64K (64 bytes/line)
CPU: After generic, caps: 0383fbff c1c7fbff 00000000 00000000
CPU: Common caps: 0383fbff c1c7fbff 00000000 00000000
CPU: AMD Duron(tm) stepping 00
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
mtrr: v1.40 (20010327) Richard Gooch (rgooch@atnf.csiro.au)
mtrr: detected mtrr type: Intel
PCI: PCI BIOS revision 2.10 entry at 0xfdaf1, last bus=1
PCI: Using configuration type 1
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
PCI: Using IRQ router default [1106/3177] at 00:11.0
PCI: Hardcoded IRQ 14 for device 00:11.1
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
VFS: Disk quotas vdquot_6.5.1
Journalled Block Device driver loaded
vesafb: framebuffer at 0xd0000000, mapped to 0xf080d000, size 1536k
vesafb: mode is 1024x768x8, linelength=1024, pages=3
vesafb: protected mode interface info at c000:def0
vesafb: scrolling: redraw
Console: switching to colour frame buffer device 128x48
fb0: VESA VGA frame buffer device
pty: 512 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with HUB-6 MANY_PORTS MULTIPORT SHARE_I
RQ SERIAL_PCI enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
ttyS01 at 0x02f8 (irq = 3) is a 16550A
Real Time Clock Driver v1.10e
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
RAMDISK driver initialized: 16 RAM disks of 7777K size 1024 blocksize
loop: loaded (max 8 devices)
Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
HPT302: IDE controller at PCI slot 00:08.0
PCI: Enabling device 00:08.0 (0005 -> 0007)
HPT302: chipset revision 1
HPT302: not 100% native mode: will probe irqs later
HPT37X: using 33MHz PCI clock
ide2: BM-DMA at 0xdc00-0xdc07, BIOS settings: hde:pio, hdf:pio
ide3: BM-DMA at 0xdc08-0xdc0f, BIOS settings: hdg:pio, hdh:pio
VP_IDE: IDE controller at PCI slot 00:11.1
PCI: Hardcoded IRQ 14 for device 00:11.1
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: VIA vt8235 (rev 00) IDE UDMA133 controller on pci00:11.1
ide0: BM-DMA at 0xfc00-0xfc07, BIOS settings: hda:DMA, hdb:DMA
ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdc:DMA, hdd:DMA
hda: ST310211A, ATA DISK drive
hdb: Pioneer DVD-ROM ATAPIModel DVD-106S 012, ATAPI CD/DVD-ROM drive
blk: queue c03a9d80, I/O limit 4095Mb (mask 0xffffffff)
hdc: Maxtor 6Y120P0, ATA DISK drive
hdd: WDC WD1200JB-00DUA3, ATA DISK drive
blk: queue c03aa1d4, I/O limit 4095Mb (mask 0xffffffff)
blk: queue c03aa310, I/O limit 4095Mb (mask 0xffffffff)
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: attached ide-disk driver.
hda: host protected area => 1
hda: 19541088 sectors (10005 MB) w/512KiB Cache, CHS=1216/255/63, UDMA(100)
hdc: attached ide-disk driver.
hdc: host protected area => 1
hdc: 234375000 sectors (120000 MB) w/7936KiB Cache, CHS=232514/16/63, UDMA(133)
hdd: attached ide-disk driver.
hdd: host protected area => 1
hdd: 234441648 sectors (120034 MB) w/8192KiB Cache, CHS=14593/255/63, UDMA(100)
hdb: attached ide-cdrom driver.
hdb: ATAPI 40X DVD-ROM drive, 256kB Cache, UDMA(66)
Uniform CD-ROM driver Revision: 3.12
Partition check:
hda: hda1
hdc: [PTBL] [14589/255/63] hdc1
hdd: hdd1
SCSI subsystem driver Revision: 1.00
kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2
kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2
kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2
md: linear personality registered as nr 1
md: raid0 personality registered as nr 2
md: raid1 personality registered as nr 3
md: raid5 personality registered as nr 4
raid5: measuring checksumming speed
8regs : 1577.200 MB/sec
32regs : 906.800 MB/sec
pIII_sse : 936.400 MB/sec
pII_mmx : 2575.600 MB/sec
p5_mmx : 3286.400 MB/sec
raid5: using function: pIII_sse (936.400 MB/sec)
md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
LVM version 1.0.5+(22/07/2002)
Initializing Cryptographic API
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 8192 buckets, 64Kbytes
TCP: Hash tables configured (established 262144 bind 65536)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
FAT: bogus logical sector size 0
UMSDOS: msdos_read_super failed, mount aborted.
FAT: bogus logical sector size 0
FAT: bogus logical sector size 0
reiserfs: found format "3.6" with standard journal
reiserfs: checking transaction log (device ide0(3,1)) ...
for (ide0(3,1))
ide0(3,1):Using r5 hash to sort names
VFS: Mounted root (reiserfs filesystem) readonly.
Freeing unused kernel memory: 116k freed
FAT: Did not find valid FSINFO signature.
Found signature1 0x49615a52 signature2 0x69417a72 sector=1.
Linux agpgart interface v0.99 (c) Jeff Hartmann
agpgart: Maximum main memory to use for agp memory: 690M

agpgart: Detected Via Apollo Pro KT266 chipset
agpgart: AGP aperture is 128M @ 0xe0000000
scsi0 : SCSI host adapter emulation for IDE ATAPI devices
No adapter found.
sk98lin: Network Device Driver v6.10
(C)Copyright 1999-2003 Marvell(R).
eth0: DGE-530T Gigabit Ethernet Adapter
PrefPort:A RlmtMode:Check Link State
via-rhine.c:v1.10-LK1.1.19 July-12-2003 Written by Donald Becker
http://www.scyld.com/network/via-rhine.html
eth1: VIA VT6102 Rhine-II at 0xc400, 00:10:dc:65:93:6d, IRQ 11.
eth1: MII PHY found at address 1, status 0x786d advertising 05e1 Link 45e1.
PCI: Setting latency timer of device 00:11.5 to 64
usb.c: registered new driver usbdevfs
eth0: network connection up using port A
speed: 1000
autonegotiation: yes
duplex mode: full
flowctrl: symmetric
role: master
scatter-gather: enabled
usb.c: registered new driver hub
ehci_hcd 00:10.3: VIA Technologies, Inc. USB 2.0
ehci_hcd 00:10.3: irq 10, pci mem f0b6df00
usb.c: new USB bus registered, assigned bus number 1
PCI: 00:10.3 PCI cache line size set incorrectly (32 bytes) by BIOS/FW.
PCI: 00:10.3 cache line size too large - expecting 16.
ehci_hcd 00:10.3: USB 2.0 enabled, EHCI 1.00, driver 2003-Jun-19/2.4
hub.c: USB hub found
hub.c: 6 ports detected
uhci.c: USB Universal Host Controller Interface driver v1.1
uhci.c: USB UHCI at I/O 0xd400, IRQ 11
usb.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found
hub.c: 2 ports detected
uhci.c: USB UHCI at I/O 0xd000, IRQ 5
usb.c: new USB bus registered, assigned bus number 3
hub.c: USB hub found
hub.c: 2 ports detected
uhci.c: USB UHCI at I/O 0xcc00, IRQ 11
usb.c: new USB bus registered, assigned bus number 4
hub.c: USB hub found
hub.c: 2 ports detected
root@Crazy-Ivan:~#

a few lines in there that begain with FAT seemed to not be jiving well.. i cut and pasted them below if you dont care to weed through that mess..

FAT: bogus logical sector size 0
UMSDOS: msdos_read_super failed, mount aborted.
FAT: bogus logical sector size 0
FAT: bogus logical sector size 0
FAT: Did not find valid FSINFO signature.

i'm unsure of what those mean, but that could be the culprit if linux cannot find the sector size and therefore cannot calculate the drive space.. so i guess i'll hafta move the data and reformat the drives in linux.. or not?

wpyh 06-20-2004 02:08 PM

OK, how about removing the entries from fstab and mounting the disks manually? For example, make the directory /mnt/hdc1 and:
mount /dev/hdc1 /mnt/hdc1 -t vfat
Does this solve the problem?

The_Last_Nerd 06-20-2004 08:02 PM

just tried it.. and it didnt work.. it still shows 100% space filled

wpyh 06-20-2004 10:05 PM

Well... I'm just a newbie, so... :P

Anyway, from the error messages, it seems that:
1. The information for the filesystem is broken, or
2. The fat module is broken
I think 1 is the one. But you can see the correct free space in Windows right? That means maybe Windows uses another way of determining the cluster sizes, that the fat modules doesn't. I think you should try using scandisk in Windows to repair any damages in the filesysten, and try mounting it in Linux again. See whether it works ;)

The_Last_Nerd 06-21-2004 06:35 AM

alright i'll give that a shot.. and then if that still wont work i guess i'll try to find some free space on some of my other drives so i can move my data and reformat the drive in linux instead of windows.. keep any other sugestions coming and i'll report back asap with my latest findings

whansard 06-21-2004 06:46 AM

FAT: Did not find valid FSINFO signature.
Found signature1 0x49615a52 signature2 0x69417a72 sector=1.


maybe a virus or a corrupt filesystem. hopefully scandisk will fix it.

Electro 06-21-2004 03:25 PM

Try disconnecting one of the drives. If it still gives you problems, try it with the other drive. Just use one hard drive at a time.

Maxtor hard drives seem to still have the problem when connected to the same IDE channel as other hard drives. Its best to leave Maxtor drives alone on its own IDE channel either on the Primary or the Secondary.

If all else fails, like everybody said go into DOS or Windows and run scandisk.

The_Last_Nerd 06-23-2004 03:42 PM

alright.. i think i know what it all means.. but leme tell you what i've done. i've run win98 scandisk, win2k scandisk (which i believe is chkdsk /F) and norton disk doctor, and everything has come up fine. after that, i've tried both drives alone on the cable, and i get the same readings i do when their both on. i would assume at this point then i need to reformat them in linux?


All times are GMT -5. The time now is 02:30 PM.