William Kenworthy wrote: > > On 25/8/22 06:45, Frank Steinmetzger wrote: >>> [..] >>> Also, if you're using ext2/3/4, there's the preset, i.e. if you're >>> rather sure about what kind of data is going to be on there, you >>> can tune it so that it reserves more or less place for metadata like >>> inodes, which can be another bit. >> When I format a partition (and I usually use ext4, with some f2fs >> mingled in >> on flash bashed devices), I always set the inode count myself, >> because the >> default was always much too high. Like 15 m on a 40 GiB partition or >> so. My >> arch root partition has 2 m inodes in total, 34 % of which are in use >> for a >> full-fledged KDE setup. That’s sufficient. >> >> On Gentoo, I might give it some more for the ever-growing portage >> directory. >> But even a few percent on a 10 TB drive amount to many gigabytes. >> > Keep in mind ext4 is created with a fixed number of inodes - you cant > change it once its created so you have to deal with reformatting the > filesystem and replacing the data. Just another reason to use > something more modern - running out of inodes, especially on a large > disk is not a minor matter as you have to find somewhere to copy/store > the data so you can reformat the disk with more inodes and then put it > back. I seem to remember the last time it happened to me (its not an > uncommon event) I had to deal with mass corruption too. > > On the other hand, at one inode per file and Dale primarily storing > large media files it may be safe to reduce them. > > BillK
I've already got data on the drive now with the default settings so it is to late for the moment however, I expect to need to add drives later. Keep in mind, I use LVM which means I grow file systems quite often by adding drives. I don't know if that grows inodes or not. I suspect it does somehow. This is my current inodes on drives inside my puter. I removed the cruft from the list. root@fireball / # df -i Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sda6 1525920 18519 1507401 2% / /dev/mapper/OS-usr 2564096 752882 1811214 30% /usr /dev/sda1 98392 1219 97173 2% /boot /dev/mapper/OS-var 3407872 322463 3085409 10% /var /dev/mapper/home-home--lv 183144448 727910 182416538 1% /home /dev/mapper/backup-backup 45793280 1359825 44433455 3% /backup /dev/mapper/crypt 488378368 43027 488335341 1% /home/dale/Desktop/Crypt root@fireball / # The portage tree is on /var on my system. The ones I am most curious about is the /home and the crypt one. As you can see, /home and crypt is using only a tiny fraction of inodes. Here is the interesting bit: root@fireball / # df -h Filesystem Size Used Avail Use% Mounted on /dev/sda6 23G 2.2G 20G 10% / /dev/mapper/OS-usr 39G 22G 15G 61% /usr /dev/sda1 373M 187M 167M 53% /boot /dev/mapper/OS-var 52G 23G 26G 47% /var /dev/mapper/home-home--lv 5.5T 2.6T 2.9T 48% /home /dev/mapper/backup-backup 688G 369G 319G 54% /backup /dev/mapper/crypt 15T 12T 3.1T 79% /home/dale/Desktop/Crypt root@fireball / # As you can see, /home is about half full, crypt however is pushing 80% pretty hard. On /home, I have my documents directory and it has lots of smaller files compared to crypt. While /home does have some videos, it also contains my camera picture directory and the directories for my trail cameras. Also, it has small documents such as recipes and such which can be anywhere from a few kilobytes to maybe 1MB or so, not many much larger than that. While I may not want to reduce /home much, I could likely reduce crypt by 90% and still have a lot left over, provided that changes when I grow the file system as I add drives etc. Yes, I'm already on the hunt for another hard drive to add onto crypt. Is there a tool to tell the average size of files in a directory? Tools that would help us to know how many inodes one actually needs? As it is, I'm doing a lot of updating of old files with larger files, due to higher resolution of videos. Example, some videos are going from a little below 720p to 720p or 1080p. The difference in file size is pretty large. Sometimes double or more. This is interesting to consider here. One doesn't want to run out of inodes but at the same time, even if I only had 10% of the number I have now for crypt I'd still have 10 times more than I need with the thing almost full. This is also true for my backup drives as well. Two of them at least. One that has documents I'd likely leave as is. I'm going to have to work on better storage somehow. All of this is going to crop up again eventually, likely sooner rather than later. Dale :-) :-) P. S. I have to close my VPN to check emails still. Pardon the time lag in replies compared to the past.

