Gentoo Archives: gentoo-user

From: Michael <confabulate@××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Recommended filesystem for an SSD drive and what mount setting to be used?
Date: Fri, 27 Mar 2020 09:24:13
Message-Id: 2715719.e9J7NaK4W3@dell_xps
In Reply to: Re: [gentoo-user] Recommended filesystem for an SSD drive and what mount setting to be used? by Peter Humphrey
1 On Friday, 27 March 2020 08:46:33 GMT Peter Humphrey wrote:
2 > On Friday, 27 March 2020 05:34:58 GMT tuxic@××××××.de wrote:
3 > > hopefully in the next daus my first SSD drive will arrive
4 > > (corona makes everything more difficult...).
5 > >
6 > > To prevent an "installed and works"-experience which ends
7 > > a month later in a damaged or over-weared SSD with a drastically
8 > > shortened lifetime, I want to ask here for own experiences:
9 > >
10 > > - What is the best filesustem to be used with a SSD, which
11 > >
12 > > will used for /root when it comes to prolong life of that
13 > > SSD ?
14 >
15 > Ext4. I did try F2FS several years ago, but it caused loss of data. It may
16 > be better now, but I wouldn't risk it as there's no need: these days SSDs
17 > are quite happy with ext4.
18
19 There were some fs supposedly optimised for SSDs, but I haven't used any of
20 them. I have used ext4 and btrfs. They both have worked as expected. Leave
21 a little empty space when partitioning, for the drive's firmware to perform
22 its wear leveling magic.
23
24
25 > > - What options are recommended for the according mount command?
26 >
27 > Nothing special, just 'defaults,relatime' in my case, but put something like
28 > this in root's crontab:
29 >
30 > 15 1,13 * * * /sbin/fstrim -a
31 >
32 > (I'm sure someone will correct me if that's no longer necessary.)
33
34 Mounting with 'discard' option is an alternative, but only if the drive is
35 written to rarely. For desktop usage a / partition is better trimmed with a
36 simple cron job, or using a script to do it - like SSDcronTRIM, as mentioned
37 here:
38
39 https://wiki.gentoo.org/wiki/SSD#SSDcronTRIM
40
41 Generally speaking, reducing write operations on the SSD is commensurate with
42 a longer disk life, therefore many operations which perform frequent/
43 continuous writes are usually configured to be offloaded to RAM, or a spinning
44 disk. However, many people leave swap on their SSD, apparently without any
45 noticeable adverse effect.
46
47 Failures are rare these days, but when they occur they are usually
48 catastrophic - so backups are a necessity if you value your data. When/if
49 smartctl reports a failure it is best to remove all data off the drive
50 immediately, *before* you power it down. It is likely all data will be gone
51 irretrievably after a reboot.
52
53 In earlier years some SSDs were released with half-baked firmware and
54 developed errors, lost data, etc. So it was advised to upgrade the firmware
55 as soon as you bought the drive. I don't know if this still applies today,
56 when the technology is more mature.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies