增加 VeraCrypt 卷大小

增加 VeraCrypt 卷大小

我在 Ubuntu 16.04.3 LTS 上使用 VeraCrypt 进行了以下设置:

root@ubuntu:/veracrypt# df -h
Filesystem                 Size  Used Avail Use% Mounted on
udev                       477M     0  477M   0% /dev
tmpfs                      100M  3.2M   97M   4% /run
/dev/sda1                  8.8G  2.9G  5.5G  34% /
tmpfs                      497M     0  497M   0% /dev/shm
tmpfs                      5.0M     0  5.0M   0% /run/lock
tmpfs                      497M     0  497M   0% /sys/fs/cgroup
tmpfs                      100M     0  100M   0% /run/user/1000
/dev/mapper/testvg-testlv   97M   71M   19M  79% /veracrypt
/dev/mapper/veracrypt1      14M   13M     0 100% /backup

root@ubuntu:/veracrypt# ls -alsh /veracrypt/vc.vol
56M -rw------- 1 root root 55M Aug 21 17:17 /veracrypt/vc.vol

root@ubuntu:/veracrypt# veracrypt -l
1: /veracrypt/vc.vol /dev/mapper/veracrypt1 /backup

root@ubuntu:/veracrypt# ls -alsh /backup/
total 13M
1.0K drwxr-xr-x  3 root root 1.0K Aug 21 16:44 .
4.0K drwxr-xr-x 25 root root 4.0K Aug 21 17:18 ..
1.0K -rw-r--r--  1 root root  589 Aug 21 16:40 df.txt
 11M -rw-r--r--  1 root root  11M Aug 21 16:40 file1
1.9M -rw-r--r--  1 root root 1.9M Aug 21 16:40 file2
 12K drwx------  2 root root  12K Aug 21 16:36 lost+found
root@ubuntu:/veracrypt#

如何增加 VeraCrypt 容器 (/veracrypt/vc.vol) 的大小?PS 我已经尝试了此处介绍的解决方案扩展 VeraCrypt 容器大小 没有任何运气。这是我尝试扩展音量的方法:

root@ubuntu:~# veracrypt -l
1: /veracrypt/vc.vol /dev/mapper/veracrypt1 /backup

root@ubuntu:~# mount | grep /veracrypt
/dev/mapper/testvg-testlv on /veracrypt type ext4 (rw,relatime,data=ordered)
/dev/mapper/veracrypt1 on /backup type ext4 (rw,relatime,data=ordered)

root@ubuntu:~# resize2fs /dev/mapper/veracrypt1
resize2fs 1.42.13 (17-May-2015)
The filesystem is already 15104 (1k) blocks long.  Nothing to do!

我的问题:在上述场景中,容器的增加是否可行?

有关分区/卷的附加信息:

root@ubuntu:~# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sdb1
  VG Name               testvg
  PV Size               5.00 GiB / not usable 3.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              1279
  Free PE               1254
  Allocated PE          25
  PV UUID               wiaSM7-C85l-gX2R-jJko-1Iz6-OUnA-jVSv8e

root@ubuntu:~# vgdisplay
  --- Volume group ---
  VG Name               testvg
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  9
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               5.00 GiB
  PE Size               4.00 MiB
  Total PE              1279
  Alloc PE / Size       25 / 100.00 MiB
  Free  PE / Size       1254 / 4.90 GiB
  VG UUID               6vYCq6-72AH-wdg0-AG1c-posg-EFpr-8VaBtA

相关内容