You are not logged in.

#1 2021-10-16 19:50:14

Shino
Member
From: Germany
Registered: 2015-02-01
Posts: 111

[Solved] Kernel constantly writing to HDD after crypting it with luks

Hi,

I've created a new crypted partition on my HDD. Everything works fine. However, Linux started constantly writing to this disk.
The data rate is around 10-100 kB/s but never stops. I've kept my PC running for the last 8 hours but the drive is still constantly accessed.

The drive is a pure data drive and shouldn't be used by any process.

The partition contains a luks crypto which then contains an ext4 filesystem.
The fs is mounted with the options "defaults,relatime".

Before using a luks crypted partition, I used the same disk with an un-encrypted ext4. It didn't show constant dis access.

Using iotop I see the following processes:

  30071 be/4 root          0.00 B     40.00 K  ?unavailable?  [kworker/u16:5-kcryptd/254:1]
    1383 be/3 root          0.00 B    108.00 K  ?unavailable?  [jbd2/dm-1-8]

When I unmount the file system but keep the crypto container open, the disk accesses stop.

It is very annoying to hear the disk head click every second for no obvious reason.
Does anyone have an idea why there is constant disk access?

Last edited by Shino (2021-10-18 19:48:35)

Offline

#2 2021-10-16 20:09:33

frostschutz
Member
Registered: 2013-11-15
Posts: 1,647

Re: [Solved] Kernel constantly writing to HDD after crypting it with luks

ext4 has this habit of writing to disk, ext4 lazy init

Offline

#3 2021-10-16 20:38:57

Shino
Member
From: Germany
Registered: 2015-02-01
Posts: 111

Re: [Solved] Kernel constantly writing to HDD after crypting it with luks

frostschutz wrote:

ext4 has this habit of writing to disk, ext4 lazy init

Thanks for the info. Didn't know that. I remountet the disk with init_itable=0 and will wait if it finishes soon.

EDIT:

The "lazy init" was indeed the culprit. As described above, I forced it to complete and now the HDD is silent.

Last edited by Shino (2021-10-18 19:48:14)

Offline

Board footer

Powered by FluxBB