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灵活扩展了。

相关内容

热门资讯

不止聂永真,九把刀拿了上亿补助... 海峡导报综合报道 台电(台湾电力公司)近日更换新的LOGO引发争议,尤其是现在台电还在亏损3000多...
阿根廷法医披露马拉多纳去世前状... 阿根廷一名法医日前在足球名宿迭戈·马拉多纳死亡案件的审判中表示,马拉多纳去世前遭受了约12个小时的痛...
斯洛伐克总理在俄表态:我是欧盟... 【环球网报道 记者 索炎琦】据俄罗斯《消息报》《乌克兰真理报》等媒体报道,斯洛伐克总理菲佐8日在莫斯...
日媒炒作:日本政府计划新设“对... 【环球网报道 记者 林泽宇】据日本《读卖新闻》、全日本新闻网5月9日报道,日本政府计划在2027年末...
与伊朗战争有关,阿联酋被曝大规... 美以对伊朗的战争搅动地区局势,巴基斯坦致力于通过外交途径结束战争。然而据美媒爆料,遭到伊朗猛烈打击的...
腾格里沙漠的光伏电,一度只值5... 【文/观察者网科工力量 石燕红】4月下旬,我们沿着腾格里沙漠的南缘跑了几天。在宁夏中卫,国家能源集团...
郑州古荥城市更新一期097地块... 【大河财立方 记者 陈诗昂】 郑州市惠济区古荥城市更新(一期)项目(下称古荥一期项目)迎来新进展。5...
赋能高端算力自主化!我国首台双... 由中国科学院牵头,联合武汉大学、华中科技大学和武汉量子技术研究院等团队联合研发的国内首台双核原子量子...
凝聚品牌力量 共筑美好未来——... 五月的莫干山,竹林叠翠,生机盎然。5月9日至12日,2026世界品牌莫干山大会将在浙江省湖州市德清县...
四部门发文!促进人工智能与能源... 【大河财立方消息】 5月8日,据国家能源局微信公众号,国家能源局近日会同国家发展改革委、工业和信息化...