pvcreate /dev/sdb Device /dev/sdb excluded by a filter


 

  在將Solaris的虛擬機重新安裝Linux后,准備將之前Solaris格式的磁盤重新做成PV,不過出現如下報錯:

root@host1:~# pvcreate /dev/sdb
Device /dev/sdb excluded by a filter.

看報錯信息,貌似是北lvm.conf配置filter,但是檢查配置文件,並沒有filter。

運行fdisk命令查看磁盤信息,發現輸出和普通的Linux磁盤有所區別。

root@host1:~# fdisk -l /dev/sdb
Disk /dev/sdb: 250 GiB, 268435456000 bytes, 524288000 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
Disklabel type: dos
Disk identifier: 0xf3ccdff7

Device Boot Start End Sectors Size Id Type
/dev/sdb1 63 524285951 524285889 250G 42 SFS

所以導致問題的原因是Linux並不能識別磁盤的分區表,運行parted命令重做分區表。

root@host1:~# parted /dev/sdb
GNU Parted 3.2
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel msdos
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? yes
(parted) quit
Information: You may need to update /etc/fstab.

再次運行pvcreate,可以將磁盤創建為PV啦。

root@host1:~# pvcreate /dev/sdb
WARNING: dos signature detected on /dev/sdb at offset 510. Wipe it? [y/n]: y
Wiping dos signature on /dev/sdb.
Physical volume "/dev/sdb" successfully created.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM