![](https://seccdn.libravatar.org/avatar/db61becba2ff9d091e7d462f1b3178ac.jpg?s=120&d=mm&r=g)
On Wednesday 04 March 2020, Daniel Bauer wrote:
Am 03.03.20 um 01:21 schrieb Michael Hamilton:
On Tuesday 03 March 2020, Michael Hamilton wrote:
On Tuesday 03 March 2020, Daniel Bauer wrote:
I just inserted a new hard disk (6TB) in my Desktop-Computer and made a new encrypted partition using Yast.
Now ext4lazyint runs and runs and runs...
I read it is a background process that has to do with inodes. My questions are:
- can I already use that disk (exactly to rsync 3TB of data to it) or must/should I wait until ext4lazyinit has terminated?
Sorry, my first answer was a bit terse.
Yes, it's OK to use the file system. it's just that some inodes will have non null data in them, which could cause problems if the file system ever needs repair. The healthy file system knows which inodes are in use, so it won't be a problem unless damage occurs some time before ext4lazyinit completes.
I copied approx. 3TB of data to that disk and it seemed to work. I don't know what to do with the inodes-thing to make sure the data survives a power shutdown, for example.
As noted above, your data is safe provided you cleanly umount the drive and avoid any damaging the file system in any other way (such as pulling the plug).
- can I shut down the computer while this is still running? Or shouldn't I?
I couldn't find a clear answer on this - I assume it will continue the process at next boot or mount. I decided to resolve it before rebooting.
Meanwhile I shot it down and booted again. ext4lazyinit isn't running anymore.
Right now I'm in the process of initialising a couple of 4TB drives as LUK's ext4 encrypted offsite backups. I did some experiments. If I umount and mount the the ext4 partition while ext4lazyinit is running, it stops, but then restarts on the next mount: # -- ext4lazyinit running umount /mnt/usbbackup # -- ext4lazyinit process no longer visible shortly after the umount mount -o defaults,noatime,nodiratime,user_xattr /dev/mapper/usbbackup /mnt/usbbackup/ # -- ext4lazyinit running starts running again I also wen to the trouble of doing an umount and reboot. When I mounted the new disk ext4lazyinit started running. So it is safe to power off, on a later remount the initialisation will resume. Best get it completed ASAP though. So if ext4lazyinit isn't running it is likely finished (unless you took steps to manually disable it).
Remount the disk init_itable=0
mount -t ext4 -o remount,init_itable=0,defaults,noauto,noatime,acl,user_xattr /dev/whatever /mnt/whatever
(Providing you don't mind the init IO dominating the device)
I don't know - ho to do this with an encrypted partition? - if I should do that now since there is already a lot of data on the disk?
You could do a file system check. For external backup drives I usually do a fsck on mount and after umount. If all's well and you want to be sure do a diff. Or perhaps an rsync with --dry-run --checksum to make all the data's propertly there (but as I've noted, if you've been doing clean umounts it should be). This would also ensure that no kind of undetected bit-rot is going on (given that ext4 does not checksum data blocks). If the filesystem is unmounted dumpe2fs will tell you lots of stuff, but I don't know how to interpret that info. If the disk is new a smartctl health check would be worth doing. Of course, if time isn't an issue, you could start from scratch and use the init_itable=0 option to complete the initialisation before using the file system. I do wonder if I should be using XFS to avoid this issue, but the old rumour persists about XFS not always recovering well from power failures. I can't find hard documented evidence that those days are over, but some people seem to think so. But it's also said that XFS and Steam don't play well (which is not important in this instance), but that raises the question of what else I don't know about XFS.
This is what Yast partininer tells me about that partition (german) Gerät: Gerät: /dev/sdc1 Größe: 5.46 TiB Verschlüsselt: Ja Gerätepfad: pci-0000:00:1f.5-ata-1-part1 Geräte-ID 1: ata-WDC_WD60EFAX-68SHWN0_WD-WX21D39PL5S0-part1 Geräte-ID 2: scsi-0ATA_WDC_WD60EFAX-68S_WD-WX21D39PL5S0-part1 Geräte-ID 3: scsi-1ATA_WDC_WD60EFAX-68SHWN0_WD-WX21D39PL5S0-part1 Geräte-ID 4: scsi-350014ee2113516c9-part1 Geräte-ID 5: scsi-SATA_WDC_WD60EFAX-68S_WD-WX21D39PL5S0-part1 Geräte-ID 6: wwn-0x50014ee2113516c9-part1 Partitions-ID: Linux Native Dateisystem: Dateisystem: Ext4 Mountpoint: /home/daniel/fotos Label:
I think the above is just a summary, not too interesting. I don't think there is an official way to query what ext4lazyinit is up to.
-- Daniel Bauer photographer Basel Málaga https://www.patreon.com/danielbauer https://www.daniel-bauer.com
Cheers, Michael -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org