LVM学习逻辑卷管理创建逻辑卷遇到的问题
1 实验环境
系统 | 内核 | 发行版本 |
---|---|---|
CentOS | 2.6.32-754.2.1.el6.x86_64 | CentOS release 6.10 (Final) |
由于是最小化安装没有xfs命令,yum
安装如下包支持此命令
[root@www ~]# yum install xfsprogs
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package xfsprogs.x86_64 0:3.1.1-20.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================
Package Arch Version Repository Size
======================================================================================================
Installing:
xfsprogs x86_64 3.1.1-20.el6 base 725 k
Transaction Summary
======================================================================================================
Install 1 Package(s)
Total download size: 725 k
Installed size: 3.2 M
Is this ok [y/N]: y
Downloading Packages:
xfsprogs-3.1.1-20.el6.x86_64.rpm | 725 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : xfsprogs-3.1.1-20.el6.x86_64 1/1
Verifying : xfsprogs-3.1.1-20.el6.x86_64 1/1
Installed:
xfsprogs.x86_64 0:3.1.1-20.el6
Complete!
2 用gdisk分区对/dev/sdb
分区然后再删除后遇到以下问题
[root@www ~]# pvcreate /dev/sdb
Device /dev/sdb not found (or ignored by filtering).
3 解决方法
开始尝试使用partprobe /dev/sdb
但是没有用处,后来用如下命令解决.
[root@www ~]# dd if=/dev/urandom of=/dev/sdb bs=512 count=64
64+0 records in
64+0 records out
32768 bytes (33 kB) copied, 0.0513912 s, 638 kB/s
[root@www ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 4.3G 0 rom
sda 8:0 0 20G 0 disk
├─sda1 8