LVM 无法添加新驱动器的问题

LVM 无法添加新驱动器的问题
Fdisk, lv/pv/vgdisplay:

anubis@Anubis:~$ sudo fdisk -l
[sudo] password for anubis:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
45 heads, 63 sectors/track, 344540 cylinders, total 976773168 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: 0x1b231dca 

Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048   976773167   488385560   8e  Linux LVM

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
45 heads, 63 sectors/track, 344540 cylinders, total 976773168 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: 0x85e38cb4

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048   976773167   488385560   8e  Linux LVM

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
81 heads, 63 sectors/track, 382818 cylinders, total 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
Disk identifier: 0x6b680487

Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048  1953525167   976761560   8e  Linux LVM

Disk /dev/sdd: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00009d51

Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *        2048   195311615    97654784   83  Linux
/dev/sdd2       195311616  3907029167  1855858776   8e  Linux LVM

Disk /dev/mapper/vgpool-storage: 2900.5 GB, 2900499628032 bytes
255 heads, 63 sectors/track, 352632 cylinders, total 5665038336 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/vgpool-storage doesn't contain a valid partition table
anubis@Anubis:~$ sudo lvdisplay
--- Logical volume ---
LV Name                /dev/vgpool/storage
VG Name                vgpool
LV UUID                C56qjD-X92X-HguJ-1b3n-OOUN-dDBE-fo1fN0
LV Write Access        read/write
LV Status              available
# open                 0
LV Size                2.64 TiB
Current LE             691533
Segments               2
Allocation             inherit
Read ahead sectors     auto
- currently set to     256
Block device           252:0

anubis@Anubis:~$ sudo vgdisplay
--- Volume group ---
VG Name               vgpool
System ID
Format                lvm2
Metadata Areas        2
Metadata Sequence No  20
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                1
Open LV               0
Max PV                0
Cur PV                2
Act PV                2
VG Size               2.64 TiB
PE Size               4.00 MiB
Total PE              691556
Alloc PE / Size       691533 / 2.64 TiB
Free  PE / Size       23 / 92.00 MiB
VG UUID               XAgeo7-kfnx-ew9Z-qFEn-AQzZ-26Fv-YDLr8D

anubis@Anubis:~$ sudo pvdisplay
--- Physical volume ---
PV Name               /dev/sdc1
VG Name               vgpool
PV Size               931.51 GiB / not usable 3.00 MiB
Allocatable           yes (but full)
PE Size               4.00 MiB
Total PE              238466
Free PE               0
Allocated PE          238466
PV UUID               vgZcil-AgYl-nOHy-oPq7-pc7m-ybDV-qpwHs5

--- Physical volume ---
PV Name               /dev/sdd2
VG Name               vgpool
PV Size               1.73 TiB / not usable 2.09 MiB
Allocatable           yes
PE Size               4.00 MiB
Total PE              453090
Free PE               23
Allocated PE          453067
PV UUID               P9pAmT-cPAD-bS2H-XGcN-9wpU-6c4g-QcPJyL

anubis@Anubis:~$ sudo vgextend vgpool /dev/sda1
Device /dev/sda1 not found (or ignored by filtering).
Unable to add physical volume '/dev/sda1' to volume group 'vgpool'.

sudo pvscan
[sudo] password for anubis:
PV /dev/sdc1   VG vgpool   lvm2 [931.51 GiB / 0    free]
PV /dev/sdd2   VG vgpool   lvm2 [1.73 TiB / 92.00 MiB free]
Total: 2 [2.64 TiB] / in use: 2 [2.64 TiB] / in no VG: 0 [0   ]

我有一个包含两个物理卷的卷组设置。它工作正常,没有问题。我正在尝试添加 /dev/sda1 和 /dev/sdb1。如您所见,两者都已分区和格式化。前两个驱动器添加得很好,而其他两个驱动器却出现错误。

我真的已经走到了生命的尽头,我需要帮助。

此服务器的主要用途是作为文件服务器。它正在运行

Ubuntu 服务器 12.04.2
四个 SATA 驱动器,2x 500GB、1x 1TB 和 1x 2TB。

我在 2TB 上有一个单独的扩展分区,用于存放 ubuntu 及其所有需要的资料。我想将其余部分用作存放音乐、电影和照片的大型存储空间。

答案1

事实证明,sda1 和 sdb1 都保留了以前的卷组关联。我曾以为,我创建的第一个 vg 的所有痕迹(作为测试)都已被删除。但事实并非如此。为了擦除驱动器,我需要执行以下操作:

sudo pvremove /dev/sdb1 -ff
Labels on physical volume "/dev/sdb1" successfully wiped

之后,我能够通过pvcreate和成功重新添加驱动器vgextend。剩下的就轻而易举了。

相关内容