Ubuntu – Merge LUKS-partition with partition on another HDD

ecryptfshard drivelukslvmpartitioning

I just bought a 2 TB hard disk because the home partition on the old one is almost full.

What I want to do is to extend the home partition on hard disk 1 (sda2) to also include all the space on the new hard disk (sdb1). This seemed rather straight forward at first, however there's one issue. My home-partition is LUKS-encrypted.

How do I extend sda2 to also span over sdb1 and act as one single partition? My initial thought was to create a logical volume (merging sda2 and sdb1), however I wasn't able to find a guide with a scenario like my own. Any ideas?

fdisk -l output:

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0c000236

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   204802047   102400000    7  HPFS/NTFS/exFAT
/dev/sda2       204802048  1953525167   874361560   83  Linux


Disk /dev/sdd: 2000.4 GB, 2000398934016 bytes
81 heads, 63 sectors/track, 765633 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x12e102fd

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  3907029167  1953513560   83  Linux

Disk /dev/mapper/sda2_crypt: 895.3 GB, 895345184768 bytes
255 heads, 63 sectors/track, 108852 cylinders, total 1748721064 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/sda2_crypt doesn't contain a valid partition table

Best Answer

Related Question