I am trying to prepare a hard drive for burst mining on linux and want to maximize the hard drive space available for the plot file. So for this I need to set the inodes to the minimum possible that uses the least amount of hard drive space. This hard drive will contain one directory and one file that is the max size of the whole hard drive. How do I do this?

I have already found out to remove the 5% system reserved space which frees up a lot, however 1.6% is still in use by the computer without any files on it. From looking it up it is due to the inode static table and I do not need support for thousands of files just one folder and one massive file the size of the drive.

  • Have you tried tune2fs ? Something like tune2fs -I 256 -O sparse_super /dev/sdx – RubberStamp Oct 13 '18 at 18:59

I think I have found the solution. Format the hard drive as ext4 with the inode count set to the minimum which is 128 and the max byte size per inode at the max which is 67108864 (frees up 1.6%):

 mkfs.ext4 -F -L '[Label]' '/dev/sd[X]' -I 128 -i 67108864

Once the was formatted I removed the system reserved space (frees up 5%):

sudo tune2fs -m 0 /dev/sd[X]

Followed by disabling the journal to improve write speed (required for plotting):

sudo tune2fs -O ^has_journal /dev/sd[X]

Replace [X] with the HDD Drive Letter.

This made the disk usage once mounted show 0% full and as far as I can see supports the full drive file size.

  • You can set -m 0 and -O ^has_journal at format time, no need to change them afterward. – LustreOne Oct 21 '18 at 22:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.