[Samba] /var full issue: FreeBSD 5.4, Samba 3

Michael Joyner mjoyner at vbservices.net
Fri May 27 15:21:19 GMT 2005


When you delete a file under freebsd, if the application still has the 
file open, it isn't really deleted from the file system until the file 
is closed by the application.

Tom Wolfe wrote:
> I encountered something a little strange today.
> 
> Previously I had enabled samba logging and forgot to disable it. Unsurprisingly my /var partition maxed out. To correct this, I disabled the logging and deleted the (approx 240 MB) samba log file. Strangely I still had a full /var partition. Running df gave me:
> 
> SRV04# df
> Filesystem  1K-blocks     Used     Avail Capacity  Mounted on
> /dev/ad4s1a    253678    55830    177554    24%    /
> devfs               1        1         0   100%    /dev
> /dev/ad4s1e    253678       16    233368     0%    /tmp
> /dev/ad4s1f 235212398 46345500 170049908    21%    /usr
> /dev/ad4s1d    253678   225076      8308    96%    /var
> 
> I ran du -hc on /var which gave me the following result:
> 
> SRV04# du -hc
> ...
> [blah blah blah]
> ...
>  32M    .
>  32M    total
> 
> --But since /var is allocated about 250 MB it shouldn't be full....?!
> 
> So I ran fsck, which gave the following output:
> 
> SRV04# fsck
> ** /dev/ad4s1a (NO WRITE)
> ** Last Mounted on /
> ** Root file system
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> ** Phase 5 - Check Cyl groups
> 1451 files, 27915 used, 98924 free (500 frags, 12303 blocks, 0.4% fragmentation)
> ** /dev/ad4s1e (NO WRITE)
> ** Last Mounted on /tmp
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> ** Phase 5 - Check Cyl groups
> 22 files, 8 used, 126831 free (31 frags, 15850 blocks, 0.0% fragmentation)
> ** /dev/ad4s1f (NO WRITE)
> ** Last Mounted on /usr
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> UNALLOCATED  I=27390995  OWNER=root MODE=100644
> SIZE=240 MTIME=May 25 09:27 2005
> FILE=/var/db/samba/browse.dat
> 
> UNEXPECTED SOFT UPDATE INCONSISTENCY
> 
> REMOVE? no
> 
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> LINK COUNT FILE I=27390977  OWNER=root MODE=0
> SIZE=0 MTIME=May 25 09:28 2005  COUNT 0 SHOULD BE -1
> ADJUST? no
> 
> ** Phase 5 - Check Cyl groups
> ALLOCATED FILE 27390977 MARKED FREE
> ALLOCATED FRAG 109441760 MARKED FREE
> BLK(S) MISSING IN BIT MAPS
> SALVAGE? no
> 
> FREE BLK COUNT(S) WRONG IN SUPERBLK
> SALVAGE? no
> 
> 472769 files, 23166822 used, 94433457 free (26249 frags, 11800901 blocks, 0.0% fragmentation)
> ** /dev/ad4s1d (NO WRITE)
> ** Last Mounted on /var
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> ** Phase 5 - Check Cyl groups
> FREE BLK COUNT(S) WRONG IN SUPERBLK
> SALVAGE? no
> 
> 125 files, 680 used, 126158 free (174 frags, 15748 blocks, 0.1% fragmentation)
> 
> Running df now gives me, as expected:
> 
> SRV04# df
> Filesystem  1K-blocks     Used     Avail Capacity  Mounted on
> /dev/ad4s1a    253678    55830    177554    24%    /
> devfs               1        1         0   100%    /dev
> /dev/ad4s1e    253678       16    233368     0%    /tmp
> /dev/ad4s1f 235212398 46288886 170106522    21%    /usr
> /dev/ad4s1d    253678     1398    231986     1%    /var
> 
> ... so my problem is solved. But the whole thing seems strange. Any ideas what was up?
> Running FreeBSD 5.4, Samba 3.
> 
> Regards,
> Tom Wolfe
> 



More information about the samba mailing list