0

My NAS is running zfs and does a scrub now and then.

When it runs it read all data (as expected), but it also writes a litte during the run (around 0.5%):

Device       rkB/s     wkB/s  %util
sda       13628.80     69.60  58.04
sdb       13625.60     73.60  59.48
sdc       13625.60     70.80  58.96
sdd       13625.60     68.40  58.24
sde       13625.60     69.60  60.00

This could be explained by other systems using it. But there are no systems using the NAS, and no user processes running on the server, that would access the NAS. Also the rate is constant for hours: Full read for 4.5 seconds followed by 0.5 seconds write. It is a fixed rythm: silence for 4.5 seconds, and then the DRRDRRD sound of seeking when it is writing.

But why does it write anything when there are no clients and nothing to correct?

I was under the impression that as long as all data are clean, consistent, and unchanged since last scrub, there would be no need to write any data.

Ole Tange
  • 33,591
  • 31
  • 102
  • 198
  • a scrub will automatically repair errors if possible so is it possible that you have any errors on your pool? – jesse_b Apr 26 '21 at 01:32
  • The rate at which the data is changing - the ratio of writes/reads - is roughly 5 parts per thousand per second. But if you take a snapshot then use watch you may be able to figure out which files are changing. – Cinaed Simson Apr 26 '21 at 01:43
  • @jesse_b No errors. It does this every 5 seconds for the full 30 TB. – Ole Tange Apr 26 '21 at 06:57
  • @CinaedSimson Not understood. The NAS is sitting idle when doing the scrub. No other system is using it. – Ole Tange Apr 26 '21 at 06:58
  • If it never reads anything, it would never know if there was a problem. Monitoring requires reading. If 5 seconds is to short, change the zpool monitor time to as many seconds as you like. On my computer - when it's "empty" - in htop, the uptime flucutates between roughtly 1-2 seconds. So 5 seconds - slightly over twice the flucation in uptime - is a safe starting point. – Cinaed Simson Apr 27 '21 at 05:02
  • @CinaedSimson It reads alot: 65 MB/s. It does not *correct* anything and it not used by other clients (so when I say 'idle' I really mean: no other clients, no files are being touched). The 65 MB/s is for scrub only. And I perfectly understand why it reads. It is the *writing* I do not understand. – Ole Tange Apr 27 '21 at 06:31

0 Answers0