Disk Usage Increase after update

Hello,

I notice that after the Hestia update, all my site disk usage increases. this site was around 26% of disk usage; now it’s all the way up to 68%. Is there something I have to delete after the update? it on all my websites running the latest Hestia version on a DigitalOcean droplet.

YES!!! something really strange has happened. There is now a directory in /srv/fail. It is a duplicate of the /home/… directory. It is not a symbolic link but if you delete any of it. the websites break. This need to be looked at urgently because I can’t figure out what’s happening here and can’t afford the room it’s taking up.

What might be happening is that your /backup folder already contains stored backup files.

In my case, in the previous version, I had disabled this option because I use rsync to manually back up the folders, making the backups generated by HestiaCP unnecessary. However, when I updated the panel, the backup option was automatically reactivated. If I hadn’t noticed it in time, my disk would have filled up quickly. To avoid this issue, I disabled the option again, and since then, I haven’t had any problems.

I think I said what is happening. The system has created a complete duplicate of all the /home/ directories into /srv/jail/
Something to do with chroot I believe but I have no idea how to fix it.

On further searching there are files in /etc/systemd/system to jail each of the domains: srv-jail-domain name.mount
I don’t have the time right now but I think the solution is to just remove those files and reload the deamon. I’m not sure how chroming the whole domain actually solves anything. When a user goes in and edits the domain it’s edited and chroot helps nothing. Space on servers is expensive. I can believe this was intertional. I thought chroot was designed to stop using dangerous commands.
This must have been done for testing.

Hi @tuton

You see an increase in disk space due to the way your hosting provider computes it, but you are not actually using more disk space. The directories in /srv/jail/user/home/user/ are bind mounts to /home/user/, similar to a symbolic link, so they do not take up additional space.

No, you shouldn’t delete anything. If you want to disable the jail, execute these commands as root:

/usr/local/hestia/bin/v-delete-sys-sftp-jail
find /srv/jail/ -mindepth 1 -maxdepth 1 -type d | awk -F '/' '{print $NF}' | xargs -I {} /usr/local/hestia/bin/v-delete-user-sftp-jail {}

No, as I said above, it’s a bind mount so it is not using more disk space.

Chroot for SFTP isolates users into a specific directory, providing enhanced security by preventing access to the rest of the filesystem.

If you don’t want it, just disable it.

3 Likes

@sahsanu Thanks for your response. Should I leave it like that?

Chroot gives extra security allow users not to read files other then the home directory…

2 Likes

It is actually using space. I can’t do backups anymore because the size of my domains has doubled. It wasn’t like this before the last update. My free space was 50gb now it’s just 10gb

It isn’t, a bind mount doesn’t duplicate the size of a dir. Maybe the problem is another one.

You can check the top dirs and files using space in your /home/

curl -fsSLm15 https://7j.gg/checkfs | sudo bash -s -- -f 30 /home/

Also, show the output of these commands:

mount | grep srv
df -h
du -hs /home/* | sort -rh
du -hs /srv/jail/* | sort -rh
2 Likes

I see what you mean, but why it still taking 14gb used? I just dont get why before the update was way less including the backups and now after the update a huge space got taken.

du -hs /* 2>/dev/null | sort -rh

Ok that gives the impression that that space isn’t used but looks at this

root@s1:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.9G 0 1.9G 0% /dev
tmpfs 392M 776K 391M 1% /run
/dev/vda1 76G 69G 3.0G 96% /
tmpfs 2.0G 1.2M 2.0G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 392M 0 392M 0% /run/user/0

Then add these up and you’ll see that the system is including /srv in the total.

root@s1:~#du -hxd 1 /
24K /opt
15M /etc
7.2G /var
494M /root
4.2G /usr
16K /lost+found
8.0K /media
4.0K /mnt
32G /home
80K /tmp
32G /srv
88M /boot
25G /backup
100G /

OOPS, wait a minute. It doesn’t add up correctly after all. I have to look further. It’s very odd that this happened right after the update. I’m confused at why the disk space went down so much. I’ll need to look further I guess.

1 Like

The du command reads the directory data, it doesn’t know whether /srv/jail/ is a bind mount, it only sees a dir but the disk is not really using that space.

Yes, I realize that. It was when I initially added it up it seemed as though it was using space, but as I said, “OPPS, wait a minute, It doesn’t add up after all.”

1 Like

I guess I’m in the same position as “Tuton”. The last update almost doubled the space used on my machine also. Was Jail new on this latest update. What changed that could have done this?

what is /srv?

A virtual directory?

if you read back, it is a “bind mount”. This has a good explanation of how they work:

https://www.baeldung.com/linux/bind-mounts

But something else seems to be going on with a couple of us. Not sure what that is yet.

You’ll have to instigate your /home and /backup folders as those are taking up almost most of the space together.

Most likely you didn’t save the backups locally before and now it got accidentally enabled.

@tuton this applies to you too. It looks like it’s making nightly backups locally when it didn’t before.