Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enhancement] extend OS support: ubuntu #136

Open
davidkhala opened this issue May 13, 2021 · 17 comments
Open

[enhancement] extend OS support: ubuntu #136

davidkhala opened this issue May 13, 2021 · 17 comments

Comments

@davidkhala
Copy link

It will be great that if we can provide a guideline to install oci-utils on Ubuntu or debian-like system.

@davidkhala
Copy link
Author

Per my experiment,
libexec/oci-growfs works on ubuntu by its own but not so graceful

@axtonpitt
Copy link

I second this, would be very useful.

@axtonpitt
Copy link

@davidkhala did using libexec/oci-growfs work with another file system like ext4 (rather than XFS)?

@davidkhala
Copy link
Author

@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.

@KingPin
Copy link

KingPin commented Sep 24, 2021

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.

@davidkhala
Copy link
Author

davidkhala commented Sep 24, 2021

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?

@KingPin
Copy link

KingPin commented Sep 24, 2021

Hi @davidkhala thank you for responding.

  • I cloned this repo
  • ran the libexec/oci-growfs command.

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.

@guidotijskens
Copy link
Member

oci-utils is not supported on Ubuntu or Debian, has not been tested. tx. Guido

@KingPin
Copy link

KingPin commented Sep 24, 2021

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 💯

@mrbluecoat
Copy link

FYI, oci-growfs didn't work for me on Ubuntu but this guide did.

@guidotijskens
Copy link
Member

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

@Frederick888
Copy link

Frederick888 commented Apr 14, 2022

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.

@seffignoz
Copy link

@Frederick888 Thank you, that worked flawlessly and you saved me a lot of headaches.

@davidkhala
Copy link
Author

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?

@Frederick888
Copy link

@davidkhala If it's what you want ¯\_(ツ)_/¯

@seliver
Copy link

seliver commented Mar 14, 2023

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

@candlewill
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants