Skip to content
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

Not able to use instance created with aws bottlerocket image for local storage #355

Closed
mdfaizsiddiqui opened this issue Aug 29, 2023 · 2 comments
Labels

Comments

@mdfaizsiddiqui
Copy link

mdfaizsiddiqui commented Aug 29, 2023

Hi

I am trying to use instance created with bottlerocket image for local storage, but I see this error on helper pod -

Events:
  Type     Reason       Age                 From     Message
  ----     ------       ----                ----     -------
  Warning  FailedMount  53s (x8 over 116s)  kubelet  MountVolume.SetUp failed for volume "data" : mkdir /.bottlerocket: read-only file system

My helm chart values configuration for rancher local-path-provisioner -

storageClass:
          name: "local-storage-disk-rancher"
nodePathMap:
  - node: DEFAULT_PATH_FOR_NON_LISTED_NODES
    paths:
      - /.bottlerocket/rootfs/mnt/ephemeral

Can I know why it is trying to create a directory /.bottlerocket, ? I specified the path /.bottlerocket/rootfs/mnt/ephemeral not /.bottlerocket and i also ensured that path exists on the node (with a custom script that creates it) -

df -Th | grep mnt
/.bottlerocket/rootfs/dev/nvme2n1 xfs        55G  425M   55G   1% /.bottlerocket/rootfs/mnt/ephemeral

This is my bottlerocket setting (Note: I'm using karpenter to create these instances) -

[settings.bootstrap-containers.setup-ephemeral-disks]
    source = "registry.hub.docker.com/faizatastradot/bottlerocket-local-ssd-bootstrapper:v20"
    mode = "always"
    essential = true

This is the bootstrap script which is formatting and mounting the disk -

#!/usr/bin/env bash
set -ex

ROOT_PATH="/.bottlerocket/rootfs"

# The name of the disk we want to manage
DISK="${ROOT_PATH}/dev/nvme2n1"

# Mounts from this mount point will propagate accross mount namespaces
MOUNT_POINT=/.bottlerocket/rootfs/mnt/ephemeral

# Format disk to xfs
mkfs.xfs ${DISK}

# We make sure the target mount points exist
mkdir -p $MOUNT_POINT

# Always mount the partitions
mount -t xfs "${DISK}" "${MOUNT_POINT}"
Copy link

github-actions bot commented Jun 1, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Jun 1, 2024
Copy link

github-actions bot commented Jun 7, 2024

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as completed Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant