gchiu
May 30, 2017, 8:23am
1
Looks like I'll have to migrate this to a new instance soon. I tried to rebuild the app and it failed due to lack of disk space.
Graham@docker:/var/discourse$ df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 1886708 0 1886708 0% /dev
tmpfs 378828 19640 359188 6% /run
/dev/sda1 10098468 8460480 1621604 84% /
tmpfs 1894124 620 1893504 1% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 1894124 0 1894124 0% /sys/fs/cgroup
tmpfs 378828 0 378828 0% /run/user/1001
johnk
May 30, 2017, 11:38am
2
Here are a few tips to reclaim some of that space.
Remove dependencies that are no longer required sudo apt-get autoremove
Clean out the aptitude cache sudo apt-get clean
(but you may need to download stuff again if you need to reinstall anything)
Have a look at what is using the space in a directory du -sm *
the s
recursively includes subdirectories and m
is to display in MB. Best to use this a folder at a time like /home
as it is not a great idea to run this against some of the dynamic filesystems such as /proc
Cheers, John
johnk
May 30, 2017, 11:05pm
4
At least the third option will tell you where all the space is going. Good luck. J
johnk
May 31, 2017, 1:00am
6
Yes, but you probably don't need the sudo. -J
gchiu
May 31, 2017, 3:19am
7
Graham@docker:~$ sudo du -sm /var/*
2 /var/backups
6 /var/cache
1 /var/crash
111 /var/discourse
8454 /var/lib
1 /var/local
0 /var/lock
2 /var/log
1 /var/mail
1 /var/opt
0 /var/run
1 /var/snap
1 /var/spool
1 /var/tmp
Does that help ( I did need the sudo
) ?
gchiu
May 31, 2017, 4:05am
8
I resized in the web interface from 10 Gb to 20 Gb but I'm afraid to go further!
compkarori@docker:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.8G 0 1.8G 0% /dev
tmpfs 370M 20M 351M 6% /run
/dev/sda1 9.7G 8.0G 1.7G 83% /
tmpfs 1.9G 1.2M 1.9G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
tmpfs 370M 0 370M 0% /run/user/1001
tmpfs 370M 0 370M 0% /run/user/1004
compkarori@docker:~$ sudo lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 20G 0 disk
└─sda1 8:1 0 10G 0 part /
So I now do this?
sudo resize2fs /dev/sda1
johnk
May 31, 2017, 5:07am
9
I am a bit confused as to what you actually have set up.
You have a Google server with X amount of storage (X is unknown although going by this page https://cloud.google.com/compute/pricing#machinetype it might be 30GB ??).
You have installed docker and added a container running discourse which may be configured to be only 10GB in size?? Just a guess
You have resized a partition in a web interface of some kind which may be the whole server or just the docker container, I'm not sure which.
You want to resize the filesystem to fit the newly resized partition.Is this in docker or on the host OS?