PowerPath:如何在 PowerPath LUN 上没有分区表的情况下扩展 Linux 文件系统
Summary: PowerPath:如何在 PowerPath LUN 上没有分区表的情况下扩展 Linux 文件系统。
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Symptoms
客户尝试扩展在本机 Linux LVM 中映射的本机 Linux LVM 文件系统中的两个 SAN LUN,但失败。
通过 PowerPath 5.3 SP 1(内部版本 111)向运行 Linux 2.6.18-128.el5 的 RHEL5 和 RHEL6 服务器提供多个 LUN 的VNX5500
客户已在 VNX 上扩展这两个 LUN 的用户容量。
以前的容量为 82 GB 和 60 GB,后来分别扩展到 136 GB 和 90 GB。
客户遵循的流程:
lvdisplay -v /dev/[volgroup]/[logicalvolume]- 识别物理设备fdisk -l /dev/[device]- 验证分区表df -h /[mountpoint]- 验证现有容量grep mpt /sys/class/scsi_host/host?/proc_name- 识别要重新扫描的 SCSI 总线echo "- - -" > /sys/class/scsi_host/hostX/scan- 重新扫描设备“hostX”pvs /dev/[device]- 检查物理卷大小pvresize /dev/[device]- 将物理卷增加到新的 LUN 大小pvs /dev/[device]- 检查新的物理卷大小vgscan- 重建卷组缓存vgs [volgroup]- 验证卷组信息lvextend -l +100%FREE /dev/[volgroup]/[logicalvolume]- 扩展逻辑卷以填充磁盘resize2fs /dev/[volgroup]/[logicalvolume]- 调整逻辑卷上的文件系统大小df -h /[mountpoint]- 验证新容量
PowerPath 装载的 LUN 似乎没有有效的分区表:
fdisk -l /dev/emcpowercb Disk /dev/emcpowercb: 91.2 GB, 91268055040 bytes 255 heads, 63 sectors/track, 11096 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/emcpowercb doesn't contain a valid partition table
/dev/emcpowercb 的前 512 个字节如下所示:
hexdump -Cn512 /dev/emcpowercb 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000200
但是,LUN 已装载,并且可供系统访问(例如):
df -h /DCCDBUNIX/data01 Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg2dccdbnx2pd01-lvdccdbnxd01 84G 67G 13G 84% /DCCDBUNIX/data01
上面的示例适用于以下 PowerPath 映射 LUN:
vgdisplay -v vg2dccdbnx2pd01 Using volume group(s) on command line Finding volume group "vg2dccdbnx2pd01" --- Volume group --- VG Name vg2dccdbnx2pd01 --- Logical volume --- LV Name /dev/vg2dccdbnx2pd01/lvdccdbnxd01 VG Name vg2dccdbnx2pd01 LV Size 85.00 GB Block device 253:9 --- Physical volumes --- PV Name /dev/emcpowercb Total PE / Free PE 21759 / 0
Cause
即使 PowerPath LUN 上没有分区表,也尝试扩展 Linux 文件系统?
Resolution
根据 Red Hat,使用命令显示物理卷是正确的。
pvs -o+pv_used /dev/[pseudo_device]
然后,将磁盘添加到系统并在添加的磁盘上以条带形式扩展卷组时。
显示扩展原始 LUN 时未使用的原始磁盘空间。
pvs -av /dev/[pseudo_device]
除了从主机扫描设备之外,所有 PowerPath 本机设备的 blockdev 命令都按设计正常工作:
blockdev --rereadpt /dev/sds blockdev --rereadpt /dev/sdbr blockdev --rereadpt /dev/sddq
下面将通配符回显到 /sys/class/scsi_host/hostX/scan 的命令不起作用,以便使用主机重新扫描整个 HBA 以刷新 LUN 设备。
echo "1" >/sys/block/sds/device/rescan echo "1" >/sys/block/sdbr/device/rescan echo "1" >/sys/block/sddq/device/rescan
最后一步,在 Unisphere 中扩展 LUN 必须处于根目录中才能正常工作。
# powermt display dev=emcpowerai Pseudo name=emcpowerai VNX ID=APMXXXXXXXXXXX [xxxxx] Logical device ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [xxxxx_dccdbnx2i02_RV] state=alive; policy=CLAROpt; queued-IOs=0 Owner: default=SP A, current=SP A Array failover mode: 4 ============================================================================== --------------- Host --------------- - Stor - -- I/O Path -- -- Stats --- ### HW Path I/O Paths Interf. Mode State Q-IOs Errors ============================================================================== 3 lpfc sds SP A5 active alive 0 0 3 lpfc sdbr SP B5 active alive 0 0 4 lpfc sddq SP A4 active alive 0 0 pvs -o+pv_used,dev_size |grep /dev/emcpowerai /dev/emcpowerai vg2dccdbnx2qi01 lvm2 a-- 60.00G 0 60.00G 60.00G umount /DCCDBUNIX/index01 blockdev --rereadpt /dev/sds blockdev --rereadpt /dev/sdbr blockdev --rereadpt /dev/sddq pvs -o+pv_used,dev_size |grep /dev/emcpowerai /dev/emcpowerai vg2dccdbnx2qi01 lvm2 a-- 60.00G 0 60.00G 92.00G pvresize /dev/emcpowerai Physical volume "/dev/emcpowerai" changed 1 physical volume(s) resized / 0 physical volume(s) not resized pvs -o+pv_used,dev_size |grep /dev/emcpowerai /dev/emcpowerai vg2dccdbnx2qi01 lvm2 a-- 92.00G 32.00G 60.00G 92.00G pvscan |grep '/dev/emcpowerai' PV /dev/emcpowerai VG vg2dccdbnx2qi01 lvm2 [92.00 GB / 32.00 GB free] vgscan |grep 'vg2dccdbnx2qi01' Found volume group "vg2dccdbnx2qi01" using metadata type lvm2 vgs |grep vg2dccdbnx2qi01 vg2dccdbnx2qi01 1 1 0 wz--n- 92.00G 32.00G lvextend -l +100%FREE /dev/vg2dccdbnx2qi01/lvdccdbnxi01 lvextend -l +100%FREE /dev/vg2dccdbnx2qi01/lvdccdbnxi01 Extending logical volume lvdccdbnxi01 to 92.00 GB Logical volume lvdccdbnxi01 successfully resized resize2fs /dev/vg2dccdbnx2qi01/lvdccdbnxi01 resize2fs 1.39 (29-May-2006) Please run 'e2fsck -f /dev/vg2dccdbnx2qi01/lvdccdbnxi01' first. e2fsck -f /dev/vg2dccdbnx2qi01/lvdccdbnxi01 e2fsck 1.39 (29-May-2006) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /dev/vg2dccdbnx2qi01/lvdccdbnxi01: 43/7864320 files (16.3% non-contiguous), 12034277/15727616 blocks resize2fs /dev/vg2dccdbnx2qi01/lvdccdbnxi01 resize2fs 1.39 (29-May-2006) Resizing the filesystem on /dev/vg2dccdbnx2qi01/lvdccdbnxi01 to 24116224 (4k) blocks. The filesystem on /dev/vg2dccdbnx2qi01/lvdccdbnxi01 is now 24116224 blocks long. mount /DCCDBUNIX/index01 df -h /dev/mapper/vg2dccdbnx2qi01-lvdccdbnxi01 91G 45G 41G 53% /DCCDBUNIX/index01
另一种选择是重新启动,这也有效,因为它会创建完全重新扫描。
Affected Products
PowerPath for LinuxProducts
PowerPath for LinuxArticle Properties
Article Number: 000064342
Article Type: Solution
Last Modified: 20 Oct 2025
Version: 5
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.