Skip to content
This repository was archived by the owner on Oct 11, 2023. It is now read-only.
This repository was archived by the owner on Oct 11, 2023. It is now read-only.

AWS/GCE/Aliyun instance does not support automatically extend the first partition. #2186

@kingsd041

Description

@kingsd041

RancherOS Version: (ros os version)
ros version v1.1.2-rc2
Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.)
AWS/GCE/Aliyun

I use AWS/GCE/Aliyun to create an instance, the instance does not support automatically extend the first partition.

Aliyun:

  1. Upload Rancheros v1.1.2-rc2 to Aliyun and set the disk size to 51G.
  2. Create an instance, set the disk less than or equal to 51G, view the root disk size is 9.8G after starting the instance.
  3. If the disk is larger than 51G, you get the correct root disk size after starting the instance
# fdisk -l
Disk /dev/vda: 51 GiB, 54760833024 bytes, 106954752 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: dos
Disk identifier: 0x97231dff

Device     Boot Start      End  Sectors  Size Id Type
/dev/vda1  *     2048 20477951 20475904  9.8G 83 Linux
# fdisk -l
Disk /dev/vda: 52 GiB, 55834574848 bytes, 109051904 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: dos
Disk identifier: 0x97231dff

Device     Boot Start       End   Sectors Size Id Type
/dev/vda1  *     2048 109049855 109047808  52G 83 Linux

GCE:

  1. Create an instance using the following command:
    gcloud compute instances create --project "rancher-dev" --zone "us-central1-f" hailong-ros-test-5 --image ros-v112-rc2 --boot-disk-size=60GB --metadata-from-file user-data=cloud-config.yml
    Results:
    After starting the instance, check with the root disk size is 9.8G
# fdisk  -l
Disk /dev/sda: 60 GiB, 64424509440 bytes, 125829120 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: 0xb8c91f0e

Device     Boot Start      End  Sectors  Size Id Type
/dev/sda1  *     2048 20477951 20475904  9.8G 83 Linux

AWS

  1. Create an instance using m5.large and set the disk size to 45G
  2. View the root disk size after the instance starts up.
    Results:
    The root disk size is 8G
# fdisk -l
Disk /dev/nvme0n1: 45 GiB, 48318382080 bytes, 94371840 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: dos
Disk identifier: 0x9a93f373

Device         Boot Start      End  Sectors Size Id Type
/dev/nvme0n1p1 *    16065 16771859 16755795   8G 83 Linux

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions