google-cloud-platformgcp-ai-platform-notebook

Index related disk availablity issue in GCP VM


I am using Google Cloud Platform (GCP) VM for some Machine learning work. I have 500 GB disk. But as there are millions of files in terms of image datasets used to perform model training, the inodes have exhausted , and as a result of this I am not able to store more images on the disk though the used space is only around 50% of the capacity.

This GCP document asks to scale the disk which involves more cost. Is there any other way of solving this issue without scaling up the disk in GCP?


Solution

  • The fix for the issue is to increase inodes via formatting with parameter -i and lower value for inodes to bytes ratio. The default inode_ratio is 16384. A lesser value can be put for this ratio.

    Example:

    mkfs.ext4 -m 0 -E lazy_itable_init=0,lazy_journal_init=0,discard -i 8192 /dev/disk/by-id/google-data