首页  :: 新随笔  :: 管理

创建PV失败处理

Posted on 2021-12-24 00:15  高&玉  阅读(635)  评论(0编辑  收藏  举报

问题现象

创建PV(物理卷)

[root]# pvcreate /dev/sdn
  Device /dev/sdn excluded by a filter.

因/dev/sdn之前创建过分区sdn1,后来删除了sdn1分区,pvcreate扫描/dev/sdn存在分区信息所以才忽略创建PV。

处理过程

将/dev/sdn格式华为一个分区

[root]# parted /dev/sdn
GNU Parted 3.1
Using /dev/sdn
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel msdos	#支持msdos和gpt两种格式(msdos最大支持2T,gpt不受限)                                                    
Warning: The existing disk label on /dev/sdn 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.

 

重新创建PV(物理卷)

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