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?
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?
One option is to recreate your filesystem specifying bytes-to-inode ratio with -i
option.
Backup all of your data to another disk.
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
.
Unmount that filesystem:
$ umount /mnt/mountpoint
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).
Mount that filesystem:
$ mount /dev/sdX /mnt/mountpoint
/etc/fstab
with previous owner, group owner, umask permission, etc.
– firdavs
Mar 05 '24 at 10:46