public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* NTFS disk usage on Linux 2.6
@ 2004-01-15  1:02 Haakon Riiser
  2004-01-15 14:51 ` Craig Taylor
  2004-01-15 19:05 ` David Sanders
  0 siblings, 2 replies; 8+ messages in thread
From: Haakon Riiser @ 2004-01-15  1:02 UTC (permalink / raw)
  To: linux-kernel

Has anyone else noticed that the reported disk space usage on
NTFS is completely unreliable on Linux 2.6?  Just issued the
command "du -sh" on my main Windows XP partition, and on 2.6.1,
the reported disk usage is bigger than the partition size.

Here's the output from "du -sh *" in Windows' root directory
under Linux 2.6.1:

  0       AUTOEXEC.BAT
  0       CONFIG.SYS
  43M     Documents and Settings
  0       IO.SYS
  0       MSDOS.SYS
  48K     NTDETECT.COM
  366M    Program Files
  0       RECYCLER
  20K     System Volume Information
  12G     WINDOWS
  0       boot.ini
  232K    ntldr
  768M    pagefile.sys

Same command on 2.4.24:

  0       AUTOEXEC.BAT
  0       CONFIG.SYS
  41M     Documents and Settings
  0       IO.SYS
  0       MSDOS.SYS
  48K     NTDETECT.COM
  366M    Program Files
  2.0K    RECYCLER
  21K     System Volume Information
  1.4G    WINDOWS
  1.0K    boot.ini
  230K    ntldr
  770M    pagefile.sys

(The contents of the filesystem was, of course, identical in both
cases -- I did not run Windows in between these tests.)

Compare the disk space used by the WINDOWS directory in the
two listings.  On 2.4.24, it correctly reports 1.4G, while
2.6.1 reports 12G, which is 2G more than the total space on
the filesystem.

I also compared this to the listings produced by "ls -lR"
(summing the numbers on the "total ..." lines).  The result
was the same as with du -sh.

-- 
 Haakon

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NTFS disk usage on Linux 2.6
  2004-01-15  1:02 NTFS disk usage on Linux 2.6 Haakon Riiser
@ 2004-01-15 14:51 ` Craig Taylor
  2004-01-15 16:03   ` Disconnect
  2004-01-15 19:05 ` David Sanders
  1 sibling, 1 reply; 8+ messages in thread
From: Craig Taylor @ 2004-01-15 14:51 UTC (permalink / raw)
  To: Haakon Riiser; +Cc: linux-kernel

Do a "properties" within Windows on the folder - windows will report the 
_actual_ size of the file in it's listings, not the amount of space it 
takes up. I presume that that's what is going on.

Haakon Riiser wrote:

>Has anyone else noticed that the reported disk space usage on
>NTFS is completely unreliable on Linux 2.6?  Just issued the
>command "du -sh" on my main Windows XP partition, and on 2.6.1,
>the reported disk usage is bigger than the partition size.
>
>Here's the output from "du -sh *" in Windows' root directory
>under Linux 2.6.1:
>
>  0       AUTOEXEC.BAT
>  0       CONFIG.SYS
>  43M     Documents and Settings
>  0       IO.SYS
>  0       MSDOS.SYS
>  48K     NTDETECT.COM
>  366M    Program Files
>  0       RECYCLER
>  20K     System Volume Information
>  12G     WINDOWS
>  0       boot.ini
>  232K    ntldr
>  768M    pagefile.sys
>
>Same command on 2.4.24:
>
>  0       AUTOEXEC.BAT
>  0       CONFIG.SYS
>  41M     Documents and Settings
>  0       IO.SYS
>  0       MSDOS.SYS
>  48K     NTDETECT.COM
>  366M    Program Files
>  2.0K    RECYCLER
>  21K     System Volume Information
>  1.4G    WINDOWS
>  1.0K    boot.ini
>  230K    ntldr
>  770M    pagefile.sys
>
>(The contents of the filesystem was, of course, identical in both
>cases -- I did not run Windows in between these tests.)
>
>Compare the disk space used by the WINDOWS directory in the
>two listings.  On 2.4.24, it correctly reports 1.4G, while
>2.6.1 reports 12G, which is 2G more than the total space on
>the filesystem.
>
>I also compared this to the listings produced by "ls -lR"
>(summing the numbers on the "total ..." lines).  The result
>was the same as with du -sh.
>
>  
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NTFS disk usage on Linux 2.6
  2004-01-15 14:51 ` Craig Taylor
@ 2004-01-15 16:03   ` Disconnect
  0 siblings, 0 replies; 8+ messages in thread
From: Disconnect @ 2004-01-15 16:03 UTC (permalink / raw)
  To: lkml

On Thu, 2004-01-15 at 09:51, Craig Taylor wrote:
> Do a "properties" within Windows on the folder - windows will report the 
> _actual_ size of the file in it's listings, not the amount of space it 
> takes up. I presume that that's what is going on.

That's hardly going to account for a folder that is 2G LARGER than the
partition it lives on......

> >  12G     WINDOWS
> >
> >Same command on 2.4.24:
> >  1.4G    WINDOWS
> >
> >Compare the disk space used by the WINDOWS directory in the
> >two listings.  On 2.4.24, it correctly reports 1.4G, while
> >2.6.1 reports 12G, which is 2G more than the total space on
> >the filesystem.

-- 
Disconnect <lkml@sigkill.net>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NTFS disk usage on Linux 2.6
  2004-01-15  1:02 NTFS disk usage on Linux 2.6 Haakon Riiser
  2004-01-15 14:51 ` Craig Taylor
@ 2004-01-15 19:05 ` David Sanders
  2004-01-15 22:34   ` Wes Janzen
  2004-01-18  0:55   ` Haakon Riiser
  1 sibling, 2 replies; 8+ messages in thread
From: David Sanders @ 2004-01-15 19:05 UTC (permalink / raw)
  To: Haakon Riiser; +Cc: linux-kernel

On Wednesday 14 January 2004 08:02 pm, Haakon Riiser wrote:
> Has anyone else noticed that the reported disk space usage on
> NTFS is completely unreliable on Linux 2.6?  Just issued the

I'm having the same symptom.  The following is on a 4G partition.  The 
WINNT directory is reported as 66G in size.  Kernel 2.6.1.

david@debian:/mnt/hda5$ du * -sh
124M    file
56M     GNUwin32
6.3M    Inetpub
1.3M    lynx
0       Multimedia Files
267M    pagefile.sys
134M    perl
922M    Program Files
0       RECYCLER
42M     TEMP
2.7M    util
13M     vim
2.5k    _viminfo
66G     WINNT


-- 
David Sanders
linux@sandersweb.net

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NTFS disk usage on Linux 2.6
  2004-01-15 19:05 ` David Sanders
@ 2004-01-15 22:34   ` Wes Janzen
  2004-01-16  0:43     ` Adam Sampson
  2004-01-18  0:55   ` Haakon Riiser
  1 sibling, 1 reply; 8+ messages in thread
From: Wes Janzen @ 2004-01-15 22:34 UTC (permalink / raw)
  To: David Sanders; +Cc: Haakon Riiser, linux-kernel

I'm having the same issue on 2.6.0, this is with an 8.4G partition.

|sprchkn@rybBIT:~> df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hde1              49G   24G   25G  49% /
/dev/hde2             8.4G  3.2G  5.2G  38% /windows/h

sprchkn@rybBIT:/windows/h> du -sh *
773k    8cf3326dc751d489417f4d3be3
0       AUTOEXEC.BAT
0       CONFIG.SYS
71M     Documents and Settings
0       IO.SYS
0       MSDOS.SYS
48k     NTDETECT.COM
105M    Photoshop 6.0
90M     Program Files
0       RECYCLER
129G    System Volume Information
18G     WINDOWS
1.7M    WUTemp
0       boot.ini
476k    cmr2.0
123M    drivers
232k    ntldr
576M    pagefile.sys
250M    service
sprchkn@rybBIT:/windows/h> du -sh
148G    .|

Descending into the WINDOWS directory reports these folders incorrectly:
|3.3G    $NtUninstallKB826939$
3.3G    $NtUninstallKB826942$
3.4G    $NtUninstallQ327979$
3.1G    $NtUninstallQ814995$
3.7G    system32|

It shows WINDOWS/system32/dllcache to be 3.4GB.  There are 1371 files in 
this directory.

|sprchkn@rybBIT:/windows/h/windows/system32/dllcache> du -sh * | grep "M"
8.0k    IMS.CAT
152k    MAPIMIG.CAT
2.2M    MSHTML.DLL
20k     MW770.CAT
8.0k    OEMBIOS.CAT
340k    URLMON.DLL
1.1M    chsbrkr.dll
8.6M    hwxcht.dll
11M     hwxjpn.dll
8.6M    hwxkor.dll
1.1M    korwbrkr.lex
1.4M    luna.mst
2.2M    moviemk.exe
1.6M    msgr3en.dll
1.2M    msir3jp.lex
1.2M    msoeres.dll
2.9M    nls302en.lex
13M     oembios.bin
1.2M    quartz.dll
1.6M    sam.spd
3.2M    tourP.exe|

I didn't get anything with 'du -sh * | grep "G"', so it seems to be 
getting the correct size for each file but munges up the total somehow.

I though initially maybe it was related to the number of files in a 
directory, but that doesn't seem to be the case:

|sprchkn@rybBIT:/windows/h/windows/$NtUninstallKB826939$> du * -sh
80k     accwiz.exe
416k    crypt32.dll
40k     cryptsvc.dll
8.0k    hh.exe
376k    hhctrl.ocx
24k     hhsetup.dll
96k     itss.dll
48k     magnify.exe
116k    migwiz.exe
32k     narrator.exe
124k    newdev.dll
460k    ntdll.dll
124k    osk.exe
68k     pchshell.dll
36k     raspptp.sys
4.0k    reg00010
4.0k    reg00011
4.0k    reg00012
4.0k    reg00013
4.0k    reg00018
4.0k    reg00019
4.0k    reg00020
4.0k    reg00021
4.0k    reg00022
4.0k    reg00023
4.0k    reg00026
4.0k    reg00027
4.0k    reg00028
4.0k    reg00029
4.0k    reg00034
4.0k    reg00035
4.0k    reg00042
4.0k    reg00043
4.0k    reg00044
4.0k    reg00045
4.0k    reg00046
4.0k    reg00047
4.0k    reg00069
4.8M    shell32.dll
104k    spuninst
148k    srrstr.dll
216k    zipfldr.dll
sprchkn@rybBIT:/windows/h/windows/$NtUninstallKB826939$> du -sh
3.3G    .|

-Wes-

David Sanders wrote:

>On Wednesday 14 January 2004 08:02 pm, Haakon Riiser wrote:
>  
>
>>Has anyone else noticed that the reported disk space usage on
>>NTFS is completely unreliable on Linux 2.6?  Just issued the
>>    
>>
>
>I'm having the same symptom.  The following is on a 4G partition.  The 
>WINNT directory is reported as 66G in size.  Kernel 2.6.1.
>
>david@debian:/mnt/hda5$ du * -sh
>124M    file
>56M     GNUwin32
>6.3M    Inetpub
>1.3M    lynx
>0       Multimedia Files
>267M    pagefile.sys
>134M    perl
>922M    Program Files
>0       RECYCLER
>42M     TEMP
>2.7M    util
>13M     vim
>2.5k    _viminfo
>66G     WINNT
>
>
>  
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NTFS disk usage on Linux 2.6
  2004-01-15 22:34   ` Wes Janzen
@ 2004-01-16  0:43     ` Adam Sampson
  0 siblings, 0 replies; 8+ messages in thread
From: Adam Sampson @ 2004-01-16  0:43 UTC (permalink / raw)
  To: Wes Janzen; +Cc: David Sanders, Haakon Riiser, linux-kernel

Wes Janzen <superchkn@sbcglobal.net> writes:

> I'm having the same issue on 2.6.0, this is with an 8.4G partition.

A similar problem shows up on 2.6.1 with smbfs, owing to silly block
counts:

$ ls -l 5glogo.avi 
-rw-rw-r--    1 1000     500        148640 2002-09-01 13:38 5glogo.avi
$ du -h 5glogo.avi 
512M    5glogo.avi
$ stat 5glogo.avi 
  File: `5glogo.avi'
  Size: 148640          Blocks: 1048576    IO Block: 4096   regular file
...

Reported to the smbfs maintainer a while back.

-- 
Adam Sampson <azz@us-lot.org>                        <http://offog.org/>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NTFS disk usage on Linux 2.6
  2004-01-15 19:05 ` David Sanders
  2004-01-15 22:34   ` Wes Janzen
@ 2004-01-18  0:55   ` Haakon Riiser
  2004-01-19 14:24     ` Anton Altaparmakov
  1 sibling, 1 reply; 8+ messages in thread
From: Haakon Riiser @ 2004-01-18  0:55 UTC (permalink / raw)
  To: linux-kernel

Thanks go to everyone who confirmed this bug.  Since we now know the
bug is real, I have created an entry for it in Bugzilla:
http://bugzilla.kernel.org/show_bug.cgi?id=1899

-- 
 Haakon

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NTFS disk usage on Linux 2.6
  2004-01-18  0:55   ` Haakon Riiser
@ 2004-01-19 14:24     ` Anton Altaparmakov
  0 siblings, 0 replies; 8+ messages in thread
From: Anton Altaparmakov @ 2004-01-19 14:24 UTC (permalink / raw)
  To: Haakon Riiser; +Cc: LKML

On Sun, 2004-01-18 at 00:55, Haakon Riiser wrote:
> Thanks go to everyone who confirmed this bug.  Since we now know the
> bug is real, I have created an entry for it in Bugzilla:
> http://bugzilla.kernel.org/show_bug.cgi?id=1899

I have closed this bug as I have fixed it in the NTFS release 2.1.6 that
I just posted to LKML.

Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ &
http://www-stu.christs.cam.ac.uk/~aia21/



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-01-19 14:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-15  1:02 NTFS disk usage on Linux 2.6 Haakon Riiser
2004-01-15 14:51 ` Craig Taylor
2004-01-15 16:03   ` Disconnect
2004-01-15 19:05 ` David Sanders
2004-01-15 22:34   ` Wes Janzen
2004-01-16  0:43     ` Adam Sampson
2004-01-18  0:55   ` Haakon Riiser
2004-01-19 14:24     ` Anton Altaparmakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox