Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tN3c_iocFDls for ; Thu, 30 Jan 2014 19:50:16 +0100 (CET) Received: from awesome.dsw2k3.info (awesome.dsw2k3.info [IPv6:2a01:198:661:1f::3]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.saout.de (Postfix) with ESMTPS for ; Thu, 30 Jan 2014 19:50:16 +0100 (CET) Date: Thu, 30 Jan 2014 19:50:10 +0100 From: Matthias Schniedermeyer Message-ID: <20140130185010.GB12303@citd.de> References: <20140130160443.GA31280@apartia.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140130160443.GA31280@apartia.fr> Subject: Re: [dm-crypt] moving/resizing a dm-crypt partition List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Louis-David Mitterrand Cc: dm-crypt@saout.de On 30.01.2014 17:04, Louis-David Mitterrand wrote: > Hi, > > My linux system is on a dm-crypt volume with btrfs on /dev/sda6. As I > just recovered 100GB from windows (/dev/sda5) I'd like to merge 5 and 6 > to have a larger dm-crypt volume. Here is the disk layout: > > 1 2048 2050047 1000.0 MiB 2700 Basic data partition > 2 2050048 2582527 260.0 MiB EF00 EFI system partition > 3 2582528 4630527 1000.0 MiB 8300 Basic data partition > 4 4630528 4892671 128.0 MiB 0C01 Microsoft reserved part > 5 4892672 218167295 101.7 GiB 8300 Basic data partition > 6 464865280 1000215182 255.3 GiB 8300 Linux filesystem > > What is the best strategy to acheive that? I'm thinking of booting a > live cd, creating a new dm-crypt volume on 5, copy the system from 6 to > 5, remove 6, resize partition 5, cryptfs resize 5, btrfs resize 5. As it is BTRFS, just create a second dm-crypt volume and add that to the existing BTRFS. As BTRFS can span several physical volumes, creating one big partition isn't strictly necessary. If you use the same password and have "luck" that your dm-crypt setup-script in initrd/initramsfs opens both dm-crypt devices in one go, there shouldn't even be any discomfort by that solution. -- Matthias