You are not logged in.
Pages: 1
I just created a new partition for my virtual machine (KVM) which is /dev/sda1. After that I noticed my root partition (/dev/sdb8) usage percentage just went up straight to 99%. I don't think those 2 are related to each other but that's the only thing I can think of right now. So I tried df, ncdu and display from filesystem module of polybar (which displayed root as 99%). Here are the other 2's outputs (all executed as root)
> df -h
Filesystem Size Used Avail Use% Mounted on
dev 7.8G 0 7.8G 0% /dev
run 7.8G 1.1M 7.8G 1% /run
/dev/sdb8 59G 56G 613M 99% /
tmpfs 7.8G 73M 7.8G 1% /dev/shm
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
tmpfs 7.8G 12K 7.8G 1% /tmp
/dev/sdb9 92G 42G 46G 48% /media/ichirou2910/vm
/dev/sdb6 488M 57M 396M 13% /boot
/dev/sdb2 95M 2.8M 93M 3% /efi
/dev/sda1 393G 73M 373G 1% /media/ichirou2910/vm-data
/dev/sda6 246G 166G 67G 72% /home
tmpfs 1.6G 8.0K 1.6G 1% /run/user/1000> ncdu -x /
7.2 GiB [##########] /usr
4.4 GiB [###### ] /var
413.3 MiB [ ] /opt
8.8 MiB [ ] /etc
3.5 MiB [ ] /root
20.0 KiB [ ] /media
e 16.0 KiB [ ] /lost+found
12.0 KiB [ ] /srv
8.0 KiB [ ] /mnt
@ 0.0 B [ ] sbin
@ 0.0 B [ ] lib64
@ 0.0 B [ ] lib
@ 0.0 B [ ] bin
> 0.0 B [ ] /tmp
> 0.0 B [ ] /sys
> 0.0 B [ ] /run
> 0.0 B [ ] /proc
> 0.0 B [ ] /home
> 0.0 B [ ] /efi
> 0.0 B [ ] /dev
> 0.0 B [ ] /boot
Total disk usage: 12.0 GiB Apparent size: 12.0 GiB Items: 191254As you can see, df gave out different output from ncdu. I'm pretty sure ncdu's output is correct, rather than df's. I booted into arch installation media and tried running df, it gave out the same output, and fsck returned no error.
I don't know what is happening right now. Any help is appreciated.
Last edited by Ichirou (2020-02-12 15:24:37)
Offline
try without -x to look for files hidden beneath other mountpoints
mkdir /mnt/root
mount --bind / /mnt/root
ncdu /mnt/roototherwise it could be deleted files (lsof) but in that case it'd be gone after reboot
then there's a possibility of filesystem inconsistency or bug, I think btrfs had such an issue very recently
Offline
Thanks for your help. There are indeed hidden files
> ncdu /mnt/root
--- /mnt/root ------------------------------------------------------------------------------------------------
43.2 GiB [##########] /media
7.2 GiB [# ] /usr
4.4 GiB [# ] /var
413.3 MiB [ ] /opt
8.8 MiB [ ] /etc
3.5 MiB [ ] /root
e 16.0 KiB [ ] /lost+found
12.0 KiB [ ] /srv
12.0 KiB [ ] /mnt
e 4.0 KiB [ ] /tmp
e 4.0 KiB [ ] /sys
e 4.0 KiB [ ] /run
e 4.0 KiB [ ] /proc
e 4.0 KiB [ ] /home
e 4.0 KiB [ ] /efi
e 4.0 KiB [ ] /dev
e 4.0 KiB [ ] /boot
@ 0.0 B [ ] sbin
@ 0.0 B [ ] lib64
@ 0.0 B [ ] lib
@ 0.0 B [ ] bin
Total disk usage: 55.1 GiB Apparent size: 112.0 GiB Items: 191256The large size is from my newly created partition, which is mounted to /media/ichirou2910/vm-data
But then that's weird. I created 2 different partitions and mounted them on vm-data and vm by fstab, but how come only the one (created today) got counted in root partition size? Do you have any idea?
--- /mnt/root/media/ichirou2910 ------------------------------------------------------------------------------
/..
43.2 GiB [##########] /vm-data
e 4.0 KiB [ ] /vm
e 4.0 KiB [ ] /aq
Total disk usage: 43.2 GiB Apparent size: 100.0 GiB Items: 4> cat /etc/fstab
# Static information about the filesystems.
# See fstab(5) for details.
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sdb8
UUID=8bb10fcc-7bda-44f4-8e49-784141052eda / ext4 rw,relatime 0 1
# /dev/sdb6
UUID=3aeb96e8-16cd-4104-bd7d-cf3556ad8603 /boot ext4 rw,relatime 0 2
# /dev/sda6
UUID=06d6ca63-ebf5-4555-b358-755fc8e7845c /home ext4 rw,relatime 0 2
# /dev/sdb2
UUID=F4CE-0820 /efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/sdb7
UUID=64f3207c-1044-4389-a76a-90fc4dc39c06 none swap defaults 0 0
# /dev/sdb9
UUID=dcc72e71-a5c0-4106-bf2c-29c175d1f7c8 /media/ichirou2910/vm ext4 nofail,user,relatime 0 2
# /dev/sda1
UUID=3d8b76f1-9cb2-4928-8c51-a1fae0c3866e /media/ichirou2910/vm-data ext4 nofail,user,relatime 0 2Offline
I want to give out more information as things are getting confusing for me. I used ranger to explore /media from /root and from binded /root but they gave out different results
https://imgur.com/MjJp7Do
I don't know why, tbh
Offline
it's a common user error, to place files in a mount directory, when the filesystem wasn't mounted yet so those files really end up on /
whether those files are important or need to be kept or can be deleted, only you can figure out... check lsof, and file timestamps, perhaps...?
if unsure, move the files to another disk instead of deleting them
Offline
Pages: 1