Data move not reflecting

Since this is my first post, allow me to introduce myself: My (nick)name is Tribio, and I'm an IT Engineer at a logistics firm, where my main task is to support end-users and participate in large IT projects. Another task is the system administration of numerous servers, and one of those is a FreeBSD machine (used as fileserver).

And here comes my problem/question:
When I open up a Windows Explorer (yes, on a Windows workstation) which has a mapping to a share on the fileserver, it shows me that approx. 2GB of space is left. So I started moving files from the server to another network-share (on another server!). But the thing is that these changes are not reflected in the Windows Explorer.
So I started to investigate (thanks to Google), and found out the df and du commands.

And here comes the output when I run a df:

Code:
Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
/dev/da0s1a   2026030   140390  1723558     8%    /
devfs               1        1        0   100%    /dev
/dev/da1s1d  97496006 47839760 41856566    53%    /data
/dev/da1s1e  97496006 87295930  2400396    97%    /data/algemeen
/dev/da1s1f  97496006 51533326 38163000    57%    /data2
/dev/da1s1g  97496006  1845374 87850952     2%    /data3
/dev/da0s1f  73117544 56653298 10614844    84%    /home
/dev/da0s1g  47450058  3887684 39766370     9%    /restdisk0
/dev/da1s1h  26590624   701924 23761452     3%    /techsupp
/dev/da0s1d  10154158  3495888  5845938    37%    /usr
/dev/da0s1e   4058062   358062  3375356    10%    /var
procfs              4        4        0   100%    /proc
fdescfs             1        1        0   100%    /dev/fd

As you can see, the /data/algemeen-share is cramped, and will cause severe issues in the future. I have already moved like 8GB of data away from that share, but it still shows me only 2GB free space left.

Is there something I'm doing wrong here? How can I make my FreeBSD server realise that it has now more than those 2GB free space left?

(I'm very sorry if this question had been asked before, I tried searching, but most people just reply with 'man df' and 'man du', and trust me: Been there, done that!)
 
Hi,

well your question is missing a bit of detail, such as how does windows explorer communicate with FreeBSD? I guess you are using Samba.
Have you checked the basic stuff, like are the files and folders you are moving actually removed from the server? Perhaps you don't have the permissions to delete them....

ta Andy.
 
Also note that files that were open (in use by a process/daemon) have active file handles associated with them. Removing those files will not necessarily result in more free space showing up until you remove the file handles associated with them (usually by stopping or restarting programs/services that were using them).
 
If you're using samba AND you removed the files via the Windows workstation then check for "vfs objects = recycle" in smb.conf. It's a recycle bin and you'll find the partly removed files in the ".recycle" directory at the root of the share.
 
Thank you very much for your replies (and thank you for editing the first post with the code-tags).

@AndyUKG: A little bit more information: We indeed use Samba to communicate with the BSD-server. And after moving the folders (through Windows Explorer), they are no longer shown, neither in Windows Explorer, neither in the console from the FreeBSD (logged in as root, to make sure I don't miss anything).

@DutchDaemon: The mentioning of the file handles: I have restarted the samba-service after the move of the data (since that's the one 'handling' the files I believe), but that didn't give any difference: still 2GB free space left.

@Dum_Dum: I have checked the smb.conf, but there is no line stating anything with "vfs objects" in there..

Your feedback is much appreciated..
Thanks in advance!
 
Well, you can start by checking the subfolder sizes on the server under /data/algemeen, ie:

Code:
du -sh /data/algemeen/*

and then check if that looks like what you'd expect.

You could also shutdown samba and while samba is down check if any processes have files open under /data/algemeen, ie:

Code:
/usr/local/etc/rc.d/samba-server stop
lsof /data/algemeen

The lsof command is not part of base so you may need to install it (via ports).

If you are a novice user, and it isn't a problem to have the server down then it may be easier and quicker to reboot the server. If any processes were preventing space from becoming available this will sort that problem...


To summarise, if the folder sizes in step one look ok then you simply haven't removed what you thought you had removed. If the second options don't release your space then you haven't remove what you thought you'd removed. Hopefully you will either find your free space or realise why you don't have it....

ta Andy.
 
It is not clear from where you are seeing 2GB left. If it is from the windows side then you have a problem on the samba daemon, if it is from the FreeBSD side than something went wrong with your data moving. Samba allows the specification of a dfree command for the reporting of directory space, could it be a broken command on your system? Could it be that your data moving has prevented the effectively removal of the source data from the partition?
 
Hmmz, once again I thank you for the assistance..

The output of the du -sh /data/algemeen/* shows me indeed something quite bizarre, namely that the IT-subfolder (where the data has been moved from) occupies 0B.
Code:
  0B    /data/algemeen/IT

On the other hand, if I dive into this folder and du -sh IT/* it states the correct value of:
Code:
1.7M    IT/Bestellingen
2.9M    IT/RMA
4.0M    IT/WSUS
 63M    IT/inventory
 15G    IT/outlook

This 15GB is the size I was expecting indeed, but for some reason it isn't reflected in the /data/algemeen. I'm completely confused now and feeling like an utter newbie.. :\
 
Any chance there is a symbolic link not followed by du?
However, if the df command reports only 2 GB left it sounds as you are moving data over the same disk/partition, as if there is a symbolic link somewhere. At the moment I have not other ideas.
 
Hey fluca1978,

I moved the data to a complete other device, so I'd find it strange that the symbolic link would be this persistent..
I'm also out of ideas.. Hopefully our CEO agrees to buy a new fileserver ASAP..
 
What sounds strange to me is that the du of the entire directory says 0, and if I remember it right, du does not follows symlinks by default. So this means that maybe IT is a link to another space. If the link points to the same disk, it does not matter where your data is mounted, you are accessing again the same old partition. This could happen if the source directory you moved was, for real, a link. However, it is quite simple to discover:

Code:
find /data/algemeen/ -type l

and see what it reports and if this helps you. Also it would be useful to understand what exactly you have done to move the data. Maybe in the history there is still the command(s) you used.
 
Hello fluca1978,

It appears indeed that the IT-share is a link to another location on the fileserver, since the following output was provided:
Code:
files# find /data/algemeen/ -type l
/data/algemeen/IT

The commands I used for moving the data were just a simple Cut and Paste (from Windows Explorer, remember), so no history about that can be found on the BSD-device..

So it is safe to assume that, by moving data away from the IT-share, it did not reflect in the /data/algemeen, since the IT-share was just a link to another location.

I do believe I can put this thread to Solved now, seeing what exactly causes this (ab)normality..

Thank you all for your assistance!
 
Back
Top