Editing LVM+DRBD+LVM+KVM+LVM Resize

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
== info ==
== info ==
  PV -> VG -> LV -> DRBD -> VG (clvmd) -> LV -> KVM Virt (that also has pv/vg/lv)
  PV -> VG -> LV -> DRBD -> VG (clvmd) -> LV -> KVM Virt


== resize LVM backing device ==
== resize LVM backing device ==
Line 27: Line 27:
   Logical volume drbd_hopmon successfully resized
   Logical volume drbd_hopmon successfully resized
</source>
</source>


== Resize DRBD (online) ==
== Resize DRBD (online) ==
Line 34: Line 32:
  # drbdadm resize <resource>
  # drbdadm resize <resource>
  drbdadm resize hopmon
  drbdadm resize hopmon
</source>
<source>
#pvscan
#PV /dev/drbd6    VG drbd_hopmon        lvm2 [9.20 GiB / 0.20 GiB free]
pvresize /dev/drbd6
</source>
</source>


Line 52: Line 45:
== Shutdown/Start KVM Host ==
== Shutdown/Start KVM Host ==


* shutdown the guest, then start the guest (not a reboot)
* A reboot doesn't seem to notice the disk change
: this will allow the KVM guest to notice the PV size change
* shutdown the guest, then start the guest


== Resize GUEST lvm disk ==
== Resize GUEST lvm disk ==
Line 77: Line 70:
/dev/vda2        1026048    16777215    7875584  8e  Linux LVM
/dev/vda2        1026048    16777215    7875584  8e  Linux LVM
</source>
</source>
* notice the start boundary '''1026048'''
* You will use this after you delete the parition in the next step
<source>
<source>
fdisk -u /dev/vda
fdisk -u /dev/vda
Line 93: Line 82:
p
p
Partition number (1-4): 2
Partition number (1-4): 2
### This is where you enter in your start boundary from before
First sector (63-20971519, default 63): 1026048
First sector (63-20971519, default 63): 1026048
Last sector, +sectors or +size{K,M,G} (1026048-20971519, default 20971519):  
Last sector, +sectors or +size{K,M,G} (1026048-20971519, default 20971519):  
Using default value 20971519
Using default value 20971519
Line 127: Line 114:
</source>
</source>


 
* And another reboot for the guest to see the disk change? odd
* You can try to run 'partprobe' to re-read the disk partitions.. but it may not work
* If partprobe fails you will have to reboot to allow the partition size to be apply. You can '''reboot''' this time.
 
<source>
<source>
pvs
pvs
Please note that all contributions to RARForge may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see RARForge:Copyrights for details). Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)