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 06:35:51
Message-Id: 7b81217b-e70c-0191-aa6a-b6a06d352d87@gmail.com
In Reply to: Re: [gentoo-user] External hard drive and idle activity by Bill Kenworthy
1 Bill Kenworthy wrote:
2 > On 2/1/20 10:27 am, Dale wrote:
3 >> Mick wrote:
4 >>> On Thursday, 2 January 2020 00:09:14 GMT Dale wrote:
5 >>>> Howdy,
6 >>>>
7 >>>> As some may recall, I have a 8TB external SATA hard drive that I do
8 >>>> back
9 >>>> ups on.  Usually, I back up once a day, more often if needed. 
10 >>>> Usually I
11 >>>> turn the power on, mount it, do the back ups, unmount and turn the
12 >>>> power
13 >>>> back off.  Usually it is powered up for 5 minutes or so.  When I
14 >>>> unmount
15 >>>> it tho, I sometimes notice it is still doing something.  I can feel
16 >>>> the
17 >>>> mechanism for the heads moving.  It has a slight vibration to it.
18 >>>> Questions are, what is it doing and should I let it finish before
19 >>>> powering it off?  I'd assume that once it in unmounted, the copy
20 >>>> process
21 >>>> is done so the files are safe.  I guess it is doing some sort of
22 >>>> internal checks or something but I'm not sure.
23 >>> There is some delay with data still in the buffers between
24 >>> rsync/cp/tar/what-
25 >>> ever saying it's finished on your terminal and the drive itself
26 >>> finishing
27 >>> storing the data on the platters.
28 >>>
29 >>> If you look at vmstat, or keep an eye on Gkrelm you'll see what I mean.
30 >>> Normally, if you try to unmount a drive while it is still being
31 >>> written to,
32 >>> the umount/udisks command will complain the drive is busy.
33 >>>
34 >> When it does it for a somewhat short period of time, I can understand
35 >> that.  It's one reason I try to leave it on when it "feels" that it is
36 >> still busy.  Thing is, there are times when it goes on for 30 minutes or
37 >> more.  At those times, even a USB stick should be done.  One would think
38 >> at least.  It makes me curious as to what it is doing in that case.
39 >> Still, I'd rather the unmount command force a wait until it is done.
40 >> Honestly, I wouldn't want a drive or software that says something is
41 >> done when it isn't.  It's not good even when shutting a system down.
42 >> Given the speed of drives, I would think a few seconds at most.  Best to
43 >> be safe.  ;-)  I just wonder, is it doing two different things?  One
44 >> when it is busy for short periods of time and something else when it
45 >> goes on for a while.  This is what sort of puzzles me.  Selftest maybe??
46 >>
47 >>>> Is it safe to turn it off even tho it is doing whatever it is doing?
48 >>>> Should I wait?  Does it matter?
49 >>>>
50 >>>> Thanks.
51 >>>>
52 >>>> Dale
53 >>>>
54 >>>> :-)  :-)
55 >>> If you wait for a few seconds after the backup is completed before
56 >>> you unmount
57 >>> the drive, you should be OK.  Although it may slow down or any LEDs
58 >>> flash less
59 >>> frequently the drive may not stop spinning, unless there is some
60 >>> power save
61 >>> process taking control of it.
62 >>>
63 >> Given the speed, it is likely done when I tell the KDE thingy to
64 >> unmount.  Usually, I start the backup and walk away for a few minutes.
65 >> I do it with one of my scripts, if one can call what I do a script, and
66 >> it does the date command at the end.  Even if there was a lot of
67 >> changes, I can tell how long it was completed.  I try to give it a
68 >> couple minutes.  Still, good point.  This is one reason I'm asking about
69 >> this.  It's hard to know exactly what is going on here.
70 >>
71 >>>> P. S. Down to last router that was discussed in another thread so I
72 >>>> bought it while they had it.  Price may go up if I didn't.  Did more
73 >>>> research on old modem, it is risky to try to convert to AT&T.  Some
74 >>>> say
75 >>>> not possible.
76 >>> Right, ISP controlled firmware typically requires re-flashing the
77 >>> device with
78 >>> the new ISP's firmware version.  In some cases even the boot code needs
79 >>> replacing.  Should you flash the router with a wrong firmware build,
80 >>> you could
81 >>> sometimes derive a door stop without additional cost.  In this case
82 >>> you'll
83 >>> need a JTAG and access to its circuit board with an OEM
84 >>> boot/firmware version
85 >>> to recover it.  In most cases OEMs support lines will redirect you
86 >>> to your
87 >>> ISP, who run an overseas support line and will ask you to reboot your
88 >>> MSWindows PC ... O_o
89 >>>
90 >>> This is a reason I avoid these kind of routers as much as I can.
91 >>>
92 >> Keep in mind, two pieces of hardware.  Router for the first two
93 >> sentences and Modem for next two.  Tried to be short so . . . . Anyway,
94 >> router should be flashable with Openwrt.  It's a slightly older model.
95 >> New model may be ready for flashing in a year or two but not so much at
96 >> the moment so I went with the older model. The modem, I never could find
97 >> the firmware.  I found links to it but those links ended up being dead.
98 >> Even if I had it, it was unlikely to work.  Possible but I'd be
99 >> concerned about its stability and such even if it did take it. I have a
100 >> modem and router on the way.  I just didn't want to miss the deal on the
101 >> router.  They had several a couple weeks or so ago.  I got the last
102 >> one.  Waiting for their arrival.
103 >>
104 >> Dale
105 >>
106 >> :-)  :-)
107 >>
108 >> Oh, I may post and see if anyone needs a Frontier modem later.  Maybe
109 >> someone on here could use a spare or just needs one period, moving or
110 >> something.  Modem is wireless with a router as well.  Nice modem I
111 >> guess.
112 >>
113 >
114 > Try atop from sys-process/atop - it will show you how busy individual
115 > disks are (and a lot of other stats as well.)
116 >
117 > You can issue a sync command to flush any disk buffers before
118 > unmounting (umounting should sync as well.).  The heads may keep
119 > moving because of the internal data management modern disks do. The
120 > disks should be safe to power off despite this (they have an internal
121 > flush/save/park routine on power loss, with enough energy stored to
122 > take care of it)
123 >
124 > Bill
125
126 Tried atop, it works best for this since it showed the drive device
127 instead of process name like iotop.  In my case, it shows sdj.  I turned
128 the drive on, atop showed nothing until I mounted it.  I then did a
129 quick back up and it showed up like it should.  Once done, it showed no
130 activity until I told KDE to unmount.  After it was unmounted, it showed
131 no further activity according to atop, iotop or anything else for that
132 matter.  I could however feel it doing something.  The heads were moving
133 around every few seconds or so.  Sometimes close together, sometimes
134 several seconds or more apart.  It's sort of intermittent type activity.
135
136 I might add, the light that shows activity on the enclosure shows
137 nothing either.  The light is odd, it's always on but blinks when there
138 is activity.  Usually they are off and come on when active.  Sort of
139 weird but OK. 
140
141 I think once unmounted, the files are done, or a short time afterwards. 
142 After that, I think you and other are right, it's doing some internal
143 stuff. 
144
145 Thanks again to all who replied.  I'm not 100% sure of what it is doing
146 but pretty sure I can power it off once the back up is done and it is
147 unmounted. 
148
149 Dale
150
151 :-)  :-)