Gentoo Archives: gentoo-user

From: David Haller <gentoo@×××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Getting maximum space out of a hard drive
Date: Fri, 19 Aug 2022 04:27:56
Message-Id: 20220819042614.bj5crtjkgszbnshh@grusum.dhaller.de
In Reply to: Re: [gentoo-user] Getting maximum space out of a hard drive by Dale
1 Hello,
2
3 On Thu, 18 Aug 2022, Dale wrote:
4 >Rich Freeman wrote:
5 >> On Thu, Aug 18, 2022 at 2:04 PM Dale <rdalek1967@×××××.com> wrote:
6 >>>
7 >>> Part. # Size Partition Type Partition Name
8 >>> 1007.0 KiB free space
9 >>> 1 9.1 TiB Linux filesystem 10Tb
10 >>> 1007.5 KiB free space
11 >>>
12 >>>
13 >>> I'm not sure why there seems to be two alignment spots. Is that
14 >>> normal? Already, there is almost 1TB lost somewhere.
15 >> 10 TB = 9.09495 TiB. You aren't missing much of anything.
16 [..]
17 >Well, I realize it would be less than advertised but I just want to
18 >maximize it as much as I can.  I found the -m option for the file system
19 >a good while back and it saves a lot on these larger drives.  Since this
20 >is a external drive, no point in reserving any root space, since root
21 >will likely never access it after the file system is put on it. 
22
23 Also, if you're using ext2/3/4, there's the preset, i.e. if you're
24 rather sure about what kind of data is going to be on there, you
25 can tune it so that it reserves more or less place for metadata like
26 inodes, which can be another bit.
27
28 I made some experiments with a temp-repurposed swapfile of 2051M size:
29
30 Output of 'df -m':
31 1M-blocks Used Available Inodes mke2fs-options used
32 2016 67 1847 131072 -j -t ext4
33 2016 67 1949 131072 -j -t ext4 -m 0
34 2048 67 1878 2048 -j -t ext4 -T largefile
35 2048 67 1981 2048 -j -t ext4 -T largefile -m 0
36
37 So, defaults uses about 1.7% of the space for metadata, and -T
38 largefile only about 0.15% of the space. Of course, there are rather
39 few inodes with '-T largefile'. But if you want to put basically only
40 some big videos on there, 2048 inodes seems a lot for a mere 2G of
41 space ;) This should scale linearly (in steps) for bigger devices and
42 can amount to quite some more space.
43
44 Anyway, see /etc/mke2fs.conf, 'man mke2fs' and 'man mke2fs.conf for
45 details.
46
47 I've done this in the past and got bitten by too few inodes, but you
48 can get around that for "inode-hogs" like news-spools etc. by using a
49 loop-filesystem with different parameters or a different fs. Just
50 beware: reiserfs on reiserfs is a recipie for desaster.
51
52 HTH,
53 -dnh
54
55 --
56 There are two major products that come out of Berkeley:
57 LSD and UNIX. We don't believe this to be a coincidence.
58 -- Jeremy S. Anderson

Replies

Subject Author
Re: [gentoo-user] Getting maximum space out of a hard drive Frank Steinmetzger <Warp_7@×××.de>