Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tech:documentation:procedures:vm:vm_disk_expansion_lvm_xfs [2020/01/28 10:47]
kohofer [VM disk Expansion LVM with XFS/EXT4]
tech:documentation:procedures:vm:vm_disk_expansion_lvm_xfs [2020/10/13 16:46] (current)
kohofer [VM disk Expansion LVM with XFS/EXT4]
Line 1: Line 1:
 ====== VM disk Expansion LVM with XFS/EXT4 ======= ====== VM disk Expansion LVM with XFS/EXT4 =======
- 
-<note important>​CREATE SNAPSHOT</​note>​ 
  
 Expand the original disk or add a second vdisk from **Infrastructure Client**.\\ Expand the original disk or add a second vdisk from **Infrastructure Client**.\\
-<​del>​If you want to perform a grow w/o reboot you have to add a second disk.</​del>​ 
  
 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 ​ /​dev/​data-www-vg/​lvol-datawww
 +
 +next resize the file system
 +
 +  resize2fs -p /​dev/​data-www-vg/​lvol-datawww
 +
 +
 +If you get a error:
 +
 +<color #​ed1c24>​GPT PMBR size mismatch (2362232011 != 2516582399) will be corrected by w(rite).</​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://​leizhilong.github.io/​blog/​2018-11-12-case-study-swapoff-cannot-allocate-memory/​|Swapoff Cannot Allocate Memory]]+[[https://​unix.stackexchange.com/​questions/​321675/​unable-to-swapoff-but-enough-physical-memory-is-available/​472012|Swapoff Cannot Allocate Memory]] 
 + 
 +<del>[[https://​leizhilong.github.io/​blog/​2018-11-12-case-study-swapoff-cannot-allocate-memory/​|Swapoff Cannot Allocate Memory]]</​del>​
  
  
Line 229: Line 259:
 [[http://​www.novell.com/​support/​kb/​doc.php?​id=3803380|LVM Volume Group Shows "​unknown device"​]] [[http://​www.novell.com/​support/​kb/​doc.php?​id=3803380|LVM Volume Group Shows "​unknown device"​]]
  
 +[[https://​www.tutorialspoint.com/​unix_commands/​pvresize.htm|pvresize - Unix, Linux Command]]
  
 http://​www.linuxhaven.de/​dlhp/​HOWTO-test/​DE-LVM-HOWTO-2.html\\ http://​www.linuxhaven.de/​dlhp/​HOWTO-test/​DE-LVM-HOWTO-2.html\\
 http://​www.howtogeek.com/​howto/​40702/​how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/​ http://​www.howtogeek.com/​howto/​40702/​how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/​
/var/www/wiki.inf.unibz.it/data/attic/tech/documentation/procedures/vm/vm_disk_expansion_lvm_xfs.1580204847.txt.gz · Last modified: 2020/01/28 10:47 by kohofer
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0