tech:documentation:procedures:vm:vm_disk_expansion_lvm_xfs
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tech:documentation:procedures:vm:vm_disk_expansion_lvm_xfs [2020/01/28 10:47] – [VM disk Expansion LVM with XFS/EXT4] kohofer | tech:documentation:procedures:vm:vm_disk_expansion_lvm_xfs [2020/10/13 16:46] (current) – [VM disk Expansion LVM with XFS/EXT4] kohofer | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== VM disk Expansion LVM with XFS/EXT4 ======= | ====== VM disk Expansion LVM with XFS/EXT4 ======= | ||
- | |||
- | <note important> | ||
Expand the original disk or add a second vdisk from **Infrastructure Client**.\\ | Expand the original disk or add a second vdisk from **Infrastructure Client**.\\ | ||
- | < | ||
If you are on a kernel newer or equal to 2.6.32 then you can issue the command | If you are on a kernel newer or equal to 2.6.32 then you can issue the command | ||
Line 41: | Line 38: | ||
Create an additional partition on the free space, say you increased the existing disc | Create an additional partition on the free space, say you increased the existing disc | ||
+ | |||
from 8GB to 15GB. The partition type is 8e. | from 8GB to 15GB. The partition type is 8e. | ||
cfdisk /dev/sda or cfdisk /dev/sdb | cfdisk /dev/sda or cfdisk /dev/sdb | ||
+ | |||
+ | |||
+ | **RESIZE ORIGINAL DISK** | ||
+ | |||
+ | Resize the already existing partition, e.g. /dev/sda4 to the newly created free partition. | ||
+ | |||
+ | cfdisk /dev/sda or cfdisk /dev/sdb | ||
+ | |||
+ | Now resize the Physical Volume to the new size | ||
+ | |||
+ | pvresize /dev/sda4 | ||
+ | |||
+ | extend the logical volume | ||
+ | |||
+ | lvextend -l +100%FREE | ||
+ | |||
+ | next resize the file system | ||
+ | |||
+ | resize2fs -p / | ||
+ | |||
+ | |||
+ | If you get a error: | ||
+ | |||
+ | <color # | ||
+ | |||
+ | run this command: | ||
+ | |||
+ | parted -l | ||
+ | |||
+ | and when asked to Fix/Cancel? type **F** | ||
# for example if the new partition is /dev/sda3 | # for example if the new partition is /dev/sda3 | ||
Line 175: | Line 203: | ||
* swapoff: /dev/dm-1: swapoff failed: Cannot allocate memory | * swapoff: /dev/dm-1: swapoff failed: Cannot allocate memory | ||
- | [[https:// | + | [[https:// |
+ | |||
+ | <del>[[https:// | ||
Line 229: | Line 259: | ||
[[http:// | [[http:// | ||
+ | [[https:// | ||
http:// | http:// | ||
http:// | http:// |
/data/www/wiki.inf.unibz.it/data/pages/tech/documentation/procedures/vm/vm_disk_expansion_lvm_xfs.txt · Last modified: 2020/10/13 16:46 by kohofer