调整 luks 加密分区大小以填充可用空间

调整 luks 加密分区大小以填充可用空间

我正在尝试使用 HDD 上的全部可用空间(1TB,从 500GB HDD 迁移)。我的分区已加密 (LUKS)。

我尝试基于,但是lvresize似乎没有将我的分区扩展到 ~ 1TB:

sudo lvresize -l+100%FREE /dev/mapper/vg_oc2462701832-lv_root
  Size of logical volume vg_oc2462701832/lv_root unchanged from 449.47 GiB (115065 extents).
  Logical volume vg_oc2462701832/lv_root successfully resized.

我的设置:

sudo fdisk -l /dev/sda
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 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
Disklabel type: dos
Disk identifier: 0x00078ba5

Device     Boot   Start        End    Sectors   Size Id Type
/dev/sda1  *       2048    2050047    2048000  1000M 83 Linux
/dev/sda2       2050048 1953521663 1951471616 930.5G 83 Linux

sudo vgs -o +vg_free_count,vg_extent_count
  VG              #PV #LV #SN Attr   VSize   VFree   Free   #Ext  
  vg_oc2462701832   1   1   0 wz--n- 930.53g 481.06g 123151 238216

我也尝试过使用blivet-gui 调整 LVM 的大小(来自 Fedora 26 live CD),如下所示:

调整大小

导致以下操作:

调整动作大小

我收到以下错误:

呃

更新:

sudo vgdisplay vg_oc2462701832
  --- Volume group ---
  VG Name               vg_oc2462701832
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  14
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               930.53 GiB
  PE Size               4.00 MiB
  Total PE              238216
  Alloc PE / Size       115065 / 449.47 GiB
  Free  PE / Size       123151 / 481.06 GiB
  VG UUID               3HqxOa-RJb1-aQAr-C5fl-w5Vj-mEE9-ukZbqC

而且:

sudo pvdisplay
  --- Physical volume ---
  PV Name               /dev/mapper/luks-1da0b326-4b3f-4e7c-8319-908f0fa745d4
  VG Name               vg_oc2462701832
  PV Size               930.53 GiB / not usable 1.00 MiB
  Allocatable           NO
  PE Size               4.00 MiB
  Total PE              238216
  Free PE               123151
  Allocated PE          115065
  PV UUID               J8pq9i-HkjC-Ch1s-bo4p-ejvQ-FB5q-w3wtax

相关内容