LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-09-2019, 11:16 AM   #1
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Rep: Reputation: 110Reputation: 110
Someone please explain ext4lazyinit to me


After many years using XFS only, I formatted a partition as EXT4. And I was introduced to ext4lazyinit, which I had never seen before and thrashed my disk for a rather long time. Anxious to begin populating the partition, I googled, killed it (just umounting did the trick), and reformatted with ext4lazyinit disabled. Reformatting with ext4lazyinit disabled cost me about three seconds and the problem went away.

I read about it, but I still can't understand it. The way I understand it, it seems that it is supposed to take a long time after the partition has been formatted doing something that can be done in three seconds at formatting time. Is that correct?

I also found this thread which makes it all sound a lot like what I just said:

https://ubuntuforums.org/showthread.php?t=2306568

The last post in that thread is particularly compelling.

Two options are possible: the whole idea of ext4lazyinit has completely gone over my head or ext4lazyinit is one of the most stupid ideas I have ever seen. I don't usually regard people who make file systems as stupid so I am sincerely betting on the first possibility.

Will someone please explain it to me?

Last edited by lucmove; 08-09-2019 at 11:17 AM.
 
Old 08-09-2019, 11:21 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,781

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
probably this: https://superuser.com/questions/7846...nish-its-thing
and contains a link to https://git.kernel.org/pub/scm/linux...4cea02aae9e7ba
 
Old 08-09-2019, 02:38 PM   #3
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Original Poster
Rep: Reputation: 110Reputation: 110
Quote:
Originally Posted by pan64 View Post
I can't see any relevance at all in your first link.

The second link says: "When the lazy_itable_init extended option is passed to mke2fs, it considerably speeds up filesystem creation because inode tables are not zeroed out."

Which pulls me back into my original question. Filesystem creation takes three seconds. Why would anyone want to skip whatever it is that is done within those three seconds then suffer through a separate process that does the same thing but seems to take forever?

I swear, I don't understand.
 
Old 08-09-2019, 03:37 PM   #4
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by lucmove View Post
Filesystem creation takes three seconds. Why would anyone want to skip whatever it is that is done within those three seconds then suffer through a separate process that does the same thing but seems to take forever?

I swear, I don't understand.
In YOUR case. I've seen cases (especially LARGE disks in RAID5 arrays) where filesystem creation takes up lots of HOURS (we started it at 17:00 so that it would be ready = hopefully - the next morning....).
 
Old 06-05-2022, 02:36 PM   #5
Francewhoa
LQ Newbie
 
Registered: Jul 2009
Location: Powell River, British Columbia, Canada
Distribution: Debian 10 Buster
Posts: 7

Rep: Reputation: 0
>Someone please explain ext4lazyinit to me

Hello lucmove My understanding is that ext4lazyinit is a Linux Kernel automated background process. Which initialize the storage inode table.



--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---


Below is the same message as above. But with details if you're interested in those.



Depending on the size of the storage, ext4lazyinit might be very quick or very long to fully complete its automated actions. Such as hours or weeks. For example, with an 8 TB storage, I suggest letting ext4lazyinit run between 20 hours to 2 calendar weeks. This estimate range depend on various factors. Such as, but not limited to, the storage speed, and resources available. Also, this estimate range assumes that, during this period, the storage is both always mounted and able to use the full read and write bandwidth. In addition, during this period, optionally, you can logout or shutdown the storage. As ext4lazyinit will automatically resume its automation after the storage is mounted. Either ways, after ext4lazyinit is able to complete all its automated background actions, it will automatically stop.



Below are related answers I found


According to Cyclic3, ext4lazyinit simply allows you to start using the hard drive (hdd) without creating all the inodes for your file system. Source https://unix.stackexchange.com/quest...f-ext4lazyinit


According to Thomas Kenn. "If [ext4lazyinit is] 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. - Thomas Kenn". Source https://unix.stackexchange.com/q/341015/210877

Last edited by Francewhoa; 06-05-2022 at 03:04 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can someone please explain the GNU Project in Layman's terms please? sharee Linux - Newbie 6 04-03-2010 10:02 PM
please someone, do explain this to me... Tisch Slackware 4 01-17-2004 10:37 AM
Can someone please explain the make process to me? supertechmyers Linux - Newbie 5 11-07-2003 12:42 PM
RPM, someone please explain.... SR712 General 9 09-08-2003 01:35 PM
Can someone please explain this trentk Linux - General 6 09-25-2002 12:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration