You are not logged in.

#1 2021-10-02 22:40:25

60isthekey
Member
Registered: 2021-08-27
Posts: 3

HDD activity at 100% every time I boot up, for exactly 2 minutes

Hi Arch Community.
ext4lazyinit has been running nonstop for a few months already. Every time I boot up my PC ext4lazyinit uses 100% of my HDD for exactly 2 minutes, and then it simply stops. Is this normal? Shouldn't this process have ended months ago?
Same thing happens if I unmount and mount the drive manually, ext4lazyinit runs for 2 minutes and then it lets me work without any further issues.

My HDD is a 6TB-5400rpm WD Blue that I bought just a few months ago. It works perfectly... aside from this particular problem... big_smile

Extra info:

# iotop
312 be/4 root      781.28 K/s    0.00 B/s  0.00 % 99.99 % [ext4lazyinit]

# file -sL /dev/sdb1
/dev/sdb1: Linux rev 1.0 ext4 filesystem data, UUID=ff2bf6d9-ffff9776-40ef-ffffa1d5-911a08787230, volume name "LDATA" (needs journal recovery) (extents) (64bit) (large files) (huge files)

/etc/fstab
# /dev/sdb1 UUID=521af953-b7e2-4c9e-8a18-4f5ae96f577b LABEL=LDATA
PARTUUID=1b49fa5d-7609-412f-8c17-ce053fdcc2db   /LDATA          ext4            rw,relatime,nofail      0 2

/etc/udev/rules.d/60-ioschedulers.rules
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"

uname -r
5.14.8-zen1-1-zen

Thanks.

Offline

#2 2021-10-03 13:59:44

shulamy
Member
From: israel
Registered: 2010-09-11
Posts: 453

Re: HDD activity at 100% every time I boot up, for exactly 2 minutes

maybe bad sectors?

ezik

Offline

#3 2021-10-03 15:55:29

60isthekey
Member
Registered: 2021-08-27
Posts: 3

Re: HDD activity at 100% every time I boot up, for exactly 2 minutes

I don't think it's a hardware problem. I already tried to boot up an Ubuntu Live CD and mount the HDD multiple times, but ext4lazyinit never ran.

Offline

#4 2021-10-04 20:31:08

xerxes_
Member
Registered: 2018-04-29
Posts: 662

Re: HDD activity at 100% every time I boot up, for exactly 2 minutes

Maybe disable that "ext4lazyinit" and see if that helps. There might be some bug in it.

Last edited by xerxes_ (2021-10-04 20:31:38)

Offline

#5 2021-10-09 08:21:11

60isthekey
Member
Registered: 2021-08-27
Posts: 3

Re: HDD activity at 100% every time I boot up, for exactly 2 minutes

xerxes_ wrote:

Maybe disable that "ext4lazyinit" and see if that helps. There might be some bug in it.

Hmm could be, but I can´t disable it. I tried to mount the HDD with "mount -o init_itable=0 /dev/sdb1" and ext4lazyinit still keeps reappearing.

The only possible solution I found is reformatting the hard drive with "lazy_itable_init=0,lazy_journal_init=0", but I don´t have any other backup hard drives and I don´t want to loose 4TB of personal data sad

Offline

#6 2021-10-31 09:39:00

a80c517a
Member
Registered: 2021-10-31
Posts: 1

Re: HDD activity at 100% every time I boot up, for exactly 2 minutes

I noticed the same symptoms recently.

I found this post: https://www.spinics.net/lists/linux-ext4/msg78854.html
Looks like ext4 filesystems made with largefile or largefile4 use ex4lazyinit to optimize block allocation.
From your post, I can see you have initialized ext4 with largefile

 # file -sL /dev/sdb1
/dev/sdb1: Linux rev 1.0 ext4 filesystem data, UUID=ff2bf6d9-ffff9776-40ef-ffffa1d5-911a08787230, volume name "LDATA" (needs journal recovery) (extents) (64bit) (large files) (huge files)

To disable this behavior you can mount with the option -o no_prefetch_block_bitmaps, but there may be some performance loss.
https://www.spinics.net/lists/linux-ext4/msg78855.html

Offline

#7 2022-01-08 11:29:55

barbeque
Member
Registered: 2020-03-24
Posts: 2

Re: HDD activity at 100% every time I boot up, for exactly 2 minutes

a80c517a wrote:

I noticed the same symptoms recently.

I found this post: https://www.spinics.net/lists/linux-ext4/msg78854.html
Looks like ext4 filesystems made with largefile or largefile4 use ex4lazyinit to optimize block allocation.
From your post, I can see you have initialized ext4 with largefile

 # file -sL /dev/sdb1
/dev/sdb1: Linux rev 1.0 ext4 filesystem data, UUID=ff2bf6d9-ffff9776-40ef-ffffa1d5-911a08787230, volume name "LDATA" (needs journal recovery) (extents) (64bit) (large files) (huge files)

To disable this behavior you can mount with the option -o no_prefetch_block_bitmaps, but there may be some performance loss.
https://www.spinics.net/lists/linux-ext4/msg78855.html

Thank you, the no_prefetch_block_bitmaps is the key. This recently also started happening on only one of my harddisks (both are large/huge files, the one that exhibits this behaviour has about ~8 times less inodes). I actually bought a replacement drive already (again formatted it with huge files and less inodes) so imagine my surprise when that also started doing this. Added the mount option and now it's not doing stuff for 30+ seconds every boot.

All of these disks are used in a NAS-like environment, but I only boot it when I actually need it (I don't stream from it), there's very few actual writes and getting the max read performance isn't critical to me (a few % less is fine).

Offline

Board footer

Powered by FluxBB