扩展 virtualbox linux mint 分区

扩展 virtualbox linux mint 分区

使用 virtualbox 的 clone 和 resize 命令后,我能够根据需要将 16GB 的动态磁盘扩展到 20GB。之后,我使用带有 gparted 和 lvm2 的 debian live ISO 并使用分配的空间扩展分区。 fdisk但显示如下所示的错误,并df显示分配的空间未更改。输出fdisk

sudo fdisk -l

Disk /dev/sda: 21.0 GB, 20971520000 bytes
255 heads, 63 sectors/track, 2549 cylinders, total 40960000 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: 0x0000af96

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          501758    40959999    20229121    5  Extended
/dev/sda5          501760    40959999    20229120   8e  Linux LVM

Disk /dev/mapper/mint--vg-root: 20.7 GB, 20711473152 bytes
255 heads, 63 sectors/track, 2518 cylinders, total 40452096 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/mint--vg-root doesn't contain a valid partition table

df -h

$ df -h
Filesystem                 Size  Used Avail Use% Mounted on
/dev/mapper/mint--vg-root   12G   11G   29M 100% /
none                       4.0K     0  4.0K   0% /sys/fs/cgroup
udev                       734M  4.0K  734M   1% /dev
tmpfs                      150M  1.1M  149M   1% /run
none                       5.0M     0  5.0M   0% /run/lock
none                       749M  964K  748M   1% /run/shm
none                       100M   12K  100M   1% /run/user
/dev/sda1                  236M   49M  176M  22% /boot
/dev/loop0                 526M   82M  434M  16% /var/cache/openafs
AFS                        2.0T     0  2.0T   0% /afs

输出lsblk

$ sudo pvs
  PV         VG      Fmt  Attr PSize  PFree 
  /dev/sda5  mint-vg lvm2 a--  15.76g 24.00m
user@debian:~$ lsblk
NAME       MAJ:MIN RM    SIZE RO TYPE MOUNTPOINT
sda          8:0    0   19.5G  0 disk 
├─sda1       8:1    0    243M  0 part 
├─sda2       8:2    0      1K  0 part 
└─sda5       8:5    0   15.8G  0 part 
  ├─mint--vg-root
           254:0    0   11.8G  0 lvm  
  └─mint--vg-swap_1
           254:1    0      4G  0 lvm  
sr0         11:0    1    1.1G  0 rom  /lib/live/mount/medium
loop0        7:0    0 1008.4M  1 loop /lib/live/mount/rootfs/filesystem.squashfs

另外pvslvs正如vgs所问的:

$ sudo pvs
  PV         VG      Fmt  Attr PSize  PFree 
  /dev/sda5  mint-vg lvm2 a--  15.76g 24.00m
$ sudo vgs
  VG      #PV #LV #SN Attr   VSize  VFree 
  mint-vg   1   2   0 wz--n- 15.76g 24.00m
$ sudo lvs
  LV     VG      Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root   mint-vg -wi-a----- 11.74g                                                    
  swap_1 mint-vg -wi-a-----  4.00g                                                    

我想要扩展分区的客户操作系统是 Linux Mint,文件系统为 lvm2。我也尝试过使用以下命令中的指导https://www.centos.org/docs/5/html/Cluster_Logical_Volume_Manager/lv_extend.html但错误消息相同( Disk /dev/mapper/mint--vg-root doesn't contain a valid partition table)。我遗漏了什么?

相关内容