Skip to content
This repository has been 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

Closed
kingsd041 opened this issue Dec 22, 2017 · 3 comments
Assignees
Milestone

Comments

@kingsd041
Copy link
Contributor

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
@niusmallnan
Copy link
Contributor

Note:
With C5 and M5 instances, EBS volumes are exposed as NVMe block devices. The device names are /dev/nvme0n1, /dev/nvme1n1, and so on. The device names that you specify in a block device mapping are renamed using NVMe device names (/dev/nvme[0-26]n1).

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nvme-ebs-volumes.html

@niusmallnan
Copy link
Contributor

@kingsd041
You can try v1.1.2-rc3, it should be fixed.

@kingsd041
Copy link
Contributor Author

Tested with RancherOS v1.1.2-rc3
Test passed.

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

No branches or pull requests

2 participants