root@dell-PowerEdge-T30:~# pvcreate /dev/sdb
Device /dev/sdb not found (or ignored by filtering).
首頁查看其硬盤的情況,發現 /dev/sdb存在之后調整修改
lfdisk -l
root@dell-PowerEdge-T30:~# fdisk /dev/sdb
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
WARNING: The size of this disk is 4.0 TB (4000787030016 bytes).
DOS partition table format can not be used on drives for volumes
larger than (2199023255040 bytes) for 512-byte sectors. Use parted(1) and GUID
partition table format (GPT).
The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.
命令(輸入 m 獲取幫助): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): p
分區號 (1-4,默認為 2): 1
Partition 1 is already defined. Delete it before re-adding it.
命令(輸入 m 獲取幫助): t
Selected partition 1
Hex code (type L to list codes): 8e
Changed system type of partition 1 to 8e (Linux LVM)
命令(輸入 m 獲取幫助): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: 設備或資源忙.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
root@dell-PowerEdge-T30:~# pvcreate /dev/sdb
Device /dev/sdb not found (or ignored by filtering).
root@dell-PowerEdge-T30:~# dd if=/dev/urandom of=/dev/sdb bs=512 count=64
記錄了64+0 的讀入
記錄了64+0 的寫出
32768字節(33 kB)已復制,0.00555416 秒,5.9 MB/秒
root@dell-PowerEdge-T30:~# pvcreate /dev/sdb
Can't open /dev/sdb exclusively. Mounted filesystem?