In an ordinary scenario , full disks space means actually full disk space with a matter of hidden/small large files somewhere. just like this form states RecoverLostDiskSpace
I know my disk uses around 4GB
out of sda
(50GB formatted) and 12GB on sdb
(100GB formatted) but i get No space left on device
Previously -
I have a GCP VM with 2 drives, 1 with 30GB boot + an additional 100GB mounted.
main drive only has ubuntu 22.04 + mysql 8.0 installed. mysql disk is pointed to the mounted disk at /mnt/disk/mysql_data
when i df -Th
it reports 100% (30GB availabile + 30GB used) used on /
, when i use du
and ncdu
it reports that only 15GB (combined with mounted disk's data) has been used at /
.
so i already found out that df
can confuse the mounted drive as internal.
if so with that included i should have 50% free.
i tried many solutions and ended up resizing my drive from GCP to 50GB by taking a snapshot of the 30GB disk and creating a new 50GB disk with the previous image.
Before resizing
/dev/root ext4 29G 29G 0 100% /
/dev/sdb xfs 100G 12G 88G 12% /mnt/disks/data_disk
After resizing
/dev/root ext4 49G 3G 0 16.3% /
/dev/sdb xfs 100G 12G 88G 12% /mnt/disks/data_disk
Now the reading is suddenlycorrect ?? so case closed.
Now 2 weeks later im facing the same issue with 100% usage. the data on the mounted disk is still 12GB. when i try to create a file i get No space left on device
i cannot find where the missing space went??
i tried
- looking large files
- cleaning small files
- cleaning logs
- cleaning backups
- cleaning cache
- suggested solution
here is my df -h
out put
df -ih
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/root 6.2M 122K 6.1M 2% /
tmpfs 931K 1 931K 1% /dev/shm
tmpfs 800K 633 800K 1% /run
tmpfs 931K 4 931K 1% /run/lock
/dev/sda15 0 0 0 - /boot/efi
/dev/sdb 50M 8.8K 50M 1% /mnt/disks/data_disk
tmpfs 187K 20 187K 1% /run/user/0