Device /dev/sdb not found (or ignored by filtering
admin
2023-03-09 19:43:39
0
    最近想将服务器的本地硬盘通过LVM来灵活管理,具体问题如下:

            [root@localhost ~]# pvcreate /dev/sdb

Device /dev/sdb not found (or ignored by filtering).

[root@localhost ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 2.9T 0 disk
sda 8:0 0 744.1G 0 disk
├─sda1 8:1 0 5G 0 part /boot
└─sda2 8:2 0 739.1G 0 part
├─VolGroup-LogVol01 (dm-0) 253:0 0 390.6G 0 lvm /
└─VolGroup-LogVol00 (dm-1) 253:1 0 260G 0 lvm [SWAP]
sdb 8:16 0 21.8T 0 disk

[root@localhost soft]# fdisk -l /dev/sdb

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sdb: 24000.0 GB, 23999996231680 bytes
255 heads, 63 sectors/track, 2917833 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 1 267350 2147483647+ ee GPT
通过上面可以看到/dev/sdb默认添加了一个sdb1的磁盘分区,并且为GPT分区;在此不想
折腾GPT因为管理很不方便,通过一些资料可以做如下操作解决问题:
[root@localhost soft]# 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 24.0 TB (23999996231680 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).

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').

Command (m for help): p

Disk /dev/sdb: 24000.0 GB, 23999996231680 bytes
255 heads, 63 sectors/track, 2917833 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 1 267350 2147483647+ ee GPT

Command (m for help): d
Selected partition 1

Command (m for help): p

Disk /dev/sdb: 24000.0 GB, 23999996231680 bytes
255 heads, 63 sectors/track, 2917833 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System

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

Calling ioctl() to re-read partition table.
Syncing disks.
通过上面可以看到删除其磁盘对应的分区,前提是没有数据(切记)
[root@localhost soft]# pvcreate /dev/sdb
Physical volume "/dev/sdb" successfully created
[root@localhost soft]# pvdisplay

"/dev/sdb" is a new physical volume of "21.83 TiB"
--- NEW Physical volume ---
PV Name /dev/sdb
VG Name
PV Size 21.83 TiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0

创建PV成功,之后的管理可以用LVM灵活扩展了。

相关内容

热门资讯

直击台风“红霞”登陆:楼在动,... 7月26日凌晨4时,惠东县小径湾。记者此刻正在一栋临海高层楼房的客厅里,双腿微微发颤——不是因为冷,...
人民日报:查处携程垄断案释放反... 林丽鹂 《人民日报》(2026年07月26日 第02版)携程垄断案的查处是平台经济反垄断常态化监管的...
以总理计划向特朗普递交伊朗情报 △以色列总理内塔尼亚胡(资料图)当地时间7月25日,总台记者自以色列方面获悉,以总理内塔尼亚胡及其访...
原创 手... 以前购买的手机想要用3天不充电,基本上是不可能的,但这两年手机电池技术有大突破,非重度使用的情况下,...
咪咕数媒亮相第34届全国图书交... 潮新闻客户端 记者 王景平 7月24日,第34届全国图书交易博览会盛大举办。作为数字文化领域的核心央...
王兴兴和他的机甲机器人登上《时... 当地时间7月23日,宇树科技创始人兼首席执行官王兴兴与该公司突破性的载人机甲机器人GD01共同登上美...
APEC论坛聚焦亚太人工智能普... 这是7月23日在成都街头拍摄的会议主题装置。当日,2026年亚太经合组织(APEC)数字和人工智能部...
菲尔兹奖得主王虹4岁不慎烫伤,... 中国数学家王虹、邓煜获得菲尔兹奖,这是中国籍数学家首次获得这一奖项。王虹1991年出生在广西桂林平乐...
美媒:特朗普下令暂停空袭伊朗 美国“Axios”新闻网7月25日援引知情人士报道,特朗普24日指示美军不得对伊朗发动新的打击,打破...
法国野火“创历史纪录”:政坛吵... 综合法媒BFM新闻台、《费加罗报》报道,当地时间7月25日中午,内政部长努内兹(Laurent Nu...