Deleted files on a SMB-share - Files gone, space still allocated - Fedora 10
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Deleted files on a SMB-share - Files gone, space still allocated - Fedora 10
I was re-organizing some of my shared files on a Vista box, and ran into a bunch of duplicate files on my Fedora file server. Those files were on a Samba-shared volume that was mapped as a network drive. Now, instead of deleting them the usual way, i.e. launching a WinSPC session, I did it via Windows Explorer. A big mistake.
The files are indeed gone, but I only gained ~500 MB of free space, for 62 GB of deleted files. The actual volume is ext3. Any ideas on fixing this allocation problem would be much appreciated.
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 730
Rep:
Hi,
are you really sure the files are gone? Possibly there're file pointers open to the files, what means they are not shown in the file system, but space will first be shown as free after the pointers are closed.
Try
Code:
lsof
and take a look if there's a software having the file open.
are you really sure the files are gone? Possibly there're file pointers open to the files, what means they are not shown in the file system, but space will first be shown as free after the pointers are closed.
Try
Code:
lsof
and take a look if there's a software having the file open.
Thanks, hadn't thought of that. I verified that the files were not in use, and rebooted the box to make sure. Unfortunately this didn't fix the problem.
this sound really strange to me. Did you verify how many diskspace the existing files on the disk allocate?
Try
Code:
du -sk MY_DIRECTORY_WHERE_I_DELETED_FILES
and
Code:
df -k
and compare the outputs.
I'm not aware of any kind of bug producing problems like this on a ext3 filesystem.
Strange indeed, but I think you've actually lead me to the root of the problem. Yesterday I detached all other drives from the box, and ran e2fsck. Nothing changed.
Now by comparing the actual allocated space, and the df -k -output it all came back to me.
I had to get the box running quickly after a disk failure one day, and installed Fedora on an old 320GB linkstation drive I had lying around. Clearly I didn't pay too much attention and the end result was a confused filesystem. As you can see, the system thinks that sda3 has 189 GB of free space left, while 168 GB are used on the first volume. 189+168=357, which is a bit of a paradox on a 320 GB disk.
The strange thing is that this mess had actually worked until yesterday. I never touched sda3, to make sure I don't fill the drive to capacity. All file operations still work perfectly, including deleting files locally. It's strange, because the deleted files were on the volume that's still 99% full, but I guess the missing free space can be blamed on the confused filesystem & Samba.
Last edited by Zwentendorf; 03-01-2009 at 05:08 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.