我试图添加一个物理卷,用于添加卷组,从而在其中添加LV。可悲的是,我得到了以下错误。
[root@server ~]# pvcreate /dev/sdb1
Device /dev/sdb1 not found (or ignored by filtering).
[root@server ~]# fdisk -l /dev/sdb
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 19966.2 GB, 19966213488640 bytes
255 heads, 63 sectors/track, 2427420 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 267350 2147483647+ ee GPT
我很感激你能提供的任何帮助。这将是我第一次不得不添加一个pv,当我研究这个问题时,我没有遇到任何有帮助的东西。
操作系统为centos 6-64位
过滤器
# By default we accept every block device:
filter = [ "a/.*/" ]
# Exclude the cdrom drive
# filter = [ "r|/dev/cdrom|" ]
# When testing I like to work with just loopback devices:
# filter = [ "a/loop/", "r/.*/" ]
# Or maybe all loops and ide drives except hdc:
# filter =[ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
# Use anchors if you want to be really specific
# filter = [ "a|^/dev/hda8$|", "r/.*/" ]
分开:
parted /dev/sdb "unit s" "print"
Model: Adaptec AdaptecRAID5 (scsi)
Disk /dev/sdb: 38996510720s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
发布于 2013-08-02 21:52:42
发布于 2014-10-03 15:06:11
我发现我要么需要重新启动服务器,要么运行‘part探头/dev/sdaX’,这样pvcreate才能被正确地告知分区。
另外,fdisk没有lvm意识到,所以它发出了关于分区的错误,这让我认为存在一个更大的问题,而事实并非如此。
发布于 2018-09-03 11:32:15
请在pvcreate之前运行以下命令
partprobe
partprobe /dev/sdb
然后运行您的命令
pvcreate /dev/sdb1
注意:有时需要手动更新内核。这就是为什么需要上面的命令。
https://serverfault.com/questions/528370
复制相似问题