Cannot resize instance

22 views
Skip to first unread message

Bal Marius

unread,
Mar 17, 2023, 2:48:27 AM3/17/23
to ganeti
Hello,

I am running and old cluster with ganeti 2.15.2-7+deb9u and I try to resize a disk instance and its not working. Basically the VM does not see the new available disk space.

If I check the info for that instance I see the new value for the resized disk like below. Still, I don't know why it is is sync / degraded state.

- disk/1: drbd, size 1002.0G
      access mode: rw
      nodeA: ganeti01.npkrka.local, minor=2
      nodeB: ganeti02.npkrka.local, minor=2
      port: 11004
      on primary: /dev/drbd2 (147:2) in sync, status *DEGRADED*
      on secondary: /dev/drbd2 (147:2) in sync, status *DEGRADED*


Any ideas ?

Best regards,

Nick Bascombe-Fox

unread,
Mar 17, 2023, 9:20:34 AM3/17/23
to ganeti
Hi,

It looks like this is an old issue. goole-code-issue-258, our work around it to manually notify KVM of the disk size change.
  1. Log into the promary node
  2. Get the disk info `echo "info block" | /usr/bin/socat STDIO UNIX-CONNECT:/var/run/ganeti/kvm-hypervisor/ctrl/<instance_name>.monitor`
  3. Notify KVM of the new size echo "block_resize <device_name> 0G" | /usr/bin/socat STDIO UNIX-CONNECT:/var/run/ganeti/kvm-hypervisor/ctrl/<instance_name>.monitor
FYI You do not need to specify a size in $sizeG here. 0G will resize to max available (https://nsrc.org/activities/agendas/en/cloud-virtualization/cheat-sheets/ganeti.pdf)


Nick

Bal Marius

unread,
Mar 17, 2023, 9:31:23 AM3/17/23
to ganeti
Hello Nick,

I have already tried that and its not working. There is a difference between lv and drbd block size as seen below and I think it is because the cluster ( drbd ) has some issues but I don't know how to fix it yet. 

Anyway, I have tested with another instance and converted  to plain template from drbd and its working, I can see the new disk size in OS.

 - disk/1: drbd, size 900.0G

      access mode: rw
      nodeA: ganeti01.npkrka.local, minor=2
      nodeB: ganeti02.npkrka.local, minor=2
      port: 11004
      on primary: /dev/drbd2 (147:2) in sync, status *DEGRADED*
      on secondary: /dev/drbd2 (147:2) in sync, status *DEGRADED*
      name: None
      UUID: 380211ee-3396-4cf3-8763-e659383196f9
      child devices:
        - child 0: plain, size 1.1T


Thank you.

Randy Bush

unread,
Mar 17, 2023, 7:33:13 PM3/17/23
to Bal Marius, ganeti
have you tried `sudo resize2fs` inside the vm?

randy

Bal Marius

unread,
Mar 18, 2023, 5:34:04 AM3/18/23
to ganeti
Hello,

The block size it doesn't get resized so resizing inside the VM has no effect.

Thank you.
Reply all
Reply to author
Forward
0 new messages