Steps to Increase Inodes in Linux
Verify Current Inode Usage: You should verify your system's current inode usage before trying to increase it. Use the command:
df -i
This will show the number of inodes available and used on all mounted file systems.
Unmount the Partition: To modify the inode configuration, you need to unmount the partition. You can unmount the partition using the following command:
umount /dev/sdX1
Replace /dev/sdX1 with the appropriate device identifier for your system.
Reformat the Partition to Increase Inodes: You cannot directly increase the number of inodes on an existing file system. Instead, you need to reformat the partition. Use the mkfs (make file system) command with the -i option, which allows you to specify the bytes per inode. A smaller value results in more inodes.
To reformat with more inodes, run:
mkfs.ext4 -i <bytes-per-inode> /dev/sdX1
For example, if you want to allocate 1024 bytes per inode, use:
mkfs.ext4 -i 1024 /dev/sdX1
Mount the Partition Again: After reformatting, you can mount the partition back to its original location:
mount /dev/sdX1 /mnt
Replace /mnt with the correct mount point for your system.
Verify the Changes: After mounting the partition, verify the inode settings with:
df -i