Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Disk Resize might break FreeBSD #298

Closed
dann1 opened this issue Jun 2, 2023 · 1 comment
Closed

Disk Resize might break FreeBSD #298

dann1 opened this issue Jun 2, 2023 · 1 comment
Assignees
Milestone

Comments

@dann1
Copy link
Collaborator

dann1 commented Jun 2, 2023

When issuing a onevm disk-resize to a FreeBSD VM, the image OS will corrupt the FS and the VM will no longer be usable. This can happen with both live and POWEROFF resize. When live resize is issued the contextualization will not trigger automatically, but it can be triggered with onevm updateconf.

The problem lies in the execution of /etc/rc.d/growfs onestart triggered by the contextualization service. The problem even happens when commenting out such code and adding it to the START_SCRIPT instead, which is executed lastly by the contextualization service. Looks like some sort of race condition.

Executing this command manually inside the OS after a disk resize has been issued on the hypervisor doesn't seem to cause the FS corruption. The official FreeBSD documentation mentions this is a possibility.

Since there is a manual workaround and extremely high risk, the feature will be disabled for FreeBSD.

@dann1 dann1 added the Type: Bug label Jun 2, 2023
@dann1 dann1 added this to the Release 6.6.1 milestone Jun 2, 2023
@dann1 dann1 self-assigned this Jun 2, 2023
dann1 added a commit that referenced this issue Jun 2, 2023
rsmontero pushed a commit that referenced this issue Jun 2, 2023
@dann1 dann1 closed this as completed Jun 2, 2023
@dann1
Copy link
Collaborator Author

dann1 commented Jun 2, 2023

Output should look like this now after a resize is triggered on OpenNebula

root@myh:~ # gpart show
=>     40  8388528  da0  GPT  (5.0G) [CORRUPT]
       40     1024    1  freebsd-boot  (512K)
     1064  8387504    2  freebsd-ufs  (4.0G)

root@myh:~ # /etc/rc.d/growfs onestart
Growing root partition to fill device
da0 recovered
da0p2 resized
gpart: arg0 'gpt/rootfs': Invalid argument
super-block backups (for fsck_ffs -b #) at:
 8975872, 10258112
root@myh:~ # gpart show
=>      40  10485680  da0  GPT  (5.0G)
        40      1024    1  freebsd-boot  (512K)
      1064  10484656    2  freebsd-ufs  (5.0G)

dann1 added a commit to dann1/docs that referenced this issue Jun 7, 2023
tinova pushed a commit to OpenNebula/docs that referenced this issue Jun 12, 2023
tinova pushed a commit to OpenNebula/docs that referenced this issue Jun 12, 2023
Improve resize doc

(cherry picked from commit 9b8f83b)
tinova pushed a commit to OpenNebula/docs that referenced this issue Jun 12, 2023
Improve resize doc

(cherry picked from commit 9b8f83b)
tinova pushed a commit to OpenNebula/docs that referenced this issue Jun 12, 2023
Improve resize doc

(cherry picked from commit 9b8f83b)
tinova pushed a commit to OpenNebula/docs that referenced this issue Jun 12, 2023
Improve resize doc

(cherry picked from commit 9b8f83b)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant