-
Notifications
You must be signed in to change notification settings - Fork 250
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
[Epic] Command to resize the disk #127
Comments
Using
But when I log into the CRC VM, I see this:
Why does I'm going to install Istio and its bookinfo demo into my cluster and see what happens. I suspect /sysroot is going to fill up to 100% usage (or close to it). |
with base Istio installed:
There is no DiskPressure yet:
Then with its bookinfo demo installed:
Now I have disk pressure:
And now I can see it purging files to help get disk usage below the 80% threshold:
|
So, clearly my problem is that the additional room on the partition isn't making its way into the vda3 filesystem. You can see I enlarged the vda3 partition: from
and the filesystem even shows it is 39G from the
but for some reason that additional space is not recognized at runtime. From
I increased my disk space using these commands - if anyone knows what I am missing, please let me know. Unless there is a bug somewhere in the VM config?? I'm at a loss.
|
We can probably make the size of /dev/vda3 filesystem bigger on the image we ship. The image is thinly provisioned, so this should not have a noticeable impact on the tarball size. |
FWIW: I do not have libguestfs-xfs installed and when I do virt-resize, I am getting this warning:
It is possible that this is why my filesystem is not getting the increased space. I will install that and test and see what happens. |
It would be preferable if crc provided an option to configure the partition sizes (particularly the vda3 partition) and have crc run the necessary cmds to do this resizing. Because whatever size you ship with, someone is going to want more :) |
I installed libguestfs-xfs and that got me alittle further. I see it now trying to grow the filesystem during the virt-resize, but it gets this error:
I am on RHEL 7.6. The CRC VM is Red Hat Enterprise Linux CoreOS release 4.1 |
CoreOS 4.1 is based on RHEL8, so it's indeed going to hit the limitation mentioned in these bugs [ref]
|
OK, then based on that... this is a high priority:
Its high priority at least for anyone needing more than 15G in their cluster and they are using a Red Hat CSB machine or anyone using RHEL 7.x - they can't resize the image and thus hosed and unable to use CRC. |
Or the CRC team can see if those XFS features are really needed (I have no idea what these new featuers are) ... if not, the crc image's filesystems should be created with those options so they are compatible with RHEL 7.x systems. |
This is planned for later releases. We will first focus on the support of other hypervisors before venturing into supporting 'advanced' usecases. With advanced it is meant to say 'configuration changes' that are needed against the OOTB experience. I'll try to make this visible from the project kanbans at https://github.com/code-ready/crc/projects |
Original issue has been modified to mention possible resizing commands |
In the meantime, I would suggest adding an FAQ or some documentation to tell the user how to expand the resources used by the CRC image should they need it. Here's a quick summary of how to increase memory, CPU and disk (this is what I do). All of these instructions assumes the CRC VM is currently running. For MEMORY:
For CPUS:
For DISK SPACE:
|
@jmazzitelli We can certainly add this to the known issues that we're collecting to address #131. I've been keeping an eye on it for that exact reason. ;) |
Hi, I need to increase the disk size of my crc machine running on mac pro. Can someone pls share the commands to do the same. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Happen to come across here and tried the workaround described in above comment . It works until CRC v1.5.0, however, I noticed that the same approach doesn't work since v1.6.0, where, the file system mapped to $ sudo virt-filesystems --long -h --all -a $HOME/.crc/machines/crc/crc I can see it's mapped to Then, I login to the VM: [core@crc-w6th5-master-0 ~]$ sudo fdisk -l
Disk /dev/vda: 61 GiB, 65498251264 bytes, 127926272 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 00000000-0000-4000-A000-000000000001
Device Start End Sectors Size Type
/dev/vda1 2048 788479 786432 384M Linux filesystem
/dev/vda2 788480 1048575 260096 127M EFI System
/dev/vda3 1048576 1050623 2048 1M BIOS boot
/dev/vda4 1050624 127926238 126875615 60.5G Linux filesystem
Disk /dev/mapper/coreos-luks-root-nocrypt: 60.5 GiB, 64943537664 bytes, 126842847 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
[core@crc-w6th5-master-0 ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 252:0 0 61G 0 disk
|-vda1 252:1 0 384M 0 part /boot
|-vda2 252:2 0 127M 0 part /boot/efi
|-vda3 252:3 0 1M 0 part
`-vda4 252:4 0 60.5G 0 part
`-coreos-luks-root-nocrypt 253:0 0 60.5G 0 dm /sysroot It shows [core@crc-w6th5-master-0 ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 13G 0 13G 0% /dev
tmpfs 13G 168K 13G 1% /dev/shm
tmpfs 13G 8.8M 13G 1% /run
tmpfs 13G 0 13G 0% /sys/fs/cgroup
/dev/mapper/coreos-luks-root-nocrypt 31G 8.5G 23G 28% /sysroot
/dev/vda1 364M 84M 257M 25% /boot
/dev/vda2 127M 3.0M 124M 3% /boot/efi
tmpfs 2.5G 4.0K 2.5G 1% /run/user/1000
Any ideas? @jmazzitelli @cfergeau @gbraad |
I tried this and I get an error (CRC 1.16, using +20G): INFO Checking size of the disk image /home/jcordes/.crc/cache/crc_libvirt_4.5.9/crc.qcow2 ... So I adjusted the size in vi ~/.crc/cache/crc_libvirt_4.5.9/crc-bundle-info.json to get this working. "storage": { |
@gbraad what is left to do with this issue as I see it is done (Sprint 191)? |
It's implemented on Windows and linux, it's still missing on macOS #1640 |
We decided to close the issue and open a new one for macos as it would need a lot more work than anticipated. I added this issue during the meeting as i did not find the macos issue that quickly. |
Can someone please document how SSH into the VM is meant to work with vsock mode with Hyper-V. 'crc daemon' doesn't expose an SSH port AFAIK.
I have done the following command:
But now I need to SSH in to run xfs_growfs, but getting connection refused (api.crc.testing being 127.0.0.1)
(also, if 'crc daemon' or similar were to expose this, better not be on port 22, or port 2222 etc., as this is likely to clash) |
Reszing the disk should not need manual commands inside the VM; so please
file an issue for Windows for this.
We are exposing port 2222 on localhost using vsock. However this is not
'yet' configurable as this functionality is not final.
…On Wed, Apr 14, 2021 at 4:40 PM Cameron Kerr ***@***.***> wrote:
Can someone please document how SSH into the VM is meant to work with
vsock mode with Hyper-V. 'crc daemon' doesn't expose an SSH port AFAIK.
CodeReady Containers version: 1.24.0+5f06e84b
OpenShift version: 4.7.2 (embedded in executable)
I have done the following command:
Resize-VHD -Path "$global:homePath\.crc\cache\$crcFileName\crc.vhdx" -SizeBytes ( $DiskSizeGB * 1024 * 1024 * 1024 )
But now I need to SSH in to run xfs_growfs, but getting connection refused
(api.crc.testing being 127.0.0.1)
❯ ssh -i C:\Users\me\.crc\cache\crc_hyperv_4.7.2\id_ecdsa_crc ***@***.***
ssh: connect to host api.crc.testing port 22: Connection refused
(also, if 'crc daemon' or similar were to expose this, better not be on
port 22, or port 2222 etc., as this is likely to clash)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#127 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAOZVS7QNDYUSEPAKGQW3TIVIIBANCNFSM4HMQAUNA>
.
--
Gerard Braad | http://gbraad.nl
STEM is the source, but BUILD is how you develop!
[ Better Understanding Involves Learning and Doing ]
|
This is a known issue with 1.24 https://access.redhat.com/documentation/en-us/red_hat_codeready_containers/1.24/html/release_notes_and_known_issues/issues_on_microsoft_windows#disk_resizing_does_not_work_as_expected This should be fixed in the 1.25 release which is getting out real soon now. |
|
Perhaps it is of help to somebody:
oc get node / oc describe node/ ephemeral-storage 0 (0%) 0 (0%) Warning EvictionThresholdMet 108m kubelet Attempting to reclaim ephemeral-storage |
Disk resizing on RHEL7/RHEL8 should work in recent crc releases, if it does not this is a bug we need to fix (but please open a separate issue for this :) |
Next macOS release will contain everything needed. |
The initial size of the image is 15+1GB. This might not be enough for all usecases, so we need to find a way to allow the image to be resized on initial start (or when stopped). Note: Likely the command(s) will share functionality.
eg.
or
(submitting this issue as per Slack response from Gerard Braad : "at the moment we do not support resizing of the disk image. please file an issue fotr this.")
I tried to install Maistra (Isito), its bookinfo demo, and Kiali, but am hitting disk resource limitations.
CRC should provide a mechanism to define the amount of disk space to assign to the VM image in order to run larger clusters.
The text was updated successfully, but these errors were encountered: