19

I recently obtained a new 16TB HDD for my Debian server. I first created a partition (gpt) on it via my Ubuntu-like desktop, formatted it (ext4), and rsync'ed old data on it. The disk is now usable, so I insert it into my server. Now begins a weird I/O that I can't identify.

  • iotop -ao reports a 3MB/s Current DISK WRITE without any indication as to who is doing it
  • fatrace -c -t reports no writing or reading, but do report it if I myself touch a file for instance.
  • dstat -tdD /dev/sdx --top-io reports a steady 3072k write each second as well, consistent with iotop, but no culprit either, only a blank in i/o process where there should be a name, but it does confirm that the I/O action is on the said disk, which I initially deduced from the noise it was emitting...

Now I know that there might be inconsistencies between what the iotop header shows and the sum of I/O writes and/or reads from processes as explained here. But contrary to the previous post, at that time:

  • the server was cut off from the internet
  • local network was only the server
  • I was not performing any action on the disk
  • I manually exited every program that could use that disk

A couple of hours after (at least 10, no more than 20) the noise was gone, and no more 3MB/s input on the disk.

My question is : could it be normal behavior (though I never observed it before now) (from perhaps the kernel?) to write some caching system, init tables or something similar that could explain this constant 3MB/s write for 10-20 hours?

I initially thought of a crypto/random virus but even 20 hours at 3MB/s could not possibly cover the 12TB written on the 16 available.

Is there any logical explanation for this?

Dave M
  • 4,494
b4too
  • 193

2 Answers2

35

The background IO load you noticed is due to ext4 deferred inode table allocation. From mke2fs man page:

lazy_itable_init[= <0 to disable, 1 to enable>]
    If enabled and the uninit_bg feature is
    enabled, the inode table will not be fully
    initialized by mke2fs.  This speeds up file
    system initialization noticeably, but it
    requires the kernel to finish initializing the
    file system in the background when the file
    system is first mounted.  If the option value
    is omitted, it defaults to 1 to enable lazy
    inode table zeroing.
shodanshok
  • 52,255
3

The kernel or file system might be performing maintenance tasks, such as updating metadata or journaling, which could result in sustained disk writes. These tasks are typically performed in the background to optimize disk performance.

Turdie
  • 2,945