VMWare Centos 7 分区 Bad magic number 错误

VMWare Centos 7 分区 Bad magic number 错误

我继承了一个虚拟机映像,因此不能 100% 确定初始磁盘是如何设置的。

我尝试按照一些基本说明并添加一个分区来将我的图像扩展 10Gb,但似乎无法使用 resize2fs 或 xfs_growfs 提交重新调整大小的最终更改来获取此空间。

没有初始卷组。

几乎遵循了这个线程集:

https://ma.ttias.be/increase-a-vmware-disk-size-vmdk-formatted-as-linux-lvm-without-rebooting/

https://ma.ttias.be/increase-expand-xfs-filesystem-in-red-hat-rhel-7-cento7/

我可能错过了一些东西 - 感谢帮助! - 列出的摘录:

>resize2fs /dev/VolGroup1/lv1

resize2fs: Bad magic number in super-block while trying to open    /dev/VolGroup1/lv1
Couldn't find valid filesystem superblock.

>fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 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 label type: dos
Disk identifier: 0x0009cd2b

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      616447      307200   83  Linux
/dev/sda2          616448     4810751     2097152   82  Linux swap / Solaris
/dev/sda3         4810752    41943039    18566144   83  Linux
/dev/sda4        41943040    62914559    10485760   8e  Linux LVM

Disk /dev/mapper/docker-8:3-101670494-pool: 107.4 GB, 107374182400 bytes,             209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 65536 bytes

Disk /dev/mapper/VolGroup1-lv1: 10.7 GB, 10733223936 bytes, 20963328 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


>pvdisplay

--- Physical volume ---
  PV Name               /dev/sda4
  VG Name               VolGroup1
  PV Size               10.00 GiB / not usable 4.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              2559
  Free PE               0
  Allocated PE          2559
  PV UUID               cKHlxe-rqVT-XsnU-Brlv-yV6t-JhYJ-u48YGx


> vgdisplay

--- Volume group ---
  VG Name               VolGroup1
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  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               10.00 GiB
  PE Size               4.00 MiB
  Total PE              2559
  Alloc PE / Size       2559 / 10.00 GiB
  Free  PE / Size       0 / 0   
  VG UUID               q4ntG1-r2Mf-Bvme-2djz-g42f-8J4s-eyB2Sd


> lvdisplay

 --- Logical volume ---
   LV Path                /dev/VolGroup1/lv1
   LV Name                lv1
   VG Name                VolGroup1
   LV UUID                qslLy5-C7vv-DSMR-m9Lr-zHFB-8IXf-g51jch
   LV Write Access        read/write
   LV Creation host, time localhost.localdomain, 2015-12-05 09:51:18 -0800
   LV Status              available
   # open                 0
   LV Size                10.00 GiB
   Current LE             2559
   Segments               1
   Allocation             inherit
   Read ahead sectors     auto
   - currently set to     8192
   Block device           253:1

> df -k
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/sda3       18555904 18098240    457664  98% /
devtmpfs         1788224        0   1788224   0% /dev
tmpfs            1797156      148   1797008   1% /dev/shm
tmpfs            1797156     9092   1788064   1% /run
tmpfs            1797156        0   1797156   0% /sys/fs/cgroup
/dev/sda1         303788   154352    149436  51% /boot
/dev/sr0           54532    54532         0 100% /run/media/centos/CDROM

相关内容