Hello,
I am using a VM image provided by SAP on google cloud which runs on SUSE. The original configuration of the image was 36 GB, however when I created the image I increased it to 120 GB as I knew I will have to install few other components to it. When I ssh into the system I see that the /dev/sda1 is allocated only 36GB.
Could you show us the partition table for the disk/device as well as the
filesystems in use?
fdisk -l /dev/sda
mount | grep sda
The things I usually try include using ‘yast disk’ (Partitioner) to resize
the disk, though that may not work for the root filesystem while it is
online, and may depend on the filesystem used and partitions on the disk
(see commands above), or else I would try ‘parted’.
–
Good luck.
If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.
If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.
Code:
--------------------[color=green]
> sudo /usr/sbin/fdisk -l /dev/sda[/color]
Disk /dev/sda: 120 GiB, 128849018880 bytes, 251658240 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x57830789
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 75489434 75487387 36G 83 Linux
--------------------[/color]
That’s great; only the one partition, so in theory you should be able to
grow it, and the filesystem within.
[color=blue]
Code:
--------------------[color=green]
> mount | grep sda[/color]
/dev/sda1 on / type ext4 (rw,relatime,data=ordered)
--------------------[/color]
The only question remaining is whether or not this can be done, with ext4
or even just the partition under it, while the system is running from that
partition. I’m 99.999% sure you can do it if you were to boot from other
media, but I do not know how you would do that with a Google Compute (or
any other cloud) instance; if you can do it online, then try Yast’s
Partitioner first:
sudo /sbin/yast disk
else, try ‘parted’.
–
Good luck.
If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.
If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.
This is the image that I used to create my system. The default on it was 36GB which I increased to 120 while creating my instance. But it still assigned 36 to root disk while keeping rest of it for itself. I followed the second link option and changed it to 125 GB but it still kept extra 5 gigs for itself
This is ‘the image’
(https://console.cloud.google.com/launcher/details/sap-public/sap-hana-express?project=hxe-project)
that I used to create my system. The default on it was 36GB which I
increased to 120 while creating my instance. But it still assigned 36 to
root disk while keeping rest of it for itself. I followed the second
link option and changed it to 125 GB but it still kept extra 5 gigs for
itself :D[/color]
It sounds like you have it resized, but maybe not. If not, my next push
would be to create a new persistent disk, mount it where you need it, and
then use that going forward since, in my experience, this works better on
all types of systems (physical virtual, etc.) since 99.9% of reasons to
grow disks are application-specific, meaning they have their own
directories where large data things reside (binary data like databases or
VMs or images) and that is ideally suited to the flexibility that comes
from mountpoints.
–
Good luck.
If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.
If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.
I also think the resizing is done because when I use resize2fs it says the filesystem is already 9435923 blocks long which makes me think I just need to allocate more space to the partition somehow. I contacted google support and they ask me to use gcloud api command gcloud compute disks resize . But apparentlyresize is not a valid parameter
I have contacted them again and I will probably create another disk if need be. But this I assumed should have been easier than all the hoops I am jumping through specially when the instance was created with sufficient space to begin with.
Edit:
I just saw this page . It lists the OS which support automatic resizing. Do you think SUSE is the reason its not happening?
This is the image that I used to create my system. The default on it was 36GB which I increased to 120 while creating my instance. But it still assigned 36 to root disk while keeping rest of it for itself. I followed the second link option and changed it to 125 GB but it still kept extra 5 gigs for itself :D[/QUOTE]
[QUOTE=kvothe;37717]I also think the resizing is done because when I use resize2fs it says the filesystem is already 9435923 blocks long which makes me think I just need to allocate more space to the partition somehow. I contacted google support and they ask me to use gcloud api command gcloud compute disks resize . But apparentlyresize is not a valid parameter
I have contacted them again and I will probably create another disk if need be. But this I assumed should have been easier than all the hoops I am jumping through specially when the instance was created with sufficient space to begin with.
Edit:
I just saw this page . It lists the OS which support automatic resizing. Do you think SUSE is the reason its not happening?[/QUOTE]
I’m the exact same situation: SAP HANA Express image on GCE (Suse Enterprise). The automatic disk resizing does not work for it (Suse is not supported by GCE). Did you find a solution to resize the boot/root (/) partition?
resize the partition to reach to the end of the disk, then reboot, then resize the file system.
Alternatively, switch to using more than one file system. You’d create additional partitions on the disk and use it for the additional file systems, or start using LVM for that (which I’d recommend anyhow, despite this being a cloud machine).