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