File System Space Issue


#1

My locally hosted Discourse suddenly stopped working this morning. I tried to run ./launcher rebuild app and got the following error:

.

The partition was originally 20GB but I used gparted to expand it to 80GB:

So why is the error still showing the size at only 18GB and what can I do to fix it? I’ve already tried the cleaning docker images and containers option.


(Jay Pfaffman) #2

What does

df -h /

and

df -h /var/lib/docker

say?

I think that it’s possible to resize the partition without resizing the filesytem, thought I was pretty sure that gparted would do the Right Thing.

This is likely more of a Stack Exchange question than a Discourse question.


#3

df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/discourse–vg-root 18G 14G 3.0G 83% /

df -h /var/lib/docker
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/discourse–vg-root 18G 14G 3.0G 83% /


(Jay Pfaffman) #4

It looks like that partition is not where Docker lives. How about

mount 

You probably need to move /var/lib/docker to that Discourse partition.


#5
`mount`
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=974720k,nr_inodes=243680,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=198996k,mode=755)
/dev/mapper/discourse--vg-root on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=24,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda1 on /boot type ext2 (rw,relatime,block_validity,barrier,user_xattr,acl,stripe=4)
lxcfs on /var/lib/lxcfs type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
/dev/mapper/discourse--vg-root on /var/lib/docker/plugins type ext4 (rw,relatime,errors=remount-ro,data=ordered)
/dev/mapper/discourse--vg-root on /var/lib/docker/overlay2 type ext4 (rw,relatime,errors=remount-ro,data=ordered)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=198996k,mode=700,uid=1000,gid=1000)

(Jay Pfaffman) #6

Oops. df -h probably would have been better.


#7

:slightly_smiling_face:

~$ df -h
Filesystem                      Size  Used Avail Use% Mounted on
udev                            952M     0  952M   0% /dev
tmpfs                           195M  3.1M  192M   2% /run
/dev/mapper/discourse--vg-root   18G   14G  3.0G  83% /
tmpfs                           972M     0  972M   0% /dev/shm
tmpfs                           5.0M     0  5.0M   0% /run/lock
tmpfs                           972M     0  972M   0% /sys/fs/cgroup
/dev/sda1                       472M  468M     0 100% /boot
tmpfs                           195M     0  195M   0% /run/user/1000

(Jay Pfaffman) #8

Yeah. It’s an LVM partition, so you need to google for something like “linux lvm resize” to get it to use all the space. LVM is this magic thing that makes it “easier” to resize partitions, but you have to know to do that.


(Andrew Schleifer) #9

Gparted only increased the backing partition and maybe the volume group. You will also need to resize the logical volume and the filesystem.

pvresize /dev/sda5
lvresize -l+100%FREE -r /dev/mapper/discourse--vg-root

#10

Worked perfectly! Thank you so much! I’m finally back up and running again.