Gentoo Archives: gentoo-user

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

Replies