-
Kernspin
Hi guys, I have a question. I am not able to resize the root (rppol) partion of my Linux KVM OpenIndiana partition. I want to expand the size of the rpool partition to the maximum disk size (I already grown the underlying QEMU QCow iamge) with the "format" utility, but I am not able to do it. The format utility always sees only the old disk size, and won't let me grow the partion size in the partion
-
Kernspin
menu of "format". I also already looked into gparted, where the new disk size is shown corrctly. If anyone can give adivce, thank you very much!
-
Kernspin
What I want to do is just: Grpw the rpool / (root) ZFS volume from 50GB to the new disk size of 80GB.
-
Kernspin
I cannot find any HOWTO on the Internet which tells me a way to do it correctly.
-
Kernspin
As alternative, can I use this commando: parted /dev/vda resizepart 0 100% under OpenIndiana to grow the partion? I just found this on the internet. But parted -l prints out MSDOS partition, instead of Solaris parition.
-
Kernspin
No, this does not work.
-
Kernspin
I found a HOWTO for Solaris how to expand the partition, but OpenIndianas "format" utility is missing the expand commando.
-
Kernspin
Shall I delete the partion, and re-create it?
-
Kernspin
I am not sure how to it correctly.
-
tsoome
Kernspin what is the partition type on your disk?
-
Kernspin
tsoome: I already grown the partition by booting from the LIVE CD install media. My current problem, is to update the bootloader.
-
Kernspin
tsoome: When I issue bootadm install-bootloader -MfvR /mnt it says: Not a BE: ramdisk:a and won't update the bootloader, right from the installation media.
-
tsoome
normally it would get updated automatically after pkg update or zpool attach. if you have just grown the disk, there should be no need to update bootloader.
-
Kernspin
tsoome: It now says: Booting from Hard Disk… and nothing happens, if I try to boot from physical hard disk.
-
tsoome
mkay.
-
tsoome
do you have rpool imported?
-
Kernspin
tsoome: On the live media?
-
tsoome
yes
-
Kernspin
zpool import -R /mnt -f rpool Yes
-
tsoome
better import with: zpool import -N rpool, then beadm mount <bename> /mnt
-
Kernspin
tsoome: I will do! Just a second.
-
tsoome
with -N, nothing from rpool will get mounted and beadm mount can do its job
-
Kernspin
tsoome: I did that!
-
Kernspin
tsoome: Shall I now run bootadm again?
-
Kernspin
tsoome: The command I use is: bootadm install-bootloader -MfvR /mnt
-
Kernspin
tsoome: Right before that, I issue: beadm mount openindiana-2023:01:17 /mnt
-
Kernspin
tsoome: Is that correct and shall I proceed?
-
tsoome
seems so
-
Kernspin
tsoome: It says: bootadm: No such BE: /devices/ramdisk:a
-
Kernspin
tsoome: I did it, I think it worked. I also specified -P rpool.
-
Kernspin
tsoome: I works! I was able to boot in, and extend the ZFS rpool volume to 80GB. God save, my OI installation is safe. Thank you a lot for your help.
-
Kernspin
I also want to note that, finally, the reboot process of OI inside my Linux KVM works again. Rebooting the instance works again. Thanks a lot!
-
Kernspin
I think the solution came with the update I did @ 2023:01:17.
-
tsoome
:)
-
Kernspin
tsoome: I think what makes resizing the root partition hard, is that there is no resize commando in "fdisk" and "format". I have found hints on the Web that the newest Oracle Solaris has a resize option in the partition option in "format". What I did is, I deleted the whole partition inside fdisk, and created a new one.
-
Kernspin
tsoome: From inside the Live Boot media.
-
tsoome
Kernspin better is to use GPT, not MBR+VTOC;)
-
jclulow
Yeah if you have a GPT table you can just use the "expand" command in format generally and then "zpool online -e $pool $disk" I believe
-
jclulow
You may not even need the expand command if you do the second one I don't remember
-
jclulow
And I guess with current bits, automatic expansion should work for rpool now:
illumos.org/issues/14978
-
fenix
→
BUG 14978: ZFS autoexpand property should work for root pools (Closed) |
code.illumos.org/c/illumos-gate/+/2355
-
Kernspin
tsoome: I tried to install with UEFI and GPT to a Linux KVM virtual machine, but the installation always failed, thus I installed to BIOS again.
-
tsoome
BIOS does not exclude GPT, or using GPT does not mean you have to use UEFI.
-
tsoome
ah, and since you had to resize solaris2 partition in fdisk, this did break your MBR bootcode and thats why you needed to reinstall boot loader.
-
Kernspin
tsoome: I did not know how to install to GPT with BIOS. The default install always install to MBR I think.
-
jperkin
richlowe: bulk build came back, looks identical to the previous one
-
tsoome
Kernspin I believe, the installer is a bit confusing there and probably should reconsider defaults;)
-
jclulow
Is that the OpenIndiana installer?
-
jclulow
I suspect it could use some tweaking for modern systems