Open davidkhala opened 3 years ago
Per my experiment,
libexec/oci-growfs
works on ubuntu by its own but not so graceful
I second this, would be very useful.
@davidkhala did using libexec/oci-growfs
work with another file system like ext4 (rather than XFS)?
@davidkhala did using
libexec/oci-growfs
work with another file system like ext4 (rather than XFS)?
I am not file system expert to give accurate advice. But since ext4 is default in Debian, and my experiment environment did not change the default, it should work.
Hi David I just tried running growfs and got this error on ubuntu :
xfs_growfs: / is not a mounted XFS filesystem
was there a workaround or a flag you used to get it to work on ubuntu?
thank you.
Hi David I just tried running growfs and got this error on ubuntu :
xfs_growfs: / is not a mounted XFS filesystem
was there a workaround or a flag you used to get it to work on ubuntu?
thank you.
Hi @KingPin,
What are the full steps to reproduce it?
Hi @davidkhala thank you for responding.
I saw no flags to be used with it so I simply used the command as is. it asked me if I wanted to resize, once I said yes it threw the error out at the end.
oci-utils is not supported on Ubuntu or Debian, has not been tested. tx. Guido
ok well just for any future google searchers ending up here, the error I posted above seems to be a warning and not an error. after a backup (please always backup) and a reboot the resizing seems to have been successful.
thanx @davidkhala for experimenting on this so I had the courage to try it out 💯
FYI, oci-growfs
didn't work for me on Ubuntu but this guide did.
oci-growfs only handled xfs file systems; support for ext4 is in next release, support for Debian/Ubuntu is on the table but not yet decided. Guido
The script internally calls growpart
from cloud-guest-utils
and resize2fs
. So if you are not using LVM etc, to grow main ext4 partition of a boot volume in Ubuntu, simply run:
sudo growpart /dev/sda 1
sudo resize2fs -z ./sda1.e2undo /dev/sda1
Since Oracle puts the boot partition after main, to be safe you can also install efibootmgr
and check efibootmgr -v
output. If yours also looks like
Boot0002* UEFI ORACLE BlockVolume PciRoot(0x0)/Pci(0x12,0x7)/Pci(0x0,0x0)/SCSI(0,1)N.....YM....R,Y.
then it means it uses SCSI disk/partition number to locate boot partition and it should be safe to reboot now.
@Frederick888 Thank you, that worked flawlessly and you saved me a lot of headaches.
sudo resize2fs -z ./sda1.e2undo /dev/sda1
@Frederick888 If we don't want to keep a undo back up, can we skip the option -z ./sda1.e2undo
here?
@davidkhala If it's what you want ¯\_(ツ)_/¯
This repo works for me on Ubuntu 22.04 out of the box. Had to do the following:
git checkout url-of-the-repo
cd oci-utils
python3 ./setup.py build
sudo python3 ./setup.py install
# the following will expand your volume(s)
sudo ./libexec/oci-growfs
This repo works for me on Ubuntu 22.04 out of the box. Had to do the following:
git checkout url-of-the-repo cd oci-utils python3 ./setup.py build sudo python3 ./setup.py install # the following will expand your volume(s) sudo ./libexec/oci-growfs
This worked. Thank you!
It will be great that if we can provide a guideline to install oci-utils on Ubuntu or debian-like system.