هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.
ماذا يفعل
lvextend -L +SIZE adds space; -L SIZE sets the total size; -l +N / -l +100%FREE work with extents. The VG needs enough free space (add disks with vgextend).
Always add -r (--resizefs): it runs xfs_growfs or resize2fs after the LV grew. Without it the file system keeps its old size. lvresize can grow and shrink with the same options.
طريقة الكتابة
lvextend (-L [+]SIZE | -l [+]EXTENTS) [-r] [OPTION]... VG/LV [PV...]
lvresize (-L [+|-]SIZE | -l [+|-]EXTENTS) [-r] [OPTION]... VG/LVالخيارات 28
الأكثر استخدامًا
Common LVM options
لا يوجد شيء يطابق هذا الفلتر.
أمثلة 10
$ مستخدم عادي# بصلاحية root (أو مع sudo)
1Add 2 GiB with the file system
lvextend -r -L +2G /dev/vgdata/lvdata Size of logical volume vgdata/lvdata changed from 5.00 GiB to 7.00 GiB. Logical volume vgdata/lvdata successfully resized.Works online for XFS and ext4.
2Set a total size
lvextend -r -L 10G /dev/vgdata/lvdata10 GiB in total (no +).
3Use all free space in the VG
lvextend -r -l +100%FREE /dev/vgdata/lvwebCommon after vgextend.
4Add extents
lvextend -r -l +25 /dev/vgfiles/lvfiles25 × PE size.
5Check the result
df must show the new size too.
6Forgot -r? Grow the file system later
xfs_growfs /data resize2fs /dev/vgdata/lvwebXFS by mount point, ext4 by device.
7Grow the root file system
lvextend -r -L +5G /dev/rhel/rootOnline, no reboot.
8Grow a swap LV
Swap must be recreated (check that the UUID in fstab still matches, or use the LV path).
9Only use space of a chosen PV
lvextend -r -L +2G /dev/vgdata/lvdata /dev/vddNew extents come from vdd.
10Grow a thin pool before it fills
lvextend -L +5G vgdata/pool1A full thin pool stops all writes in its volumes.
لا يوجد شيء يطابق هذا الفلتر.
انتبه
- Without -r: LV bigger, file system not.
df -hshows the problem. - "Insufficient free space": add a PV with vgextend first.
رموز الخروج
0 :: Done. 5 :: Error.