0

Let's assume I was very unlucky and ran out of inodes in my ext4 filesystem but left with enough free space.

Inode usage is 100%, but it has 50% disk free space.

How can I resolve it?

1

1 Answer 1

1

One option is to recreate your filesystem specifying bytes-to-inode ratio with -i option.

  1. Backup all of your data to another disk.

  2. List your filesystems and find the one you want to modify:

    $ df -h

    assuming that filesystem is /dev/sdX and is mounted on /mnt/mountpoint.

  3. Unmount that filesystem:

    $ umount /mnt/mountpoint

  4. Create that filesystem using mkfs.ext4 command specifying -i byte-to-inode ratio:

    $ mkfs.ext4 -i 4096 /dev/sdX

    This command will create ext4 filesystem with 4 KB per inode ratio (which will create four times more inodes than the default value - 16 KB per inode).

  5. Mount that filesystem:

    $ mount /dev/sdX /mnt/mountpoint

4
  • I don't understand the last requirement. What permissions might need to be applied that are only triggered during a reboot? Commented Mar 5, 2024 at 10:01
  • When rebooted, it will mount the filesystem as indicated in /etc/fstab with previous owner, group owner, umask permission, etc. Commented Mar 5, 2024 at 10:46
  • 1
    You did that already in step 5 Commented Mar 5, 2024 at 15:16
  • Oh. Got it, thanks! Commented Mar 8, 2024 at 11:01

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.