0

we have RHEL machine , and from df -i , we can see that some partitions are with 100% ( about inodes ) , in spite by df -h we have space

Note - disks are VMDK disks

 df -h
/dev/sdc                     40G   17G   23G  43% /data/sdc
/dev/sdd                     40G   23G   17G  58% /data/sdd
/dev/sde                     40G   23G   17G  58% /data/sde
/dev/sdb                     40G   26G   14G  65% /data/sdb


 df -i 
/dev/sdc                    2621440  231948  2389492    9% /data/sdc
/dev/sdd                    2621440 2616820     4620  100% /data/sdd
/dev/sde                    2621440 2613218     8222  100% /data/sde
/dev/sdb                    2621440 2621440        0  100% /data/sdb

so I just collect some options in order to solve the inodes that reached 100% problem

  1. Extended the disks from 40G to 100G

then , rescan the disks on OS

 echo 1 >/sys/block/${disk_name}/device/rescan

then resize the disk as

resize2fs /dev/$disk_name
  1. the same step as option 1 but additionally create new filesystem as mkfs.ext4 -j -m 0 /dev/$disk -F , in order to increase the inodes by mkfs according to the new disk space

so according to step1 and step 2

is it enough to do only step 1 or also step 2 additionally to step 1?

4
  • If you create new filesystem this will destroy the existing one and delete the files. Are you OK with this? And as you use RHEL why do not use XFS which filesystem will not have problems with inodes? Commented Jul 24, 2022 at 16:50
  • we are using hadoop cluster and the preferred filesystem is ext4 , so we cant use XFS
    – King David
    Commented Jul 24, 2022 at 16:56
  • about the option 1,2 , can you approve if option 1 is enough ?
    – King David
    Commented Jul 24, 2022 at 16:57
  • I did not see anywhere to mention XFS should not be used with Hadoop. Can you please clarify? ABout point 1: will add answer :) Commented Jul 24, 2022 at 16:59

1 Answer 1

1

If you follow point 1 - extend the disks and the extend the filesystem you will be fine.

But rescan may no work as you expect if the disks are busy and you will need to reboot the machine.

About formatting the disks (with recognized new size) - yes, this is also possible. You should decide for self which one is more convenient: wait for filesystems extend or wait for replication of HDFS from other replicas.

7
  • but about option - 2 , when creation new file system then is it true that number of inodes will increased according to the new disk size ?
    – King David
    Commented Jul 24, 2022 at 17:04
  • @KingDavid, yes, but as I write above in comment this will erase all the files on the disk. Commented Jul 24, 2022 at 17:06
  • 1
    yes I know that will erase , but we have replica on HDFS so even I erased it then it will created from other replica machines
    – King David
    Commented Jul 24, 2022 at 17:12
  • 1
    @KingDavid, in such case this is also fine option. I personally will prefer recreation and replication :) Commented Jul 24, 2022 at 17:15
  • so we can summary that we need to do both option - 1 and 2 , do you agree with me ?
    – King David
    Commented Jul 24, 2022 at 17:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .