Recover storage space after deleting files o a share

Hello this is my first time here as a poster asking for some guidance. Any help is really apreciated.

My UCS server (4.4-2 errata418.) has been running for some 3 years now as an active directory for windows pc’s. with some Shares for our users.

A few days ago i noticed one share would’nt allow to write files any more so i did some cleanup (deleted about 8GB ) and noticed that i did recover some storage space but minutes later it was full again. And no one else was writing new files to the share.

I ran df -h and found /dev/mapper/vg_ucs-root is 100% full

I did some search on the net and found out that linux, sometimes won’t release the storage space immediately

So as per suggestions found i ran ```
lsof | egrep “deleted|COMMAND”


smbd      32203                           root  mem       REG              254,0    14248    1315241                                                                                                 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
root@ucs-bach:~# lsof | egrep "deleted|COMMAND" | less
root@ucs-bach:~# lsof | egrep "deleted|COMMAND" | less
root@ucs-bach:~# lsof | egrep "deleted|COMMAND" | less
apache2    2354                   root   12u      REG              254,0        0    3145483 /tmp/.ZendSem.To0bQR (deleted)
winbindd   2414                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
winbindd   2415                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
lpqd       2466                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
apache2    2517               www-data   12u      REG              254,0        0    3145483 /tmp/.ZendSem.To0bQR (deleted)
apache2    2519               www-data   12u      REG              254,0        0    3145483 /tmp/.ZendSem.To0bQR (deleted)
apache2    2521               www-data   12u      REG              254,0        0    3145483 /tmp/.ZendSem.To0bQR (deleted)
samba      2540                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
apache2    2549               www-data   12u      REG              254,0        0    3145483 /tmp/.ZendSem.To0bQR (deleted)
apache2    2560               www-data   12u      REG              254,0        0    3145483 /tmp/.ZendSem.To0bQR (deleted)
apache2    2563               www-data   12u      REG              254,0        0    3145483 /tmp/.ZendSem.To0bQR (deleted)
smbd       2871                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
smbd       3144                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
smbd       3396                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
smbd       4686                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
smbd       4711                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
smbd       5555                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
smbd       5556                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
smbd       5722                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
smbd       6432                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
smbd       6460                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
smbd       6598                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
apache2    8540               www-data   12u      REG              254,0        0    3145483 /tmp/.ZendSem.To0bQR (deleted)
smbd      10644                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
nscd      11381                   root    6u      REG               0,18  6175320     135831 /run/nscd/dbRxGNac (deleted)
nscd      11381                   root    7u      REG               0,18  6175320     135832 /run/nscd/db6Nyc9A (deleted)
nscd      11381 11382             root    6u      REG               0,18  6175320     135831 /run/nscd/dbRxGNac (deleted)
nscd      11381 11382             root    7u      REG               0,18  6175320     135832 /run/nscd/db6Nyc9A (deleted)
nscd      11381 11383             root    6u      REG               0,18  6175320     135831 /run/nscd/dbRxGNac (deleted)
nscd      11381 11383             root    7u      REG               0,18  6175320     135832 /run/nscd/db6Nyc9A (deleted)
nscd      11381 11384             root    6u      REG               0,18  6175320     135831 /run/nscd/dbRxGNac (deleted)
nscd      11381 11384             root    7u      REG               0,18  6175320     135832 /run/nscd/db6Nyc9A (deleted)
nscd      11381 11385             root    6u      REG               0,18  6175320     135831 /run/nscd/dbRxGNac (deleted)
nscd      11381 11385             root    7u      REG               0,18  6175320     135832 /run/nscd/db6Nyc9A (deleted)
nscd      11381 11386             root    6u      REG               0,18  6175320     135831 /run/nscd/dbRxGNac (deleted)
nscd      11381 11386             root    7u      REG               0,18  6175320     135832 /run/nscd/db6Nyc9A (deleted)
nscd      11381 11387             root    6u      REG               0,18  6175320     135831 /run/nscd/dbRxGNac (deleted)
nscd      11381 11387             root    7u      REG               0,18  6175320     135832 /run/nscd/db6Nyc9A (deleted)
nscd      11381 11388             root    6u      REG               0,18  6175320     135831 /run/nscd/dbRxGNac (deleted)
nscd      11381 11388             root    7u      REG               0,18  6175320     135832 /run/nscd/db6Nyc9A (deleted)
apache2   14433               www-data   12u      REG              254,0        0    3145483 /tmp/.ZendSem.To0bQR (deleted)
smbd      17119                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
smbd      18166                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
samba     18287                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
smbd      19136                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
smbd      20314                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
samba     20690                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
smbd      20726                Escuela  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
smbd      21255                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so
smbd      23203                   root  mem       REG              254,0    14248    1315241 /usr/lib/x86_64-linux-gnu/samba/ldb/show_deleted.so

If size column represents bytes, none of those files seems big enough to be filling that partition.

I did some recommend cleanup as per https://help.univention.com/t/how-to-free-space-and-clean-up-your-ucs/20471  but can´t recover space.

I'm pretty sure I missed something. Can someone point me in the right direction?

I forgot to mention there is some space left on the disk. Is it feasible to expand /dev/mapper/vg_ucs-root?

Thank you for any input.

Hi,

have you run sudo ncdu / as per the post you have linked? Are you sure this is a problem with SMB share and not some other area in the system?

My main server recently run out of space and I couldn’t find what was wrong, it turned out that logs were kept way too long and clogged the hard drive.

Change in UCR backup/clean/max_age from 356 to 180 made a huge difference.

Turns out backup/clean/max_age was blank and it had backup files since day one of operations.

Now backup/clean/max_age i set to 180 days and deleted every compressed file out of that range of date. I recoverd 16GB of space. and seems to stay that way.

As a reference for anybody else, backup path is /var/univention-backup/ and /var/univention-backup/samba/

Thank so much for your help. Have a great day!

Hey,

just as a general remark: There is also How-to: Free space and clean up your UCS with some hints where to look and what to do additionally to free up space.

Best regards
Jan-Luca