Gentoo Archives: gentoo-user

From: madscientistatlarge <madscientistatlarge@××××××××××.com>
To: "gentoo-user@l.g.o" <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] External hard drive and idle activity
Date: Thu, 02 Jan 2020 22:10:47
Message-Id: EuYr8KosHvfrOOItZNXw9G82uUE3jg1Tz2_xzmKIgoLgNC49hDk-yLO7RcNAc-79tY1YRr3ZZiRmF9NWn78gFrJj2JBKaGv-svZJwOtCyis=@protonmail.com
In Reply to: Re: [gentoo-user] External hard drive and idle activity by Rich Freeman
1 ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
2 On Thursday, January 2, 2020 12:12 PM, Rich Freeman <rich0@g.o> wrote:
3
4 > On Thu, Jan 2, 2020 at 1:41 PM Dale rdalek1967@×××××.com wrote:
5 >
6 > > Rich Freeman wrote:
7 > >
8 > > > Out of curiosity, what model drive is it? Is it by chance an SMR /
9 > > > archive drive?
10 > >
11 > > Device Model: ST8000AS0003-2HH188
12 > > I recall reading about SMR but can't recall the details of what it is.
13 > > As far as I know, this is just a basic 8TB drive.
14 >
15 > This is an SMR drive. You should DEFINITELY read up on what they are.
16 >
17 > For reads they're completely normal. For sequential writes to unused
18 > space they're completely normal. For random writes or overwrites they
19 > are significantly different from traditional hard drives.
20 >
21 > They work a bit like an SSD in the sense that blocks are arranged into
22 > larger erase regions. Within a region blocks can only be written
23 > sequentially. If you want to overwrite one block in the middle of a
24 > region, the drive will read the entire region into RAM, then write the
25 > entire region sequentially with the overwritten block to a new spot on
26 > the disk. This is just like in an SSD where if try to overwrite a
27 > block in a region with any unTRIMmed blocks the drive must read the
28 > entire region, erase the region, and write the modified region.
29 >
30 > Except that in an SSD those extra reads/writes operate with SSD access
31 > times. With an SMR drive those extra reads/writes operate with hard
32 > drive latencies, so they're MUCH more costly.
33 >
34 > For backup use they're usually fine, IF you're writing in a sequential
35 > file format that is appended to. If you're using rsync to do your
36 > backups then that isn't what you're doing and you're probably paying a
37 > heavy penalty. If you were doing incremental backups using
38 > tar/duplicity/whatever then you'd probably be fine.
39 >
40 > Some filesystems might be optimized for these drives to reduce the
41 > amount of overwriting in place. I haven't looked into it. I'd expect
42 > a log-based filesystem to work fairly well, though those can have high
43 > levels of fragmentation which is better suited for SSD than SMR.
44 >
45 > These drives all have fairly active firmware that manages this special
46 > overwrite process so that they can be used with operating systems that
47 > are naive to how they work. I wouldn't be surprised if this is what
48 > is causing the drive to be active after you unmount it. In theory it
49 > should be harmless to power it off. However, leaving it powered on
50 > probably will improve its performance as it can take care of any
51 > garbage collection before the next time you use it. If whatever
52 > journal it is using to speed things up gets full then you'll feel the
53 > full brunt of any write penalties until it is flushed.
54
55 > Rich
56
57 Thank you for the excellent education! I haven't read the full thread but I'd also suggest that running Wireshark on the USB port would likely help diagnose any other issues. I'm having similiar problems with an external drive "freeezing" and refusing to unmount normally and this will be my next step to diagnose it.