From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mail.saout.de (Postfix) with ESMTP for ; Wed, 2 Sep 2009 07:13:35 +0200 (CEST) Message-ID: <4A9DFEFA.205@redhat.com> Date: Wed, 02 Sep 2009 07:13:30 +0200 From: Milan Broz MIME-Version: 1.0 References: <200909020301.XAA06354@out-of-band.media.mit.edu> In-Reply-To: <200909020301.XAA06354@out-of-band.media.mit.edu> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] cryptsetup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: f-dm-c@media.mit.edu Cc: dm-crypt@saout.de f-dm-c@media.mit.edu wrote: > Shouldn't there be a "cryptsetup resize" in there somewhere? > [Presumably before you resized the ext2] There is no device size stored in LUKS header, only data offset. So after luksClose/luksOpen the device has always new size, of course if you increase size extended part of device still contains old data. You can also resize device online - just use "cryptsetup resize ". (The --size parameter is not mandatory, man page is wrong here, if --size is not provided, it will expand to whole device). So if you have LUKS on partition, and you want extend it: extend partition -> resize crypt mapping (or deactivate/activate) -> resize fs For reducing just do it in reverse order resize fs -> deactivate cryptsetup -> reduce partition. (if you need it online, you will have to specify --size for cryptsetup resize, note that --size is in sectors) Milan -- mbroz@redhat.com