1. 程式人生 > >LVM擴容排錯:/etc/lvm/archive/.lvm_ubuntu_2042_1912908381: write error failed: No space left on device

LVM擴容排錯:/etc/lvm/archive/.lvm_ubuntu_2042_1912908381: write error failed: No space left on device

1. 問題

今天,我在擴容檔案系統時,發現原來LVM動態增加lv的方法不好使了:

# lvextend -L +42G /dev/ubuntu-vg/root       

/etc/lvm/archive/.lvm_ubuntu_2072_1693399007: write error failed: No space left on device

Volume group "ubuntu-vg" metadata archive failed.
# lvresize -L +42G /dev/ubuntu-vg/root

/etc/lvm/archive/.lvm_ubuntu_2085_118481913: write
error failed: No space left on device Volume group "ubuntu-vg" metadata archive failed.

2. 解決方法

最終,我使用了lvresize,重新調整了/dev/ubuntu-vg/root的lv大小,並重新整理了檔案系統。

# lvresize -A n -L +42G /dev/ubuntu-vg/root

Size of logical volume ubuntu-vg/root changed from 18.56 GiB (4752 extents) to 60.56 GiB (15504 extents).

WARNING: 
This metadata update is NOT backed up Logical volume root successfully resized. # resize2fs -p /dev/ubuntu-vg/root # df -h

3. 參考文章