Space Issue
-
I’m having a space issue with my Fog server. I think when i’m deleting images, they are only deleting from the gui and not the box itself? Is there a way to “purge” any remnants?
Output from putty:
root@tie-fogdeploy-01:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 5941224 0 5941224 0% /dev
tmpfs 1197468 1104 1196364 1% /run
/dev/mapper/ubuntu–vg-ubuntu–lv 513396624 326710568 164713068 67% /
tmpfs 5987336 0 5987336 0% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 5987336 0 5987336 0% /sys/fs/cgroup
/dev/loop1 64896 64896 0 100% /snap/core20/1879
/dev/loop0 64896 64896 0 100% /snap/core20/1852
/dev/loop3 94080 94080 0 100% /snap/lxd/24061
/dev/loop2 94080 94080 0 100% /snap/lxd/23991
/dev/loop4 54528 54528 0 100% /snap/snapd/18933
/dev/loop5 54528 54528 0 100% /snap/snapd/19122
/dev/sda2 1992552 213032 1658280 12% /boot
tmpfs 1197464 0 1197464 0% /run/user/0Dashboard shows
Image list:
Total size of the images is 105.29GB?
-
@RogerBrownTDL First of all, when you delete an image from the list of images (without opening the image definition first) it only removes the image from the database but leaves the raw files on the fog server’s hard drive. From the developers, this is by design. If you open the image definition and delete the image from the buttons inside the image definition it will also purge the raw files from the fog server.
So what to do now?
You will have to manually delete the image file directories using the fog server’s linux command prompt. They are all located in /images on the fog server.
So if you follow the following steps
- Open a linux command shell on your fog server
- Change to the ./images directory
cd /images
- Get a directory listing of directories in the /images directory.
ls -la
- Identify the old image directories based on the directory name and ones you know you deleted. I’m going to give you a command that will purge all files in a directory, be careful with the command line because with great power comes great responsibility. The -rf flag means delete any directories below the path given and the other once forces a delete without a warning prompt.
sudo rm -rf /images/<image_name>
There is another command you can run like
df -h
that will show you the disk partitions with used and free space. You should see the / or /images partition free up as you delete files. -
@george1421 Once again sir, you are a legend. Fixed
-