Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] External hard drive and idle activity
Date: Thu, 02 Jan 2020 02:00:31
Message-Id: d9fd7037-8a44-402d-6c85-44acbadf61a6@gmail.com
In Reply to: Re: [gentoo-user] External hard drive and idle activity by Grant Taylor
1 Grant Taylor wrote:
2 > On 1/1/20 5:09 PM, Dale wrote:
3 >> Howdy,
4 >
5 > Hi,
6 >
7 >> As some may recall, I have a 8TB external SATA hard drive that I do
8 >> back ups on.  Usually, I back up once a day, more often if needed.
9 >> Usually I turn the power on, mount it, do the back ups, unmount and
10 >> turn the power back off.  Usually it is powered up for 5 minutes or
11 >> so. When I unmount it tho, I sometimes notice it is still doing
12 >> something. I can feel the mechanism for the heads moving.  It has a
13 >> slight vibration to it.  Questions are, what is it doing and should I
14 >> let it finish before powering it off?  I'd assume that once it in
15 >> unmounted, the copy process is done so the files are safe.  I guess
16 >> it is doing some sort of internal checks or something but I'm not sure.
17 >
18 > There might be some activity for up to 30 seconds after umount
19 > finishes and returns to the command prompt.
20 >
21 > Note:  umount will normally block until buffers are flushed to disk.
22 >
23 >> Is it safe to turn it off even tho it is doing whatever it is doing?
24 >
25 > I wouldn't.
26 >
27 >> Should I wait?
28 >
29 > I would.
30 >
31 >> Does it matter?
32 >
33 > Maybe.
34 >
35 > Is the drive SATA connected or USB connected to the machine?
36 >
37 > In some ways it doesn't matter.  You can tell the kernel to eject the
38 > drive.  Once that finishes, there is no active remnants of the drive
39 > in kernel.  5–15 seconds after that and you should be quite safe to
40 > power the drive off.
41 >
42 > echo 1 > /sys/class/block/$DEVICENAME/device/delete
43 >
44 > That will cause the kernel to gracefully disconnect the drive.
45 >
46 >> Thanks.
47 >
48 > :-)
49 >
50 >
51 >
52
53 It is connected with a eSATA cable.  It has a USB connector as well but
54 I just don't trust USB as much as I do SATA.  Other USB enclosures had
55 "issues".  ;-) 
56
57 If I touch the enclosure and feel it doing something, I leave it on,
58 just in case.  I actually been wondering about this for a while. 
59 Sometimes it will stop after a couple minutes, sometimes it is still
60 doing its thing 30 minutes later.  In the case of the first, I was
61 concerned about files being cached etc.  Thing is, it *should* do that
62 before unmounting.  In the case of it going on for 30 minutes or more, I
63 was wondering if it was doing some sort of housekeeping, media tests or
64 something.  I just didn't know if it was important to wait or not.  On
65 occasion I would leave the drive on overnight or all day.  I figure it
66 would be able to at least do a quick self test and report errors if any. 
67
68 Thanks for the extra info.  It helps a bit. 
69
70 Dale
71
72 :-)  :-) 

Replies