物理ボリュームの作成時にデバイス/dev/sda4が見つかりませんエラー

物理ボリュームの作成時にデバイス/dev/sda4が見つかりませんエラー

現在のディスクを拡張しようとしていますが、pvcreate最新のパーティションを使用すると、以下にコマンドの詳細が見つからないというメッセージが表示されます。

私が気づいた1つは、パーティションを分割した後、ディスクラベルの種類がDOSからGPTに変わったことです。これが何を意味するのかよく分からない。

login as: root
[email protected]'s password:
Last login: Wed Oct 11 01:03:01 2017 from 10.10.222.122
[root@dpnjsv2-centos7-base ~]# fdisk /dev/sda
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): n
Partition type:
   p   primary (1 primary, 0 extended, 3 free)
   e   extended
Select (default p): p
Partition number (2-4, default 2): 4
First sector (41943040-73400319, default 41943040):
Using default value 41943040
Last sector, +sectors or +size{K,M,G} (41943040-73400319, default 73400319):
Using default value 73400319
Partition 4 of type Linux and of size 15 GiB is set




Command (m for help): t


Partition number (1,4, default 4): 4


Hex code (type L to list all codes): 8e


Changed type of partition 'Linux' to 'Linux LVM'

Command (m for help): p

Disk /dev/sda: 37.6 GB, 37580963840 bytes, 73400320 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
Disk label type: dos
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1    41943039    20971519+  ee  GPT
/dev/sda4        41943040    73400319    15728640   8e  Linux LVM


Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
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.
You have new mail in /var/spool/mail/root


[root@dpnjsv2-centos7-base ~]# partprobe


[root@dpnjsv2-centos7-base ~]# pvcreate /dev/sda4
  **Device /dev/sda4 not found (or ignored by filtering).**
You have new mail in /var/spool/mail/root
[root@dpnjsv2-centos7-base ~]# fdisk /dev/sda
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p

Disk /dev/sda: 37.6 GB, 37580963840 bytes, 73400320 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
Disk label type: gpt


#         Start          End    Size  Type            Name
 1         2048       411647    200M  EFI System      EFI System Partition
 2       411648      1435647    500M  Microsoft basic
 3      1435648     41940991   19.3G  Linux LVM

Command (m for help): pvcreate 1

Disk /dev/sda: 37.6 GB, 37580963840 bytes, 73400320 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
Disk label type: gpt


#         Start          End    Size  Type            Name
 1         2048       411647    200M  EFI System      EFI System Partition
 2       411648      1435647    500M  Microsoft basic
 3      1435648     41940991   19.3G  Linux LVM

ベストアンサー1

投稿した出力は少し一貫性がないようです。まず/dev/sda4パーティションを作成しましたが、リストには表示されませんでした。実際に存在しますか?

もしそうなら、/dev/sda4パーティションの先頭にちょっとしたゴミがあり、pvcreateがそれを受け入れられない可能性があります。たとえば、最初の数メガバイトをまとめてみてください。

dd if=/dev/zero of=/dev/sda4 bs=1M count=20

最近、/dev/sdbディスク全体を新しいVGとして使用しようとした同様の状況が発生しました。


まだsda2/3はありませんが、sda4を作成しました。

Partition type:
   p   primary (1 primary, 0 extended, 3 free)
   e   extended
Select (default p): p
Partition number (2-4, default 2): 4

これは、同じ名前を持つ2つの異なるノードのように見えます。

おすすめ記事