Return-Path: Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Sun, 26 Jun 2016 12:46:46 +0200 (CEST) Received: by mail-wm0-x241.google.com with SMTP id r201so17157563wme.0 for ; Sun, 26 Jun 2016 03:46:46 -0700 (PDT) References: <20160626033901.GA10467@pyropus.ca> From: Milan Broz Message-ID: Date: Sun, 26 Jun 2016 12:46:43 +0200 MIME-Version: 1.0 In-Reply-To: <20160626033901.GA10467@pyropus.ca> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] Does luksFormat write the full size of the device? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Charles Cazabon , dm-crypt@saout.de On 06/26/2016 05:39 AM, Charles Cazabon wrote: > Hi, > > I'm currently initializing a fairly large LUKS crypt device, about 33TiB. > I've done this before, but not for quite a while, so I can't remember how long > it normally takes. My current cryptsetup invocation has been running for > about 24 hours, taking 100% of one CPU core for that entire time. If there's > I/O happening, iostat isn't showing it. > > If `cryptsetup luksFormat` has to write the entire contents of the underlying > block device, then this length of time is reasonable - but I don't recall if > it has to do that. No, format doesn't write the whole device. Can you please post output of running commant with added --debug switch? (Just up to point it starts to eat CPU cycles.) (I think it loops in PBKDF2 benchmark, I have seen some unexpected breakage here with recent kernel, but without debug log it is just guess.) > Is this long runtime normal for initialization of a device of this size? No. If the default iteration time (1 or 2 seconds) is not changes, format should be done in max 4-5 seconds. Thanks, Milan