Gentoo Archives: gentoo-user

From: William Kenworthy <billk@×××××××××.au>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] SMR drives (WAS: cryptsetup close and device in use when it is not)
Date: Fri, 30 Jul 2021 05:17:57
Message-Id: 56d64f52-1b9a-1309-c720-06bb63c9f80a@iinet.net.au
In Reply to: Re: [gentoo-user] [OT] SMR drives (WAS: cryptsetup close and device in use when it is not) by Frank Steinmetzger
1 On 30/7/21 4:55 am, Frank Steinmetzger wrote:
2 > Am Thu, Jul 29, 2021 at 05:46:16PM +0100 schrieb Wols Lists:
3 >
4 >>> Yea. First the SMR fiasco became public and then there was some other PR
5 >>> stunt they did that I can’t remember right now, and I said “I can’t buy WD
6 >>> anymore”. But there is no real alternative these days. And CMR drives are
7 >>> becoming ever rarer, especially in the 2.5″ realm. Except for one single
8 >>> seagate model, there isn’t even a bare SATA drive above 2 TB available on
9 >>> the market! Everything above that size is external USB stuff. And those
10 >>> disks don’t come with standard SATA connectors anymore, but have the USB
11 >>> socket soldered onto their PCB.
12 >>>
13 >> Are you talking 2.5" drives here?
14 > I meant in general, but – as I said – “especially in the 2.5″ realm”. ;-)
15 > For 3.5″, it’s mostly the low-capacity drives that are affected. Probably
16 > because here the ratio of fixed cost (case, electronics) vs. per-capacity
17 > cost (platters, heads) is higher, so the pressure to reduce manufacturing
18 > cost is also higher. High-capacity drives tend to remain CMR at the mo’.
19 >
20 >> The SMR stunt was a real cock-up as far as raid was concerned - they
21 >> moved their WD Red "ideal for raid and NAS" drives over to SMR and
22 >> promptly started killing raid arrays left right and centre as people
23 >> replaced drives ... you now need Red Pro so the advice for raid is just
24 >> "Avoid WD".
25 > Red Plus is fine, too. I think the “Plus” is marketing speak for non-SMR.
26 > Which is why probably SMRs now have the price tag of old CMRs, and the new
27 > CMRs have a “plus” on the price tag.
28 >
29 >> From what I can make out with Seagate, the old Barracuda line is pretty
30 >> much all CMR, they had just started making some of them SMR when the
31 >> brown stuff hit the rotating blades.
32 > Seagate made a statement that their NAS drives are not and never will be SMR.
33 >
34 >
35 >
36 > In case someone is interested, here’s a little experience report:
37 >
38 > Two days ago, I bought a 2.5″ WD My Passport 4 TB for a new off-site backup
39 > strategy I want to implement. They even killed the rubber feet on the
40 > underside to save a few cents. >:'-( ) Interestingly, the even cheaper
41 > elements series (which is the cheapest because it has no complimentary
42 > sofware and no encryption or password feature) still has them. Probably
43 > because its case design is older.
44 >
45 > I just finished transferring my existing Borg backup repos. Right at the
46 > beginning, I tested a small repo of 3 GiB and I got good throughput. After
47 > around 2 GiB or so the drive went down to 10 MiB/s for a very long time
48 > (writing at least another 3 GiB, I have no idea what that was).
49 >
50 > I was already pondering my options. But once that was over, I’ve since been
51 > writing 1,2 TiB to the drive with rsync happily without any glitches,
52 > averaging at slightly above 100 MiB/s. I used SMR-friendly ext4 settings and
53 > Borg uses datafiles of 500 MiB size, which greatly reduces sprinkled
54 > metadata writes b/c it’s only a few thousand files instead of millions.
55 >
56 > According to smartctl, the drive claims to support Trim, but so far I’ve
57 > been unsuccessful to invoke it with fstrim. First I had to enable the
58 > allow-discard option in the underlying LUKS container, which is disabled by
59 > default for security reasons. But either I’m still missing a detail, or the
60 > USB-SATA-bridge really does not support it. Or it does, but the kernel is
61 > unaware: yesterday I read an article about enabling a flag for the USB
62 > controller via a custom UDEV rule. Who knows.
63 >
64 I am using a seagate USB3 backup disk (4Tb SMR) for borgbackup on
65 btrfs.  Yes, it works well on regular backups, but its dismally slow 
66 for anything else (operations that read or write large amounts of data
67 at once):
68
69 1. Adding a lot of new data to a repo is extra slow
70
71 2. btrfs scrub (a couple of days)
72
73 3. borg repair (days!)
74
75 I had an unscheduled crash that lost a btrfs segment - scrub showed it
76 as an uncorrectable error so I deleted the file involved and borg repair
77 zeroed that part of the repo so its still ok. On a regular backup run
78 its fine, but if recovery time if you have an error is a real problem.
79
80 BillK

Replies