PowerPath:如何擴充 Linux 檔案系統,即使 PowerPath LUN 上沒有磁碟分割表格
Summary: PowerPath:如何擴充 Linux 檔案系統,即使 PowerPath LUN 上沒有磁碟分割表格。
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 中擴充兩個,但結果失敗。
執行 Linux 2.6.18-128.el5 的VNX5500透過 PowerPath 5.3 SP 1 (組建 111) 為 RHEL5 和 RHEL6 伺服器提供多個 LUN
客戶已在 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 時,必須位於 root 中才能運作。
# 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.