我正在尝试扩展我的当前磁盘,但是当我使用最新的分区执行pvcreate时,它说下面没有找到命令的详细信息。
我注意到的一件事是磁盘标签类型在分区后从DOS更改为GPT,我不知道这意味着什么
login as: root
root@10.10.222.14'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发布于 2017-10-11 12:48:16
您发布的输出看起来有点不一致。首先,您创建了/dev/sda4 4分区,但是后面没有列出它。它真的存在吗?
如果是,很可能在/dev/sda4 4分区和pvcreate开始时有一些垃圾无法接受。试着清理前几兆字节,比如:
dd if=/dev/zero of=/dev/sda4 bs=1M count=20我们最近也遇到过类似的情况,我们刚刚尝试为新的VG使用完整/dev/sdb磁盘。
您已经创建了sda4,尽管您还没有sda4 2/3:
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): p
Partition number (2-4, default 2): 4这看起来像两个同名的不同节点。
https://unix.stackexchange.com/questions/397443
复制相似问题