aws / eks-anywhere

Run Amazon EKS on your own infrastructure 🚀
https://anywhere.eks.amazonaws.com
Apache License 2.0
1.98k stars 290 forks source link

unable to add partition in tinkerbell action #7519

Open ygao-armada opened 10 months ago

ygao-armada commented 10 months ago

What happened:

I'm creating a EKS anywhere cluster for bare metal

After the action "stream-image" (the image is ubuntu 20.04 EFI), fdisk shows 2 partitions, /dev/sda1 and /dev/sda2 (total disk size is 6G, while the actual disk size is around 480G).

I create a new action to add a new partition with such command: printf "n\np\n3\n\n+10G\nw" | fdisk /dev/sda

However, I don't see the new partition created (even right within my new action)

Do you know why?

What you expected to happen: I expect the cluster creation will succeeds and the node has 3 partitions instead of 2.

How to reproduce it (as minimally and precisely as possible): mentioned above

Anything else we need to know?:

Environment:

ygao-armada commented 9 months ago

And I'm able to confirm this(new partition is not created) with following command: printf "n\np\n3\n\n+10G\np" | fdisk /dev/sda >& /mnt2/results.txt0

The content of results.txt0 is:

Found valid GPT with protective MBR; using GPT

Command (m for help): Partition type
  p primary partition (1-4)
  e extended
Partition number (1-4): First sector (12582912-937571967, default 12582912): Using default value 12582912
Last sector or +size{,K,M,G,T} (12582912-937571967, default 937571967): Using default value 937571967

Command (m for help): Disk /dev/sda: 937571968 sectors, 3142M
Logical sector size: 512
Disk identifier (GUID): d289196f-8852-4825-b457-733b65797b0a
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 12582878

Number Start (sector)  End (sector) Size Name
   1       34    1050815 513M EFI System Partition
   2    1050816    12582878 5630M

Command (m for help):

Everything but the result is normal.