Hi, I would liek to ask the list if any one can explain why there should be a discrepency in the directory sizes that are displayed when I use explorer on Windows. This has been reported to me by a user, I have never seen this before as I dont use windows if I can help it :-)... When I slect properties of a directory it has two enties Size and Size on disk As an example size says 33 bytes, size on disk says 512kb and if I du a du -ks on the directory it reports 4 k. Has anyone noticed this before ?, do I need to set up samba a different way? I should say that the machine that samba is on is a DEC/Compaq machine running 2.0.10 but is also seen on a 2.2.3a samba installed machine. Thanks -- Stephen M Kitchener Unix Systems Administrator EMEA APAC Supply Chain Division. AspenTech UK 1 Century Court, Tolpits Lane, Watford, Herts, WD18 9PT TEL +44 (0) 1923 652125 FAX +44 (0) 1923 652215 EMAIL steve.kitchener@aspentech.com WEB http://www.aspentech.com Aspenworld 2002 the premier global conference for process industry leaders October 27 - November 1, 2002 Register at http://www.aspenworld2002.com Contact For assistance, please contact Kristine Martin mailto:kristine.martin@aspentech.com
That actually looks pretty normal. Windows properties show two sizes because it shows both the real size of a file (Size) and the amount of space it's reserving on disk because of the cluster size (Size on Disk). Your user will see the same thing looking at a small file or directory in C:. I'm not sure how Windows handles the "size on disk" for a file server, it probably either asks for it or guesses based on the total size of the disk. In any case, it's normal to have different sizes showing. I'm assuming that the directory contents actually do total around 33 bytes. It's been a while since I used a DEC so I don't remember how its "du" handles the size of small directories. If you use "ls -l" you'll probably see that the directory shows 4096 as the size. On Mon, Oct 14, 2002 at 11:55:52AM +0100, Stephen Kitchener wrote:> I would liek to ask the list if any one can explain why there should be > a discrepency in the directory sizes that are displayed when I use > explorer on Windows. This has been reported to me by a user, I have > never seen this before as I dont use windows if I can help it :-)... > > When I slect properties of a directory it has two enties > Size and Size on disk > As an example size says 33 bytes, size on disk says 512kb and if I du a > du -ks on the directory it reports 4 k.-- Michael Heironimus
Hi Micheal> Subject: Re: [Samba] Directory size display discrepency > > That actually looks pretty normal. Windows properties show two sizes > because it shows both the real size of a file (Size) and the amount of > space it's reserving on disk because of the cluster size (Size on Disk). > Your user will see the same thing looking at a small file or directory > in C:. I'm not sure how Windows handles the "size on disk" for a file > server, it probably either asks for it or guesses based on the total > size of the disk. In any case, it's normal to have different sizes > showing.Thanks for clearing that up - I did think that is was just a 'windows thing' but had to find out.> > I'm assuming that the directory contents actually do total around 33 > bytes. It's been a while since I used a DEC so I don't remember how its > "du" handles the size of small directories. If you use "ls -l" you'll > probably see that the directory shows 4096 as the size. > > On Mon, Oct 14, 2002 at 11:55:52AM +0100, Stephen Kitchener wrote: > > I would liek to ask the list if any one can explain why there should be > > a discrepency in the directory sizes that are displayed when I use > > explorer on Windows. This has been reported to me by a user, I have > > never seen this before as I dont use windows if I can help it :-)... > > > > When I slect properties of a directory it has two enties > > Size and Size on disk > > As an example size says 33 bytes, size on disk says 512kb and if I du a > > du -ks on the directory it reports 4 k. > > -- > Michael Heironimus-- Stephen M Kitchener Unix Systems Administrator EMEA APAC Supply Chain Division. AspenTech UK 1 Century Court, Tolpits Lane, Watford, Herts, WD18 9PT TEL +44 (0) 1923 652125 FAX +44 (0) 1923 652215 EMAIL steve.kitchener@aspentech.com WEB http://www.aspentech.com Aspenworld 2002 the premier global conference for process industry leaders October 27 - November 1, 2002 Register at http://www.aspenworld2002.com Contact For assistance, please contact Kristine Martin mailto:kristine.martin@aspentech.com
> Message: 10> Subject: Re: [Samba] Directory size display discrepency > From: Stephen Kitchener <steve.kitchener@aspentech.com> > To: samba lists <samba@lists.samba.org> > Date: 15 Oct 2002 11:30:46 +0100 Hi Micheal> >> Subject: Re: [Samba] Directory size display discrepency> Thanks for clearing that up - I did think that is was just a 'windows > thing' but had to find out. >It may not be. What version of samba are you running? I think up to 2.2.3a, and maybe 2.2.4, samba wasn't calculating this correctly.> >> >> I'm assuming that the directory contents actually do total around 33 >> bytes. It's been a while since I used a DEC so I don't remember how its >> "du" handles the size of small directories. If you use "ls -l" you'll >> probably see that the directory shows 4096 as the size. >> >> On Mon, Oct 14, 2002 at 11:55:52AM +0100, Stephen Kitchener wrote: > >> > When I slect properties of a directory it has two enties >> > Size and Size on disk >> > As an example size says 33 bytes, size on disk says 512kb and if I du a >> > du -ks on the directory it reports 4 k. >stat the file, and multiply by the blocks by the block size, and you should be seeing the same size that windows reports in 'size on disk'. If you don't, there is a problem. This works fine for me with 2.2.5 (to the byte) on linux. Regards, Buchan -- |----------------Registered Linux User #182071-----------------| Buchan Milne Mechanical Engineer, Network Manager Cellphone * Work +27 82 472 2231 * +27 21 8828820x121 Stellenbosch Automotive Engineering http://www.cae.co.za GPG Key http://ranger.dnsalias.com/bgmilne.asc 1024D/60D204A7 2919 E232 5610 A038 87B1 72D6 AC92 BA50 60D2 04A7