LVM 问题

LVM 问题

所以我最近订购了一个有 2 个 2TB 硬盘的 VPS。我安装了 Ubuntu 20.04,然后按照本指南(法语)尝试将空间合并为 4TB(或者更少一点),但现在出现了错误。

这是我的 vgdisplay -v 命令的输出:

  WARNING: Couldn't find device with uuid A6wuiG-M85U-7RT2-GF2w-TYoi-kIOu-53ofCY.
  WARNING: VG mystorage is missing PV A6wuiG-M85U-7RT2-GF2w-TYoi-kIOu-53ofCY (last written to /dev/sda4).
  --- Volume group ---
  VG Name               mystorage
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                2
  Act PV                1
  VG Size               <3.59 TiB
  PE Size               4.00 MiB
  Total PE              940679
  Alloc PE / Size       940679 / <3.59 TiB
  Free  PE / Size       0 / 0   
  VG UUID               ImvQ22-0OPa-psI3-Y80o-UknX-86Zj-Ta3S3a
   
  --- Logical volume ---
  LV Path                /dev/mystorage/mylv
  LV Name                mylv
  VG Name                mystorage
  LV UUID                xnMVfF-elmu-WoLg-3Dfy-DQiI-hdD2-ftM13f
  LV Write Access        read/write
  LV Creation host, time ns385746, 2022-03-02 01:47:37 +0000
  LV Status              NOT available
  LV Size                <3.59 TiB
  Current LE             940679
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
   
  --- Physical volumes ---
  PV Name               [unknown]     
  PV UUID               A6wuiG-M85U-7RT2-GF2w-TYoi-kIOu-53ofCY
  PV Status             allocatable
  Total PE / Free PE    463747 / 0
   
  PV Name               /dev/sdb     
  PV UUID               11ENzP-bTbI-rx22-3zCY-KGAo-qT7h-Z9z78t
  PV Status             allocatable
  Total PE / Free PE    476932 / 0

pvdisplay 的输出

  WARNING: Couldn't find device with uuid A6wuiG-M85U-7RT2-GF2w-TYoi-kIOu-53ofCY.
  WARNING: VG mystorage is missing PV A6wuiG-M85U-7RT2-GF2w-TYoi-kIOu-53ofCY (last written to /dev/sda4).
  --- Physical volume ---
  PV Name               [unknown]
  VG Name               mystorage
  PV Size               <1.77 TiB / not usable <4.09 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              463747
  Free PE               0
  Allocated PE          463747
  PV UUID               A6wuiG-M85U-7RT2-GF2w-TYoi-kIOu-53ofCY
   
  --- Physical volume ---
  PV Name               /dev/sdb
  VG Name               mystorage
  PV Size               <1.82 TiB / not usable <1.09 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              476932
  Free PE               0
  Allocated PE          476932
  PV UUID               11ENzP-bTbI-rx22-3zCY-KGAo-qT7h-Z9z78t

执行 lvmdiskscan -l 后

  WARNING: only considering LVM devices
  /dev/sdb   [      <1.82 TiB] LVM physical volume
  1 LVM physical volume whole disk
  0 LVM physical volumes

我对此真的很陌生。如何将 2 个 2TB 驱动器用作 1 个 4TB 驱动器?如能提供详细回复,我们将不胜感激。

编辑:运行后

pvcreate -vvv .... 

我注意到:

  Opened /dev/sda4 RO O_DIRECT
  /dev/sda4: size is 2 sectors
  Closed /dev/sda4
  /dev/sda4: Skipping: Too small to hold a PV
  filter caching bad /dev/sda4

所以我跑了

sudo cat /proc/partitions

并且 sda4 显示为 1 个块?

major minor  #blocks  name

   7        0      63396 loop0
   7        1      63376 loop1
   7        2      68856 loop2
   7        3      69552 loop3
   7        4      44632 loop4
   8        0 1953514584 sda
   8        1    1048576 sda1
   8        2     524288 sda2
   8        3   52428800 sda3
   8        4          1 sda4
   8       16 1953514584 sdb

相关内容