You are not logged in.

#1 2015-02-09 12:26:49

Denzo
Member
Registered: 2009-07-03
Posts: 18

[SOLVED] BTRFS - no more inodes?

Hi all,

All of a sudden I'm getting errors like:


error: could not lock database: No space left on device in pacman, and various other software like transmission, reporting that there is no space left on my device.

when running df -H there's nothing out of the ordinary:

[denzo@bitcrusher ~]$ df -H
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb2       121G   59G   62G  49% /
dev             2.0G     0  2.0G   0% /dev
run             2.0G   85M  2.0G   5% /run
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
tmpfs           2.0G  4.1k  2.0G   1% /tmp
/dev/sda1       4.0T  1.6T  2.3T  41% /data
tmpfs           399M     0  399M   0% /run/user/1000

But when I run df -i I get:

[denzo@bitcrusher ~]$ df -i
Filesystem        Inodes  IUsed     IFree IUse% Mounted on
/dev/sdb2              0      0         0     - /
dev               486121    394    485727    1% /dev
run               486816    500    486316    1% /run
tmpfs             486816      1    486815    1% /dev/shm
tmpfs             486816     11    486805    1% /sys/fs/cgroup
tmpfs             486816     10    486806    1% /tmp
/dev/sda1      244195328 134184 244061144    1% /data
tmpfs             486816      4    486812    1% /run/user/1000

Which indicates that my root fs is full for some reason. I haven't installed any packages lately, just upgraded some packages that's all.
my root filesystem is running on btrfs by the way. I have snapper installed to do automatic snapshots, could that be the issue?

With kind regards,

Denzo

Last edited by Denzo (2015-02-09 12:56:16)

Offline

#2 2015-02-09 12:34:38

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [SOLVED] BTRFS - no more inodes?

Df -i isn't so much reporting that all the inodes are used - but that there are no inodes on sdb2 in the firstplace.

This suggests a serious issue with the filesystem.  I've never used btrfs, but in every discussion it is emphasized that it is still experimental and frequently unstable.

You may want to revise your title to indicate this issue to attract the attention of those who know more about btrfs. (edit: thanks, that looks better)

EDIT: you may also want to see this wiki section.  DF is not expected to give accurate results for btrfs.

Last edited by Trilby (2015-02-09 12:38:51)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2015-02-09 12:45:09

Denzo
Member
Registered: 2009-07-03
Posts: 18

Re: [SOLVED] BTRFS - no more inodes?

Trilby wrote:

Df -i isn't so much reporting that all the inodes are used - but that there are no inodes on sdb2 in the firstplace.

This suggests a serious issue with the filesystem.  I've never used btrfs, but in every discussion it is emphasized that it is still experimental and frequently unstable.

You may want to revise your title to indicate this issue to attract the attention of those who know more about btrfs. (edit: thanks, that looks better)

EDIT: you may also want to see this wiki section.  DF is not expected to give accurate results for btrfs.

Thanks, I've changed the title! I'll look into the wiki!

A quick inspection also revealed this:

[root@bitcrusher denzo]# for i in /*; do echo $i; find $i |wc -l; done
/bin
1
/boot
350
/data
134175
/dev
396
/etc
2017
/home
40846
/lib
1
/lib64
1
/mnt
1
/opt
9869
/proc
34591
/root
1556
/run
503
/sbin
1
/srv
49
/sys
32107
/tmp
9
/usr
127903
/var
138967

Seems like /var and /usr are using up the most inodes.

Using the btrfs df tool also reveals that the disk is not full:

btrfs filesystem df /
Data, single: total=108.77GiB, used=51.61GiB
System, single: total=4.00MiB, used=16.00KiB
Metadata, single: total=3.01GiB, used=2.51GiB
GlobalReserve, single: total=512.00MiB, used=0.00B

Last edited by Denzo (2015-02-09 12:46:25)

Offline

#4 2015-02-09 12:48:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [SOLVED] BTRFS - no more inodes?

While there seems to be something very different going on here - most of the "typical" full root partition issues are due to either a backlog of old package files in /var/cache/pacman/pkg/, or journals getting filled with warnings/errors in /var/log/journal/

You may want to check these out while waiting for the btrfs-experts to chime in.

And in hindsight, it's quite possible that my suspicion of a bigger problem could be incorrect.  Df reporting zero total inodes is rather disturbing - but if btrfs is known to not give accurate results for df checks, then that might just be an expected quirk.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2015-02-09 12:55:55

Denzo
Member
Registered: 2009-07-03
Posts: 18

Re: [SOLVED] BTRFS - no more inodes?

I've fixed it for now - snapper was keeping up to 50 snapshots, possibly eating up all of the inodes. I used this guide: http://www.nrtm.org/index.php/2012/03/1 … nt-page-1/
to delete all snapshots and create a new root snapper config.

I've also cleared out the pacman cache, so I'm only using 23 gigs now. Thanks for helping me out!

Offline

#6 2015-02-09 16:12:54

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,845
Website

Re: [SOLVED] BTRFS - no more inodes?

Looks like you encountered this: http://www.nrtm.org/index.php/2012/03/1 … nt-page-1/

For the record, df reporting a btrfs' filesystem's inodes as 0 is nothing to worry about.

# btrfs filesystem usage /

Would tell you in more detail how the space is being used.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB