Ystebad Posted October 11, 2021 Share Posted October 11, 2021 I'm not great in either linux or unraid, so there's that.... Made a linux VM and it has a 25G primary partition/disk. Downloading chia blockchain and it's all full and giving errors. I expanded the vdisk in the unraid GUI to 100G. within ubuntu VM I ran parted and tried resizepart (ran as sudo) but it says "Error: The location 50000 is outside of the device" Can you not expand partition of the VM as it's running from within linux? That seems silly. Not sure what I'm doing wrong. Here's what I see in parted (after increasing size to 100GB in unraid): (parted) print Model: Linux device-mapper (linear) (dm) Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 26.0GB Sector size (logical/physical): 512B/512B Partition Table: loop Disk Flags: Number Start End Size File system Flags 1 0.00B 26.0GB 26.0GB ext4 Quote Link to comment
ghost82 Posted October 14, 2021 Share Posted October 14, 2021 (edited) On 10/11/2021 at 2:12 PM, Ystebad said: I'm not great in either linux or unraid, so there's that.... Made a linux VM and it has a 25G primary partition/disk. Downloading chia blockchain and it's all full and giving errors. I expanded the vdisk in the unraid GUI to 100G. within ubuntu VM I ran parted and tried resizepart (ran as sudo) but it says "Error: The location 50000 is outside of the device" Can you not expand partition of the VM as it's running from within linux? That seems silly. Not sure what I'm doing wrong. Here's what I see in parted (after increasing size to 100GB in unraid): (parted) print Model: Linux device-mapper (linear) (dm) Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 26.0GB Sector size (logical/physical): 512B/512B Partition Table: loop Disk Flags: Number Start End Size File system Flags 1 0.00B 26.0GB 26.0GB ext4 Download gparted live iso and add that iso to the vm you are using, boot from it (either change the boot order in the vm settings or in the vm bios). You will boot into the gparted live iso and you could resize the partitions you want. I just used the gparted live iso to: - convert mbr to gpt - create a bios_grub partition to boot legacy bios + gpt - create an efi partition to migrate from legacy bios to uefi - move efi partition from "right" to "left" - resize (increase) the ext4 partition from 50 GB to 150 GB gparted is very easy to use, it has a nice gui. I don't know if there is any difference, but I prefer to use qemu-img to increase the disk size: qemu-img resize path/to/raw/img/vdisk.img +100G Will increase the size of a raw img by +100GB Make a backup first!playing with partitions can destroy all your data. Edited October 14, 2021 by ghost82 1 Quote Link to comment
Ystebad Posted October 14, 2021 Author Share Posted October 14, 2021 Thanks. Appreciate all the detail. didn't realize you couldn't adjust partition while it's online - I think you can do that in windows I gave up and just created a new VM and downloaded the chia blockchain all over again - but saving your advice for next time! Appreciated. Quote Link to comment
ghost82 Posted October 14, 2021 Share Posted October 14, 2021 Yes, sometimes creating a new vm from scratch is faster and easier Happy you solved in some way at the end. Quote Link to comment
JonathanM Posted October 14, 2021 Share Posted October 14, 2021 1 hour ago, ghost82 said: Download gparted live iso and add that iso to the vm you are using, boot from it (either change the boot order in the vm settings or in the vm bios). You will boot into the gparted live iso and you could resize the partitions you want. I just used the gparted live iso to: - convert mbr to gpt - create a bios_grub partition to boot legacy bios + gpt - create an efi partition to migrate from legacy bios to uefi - move efi partition from "right" to "left" - resize (increase) the ext4 partition from 50 GB to 150 GB gparted is very easy to use, it has a nice gui. I don't know if there is any difference, but I prefer to use qemu-img to increase the disk size: qemu-img resize path/to/raw/img/vdisk.img +100G Will increase the size of a raw img by +100GB Make a backup first!playing with partitions can destroy all your data. Instead of mucking about with trying to force a VM to boot to a iso image, I find it easier to set up a stripped down VM with gparted and all the other fun tools, and temporarily add the target vdisk as a second disk to the utilities VM. That way there is no need to modify anything with the original VM, just remember to remove the vdisk from the utility VM before starting it up again. Quote Link to comment
Ystebad Posted October 14, 2021 Author Share Posted October 14, 2021 6 minutes ago, JonathanM said: Instead of mucking about with trying to force a VM to boot to a iso image, I find it easier to set up a stripped down VM with gparted and all the other fun tools, and temporarily add the target vdisk as a second disk to the utilities VM. That way there is no need to modify anything with the original VM, just remember to remove the vdisk from the utility VM before starting it up again. That is a great idea - not exactly sure how to add the original vm disk to the "stripped" vm though. Quote Link to comment
JonathanM Posted October 14, 2021 Share Posted October 14, 2021 6 minutes ago, Ystebad said: That is a great idea - not exactly sure how to add the original vm disk to the "stripped" vm though. There is a green+ sign at the bottom of the primary vdisk location settings in the VM configuration screen to add additional vdisks. Quote Link to comment
bthoven Posted August 8, 2023 Share Posted August 8, 2023 On 10/15/2021 at 12:10 AM, JonathanM said: Instead of mucking about with trying to force a VM to boot to a iso image, I find it easier to set up a stripped down VM with gparted and all the other fun tools, and temporarily add the target vdisk as a second disk to the utilities VM. That way there is no need to modify anything with the original VM, just remember to remove the vdisk from the utility VM before starting it up again. Great advice. My debian vm storage was full and can't display desktop gui after login. As I already have a debian testing VM in place, I just installed gparted, stop the problematic vm, run gparted to extend the debian partition (I need to delete the existing swap partition first before extending because it was placed between the main partition and the additional storage) and create a new swap partition at the end of the enlarged storage; then everything is now working smoothly as usual. First reboot on the larger storage took longer time because it seems to check or initial something extra on the expanded disk. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.