linux mitipath disk adding - lesson learn

本文记录了在Linux系统中使用fdisk、partx、pvcreate等命令添加多个路径磁盘时遇到的问题及解决方案,包括警告信息处理、kpartx替代partx使用、磁盘排列检查的重要性及故障即时反馈的必要性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Today I use below command to add mutiple path disk in linux system:

1: fdisk /dev/mapper/mpathlj

2:partx -a /dev/mapper/mpathlj

3: pvcreate /dev/mapper/mpathljp1

4: vgextend vg_one /dev/mapper/mpathljp1

5: lvextend -L +150G /dev/mapper/vg_one_01-lv_ora

6: resize2fs /dev/mapper/vg_one_01-lv_ora


Some problem occurred:


1: when fdisk processing, below wanring:

--
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 22: Invalid argument.
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 CAN see can use "partprobe (8) or kpartx to fix some prolems.

--- OK, next step:

---

2: when doing the second step:

partx -a /dev/mapper/mpathlj


below problem occurred:

root@A]# partx -a /dev/mapper/mpathlj
BLKPG: Invalid argument
error adding partition 1


---- using kpartx to fix this problem:

[root@A]# kpartx -a /dev/mapper/mpathlj

----- neststep:

3: pvcreate /dev/mapper/mpathljp1

 

 find the disk: /dev/mapper/mpathljp1 is not found.

when I check the path: 3: pvcreate /dev/mapper/mpathlj1 is created.

so I adjust command as :

3: pvcreate /dev/mapper/mpathlj1

---then execute below step is sucessfully:

4: vgextend vg_one /dev/mapper/mpathlj1


-- then extend the FS is successfully.

lesson learn:

1: partx -a command can only execute one time.
2: kpartx command can be used instead of partx.
3: check the disk arrangment after storage activites completed is important.
4: if the disk had problem, raise the concern immediately, donot hold the issue here.

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

shenghuiping2001

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值