Quantcast
Channel: Active questions tagged partition - Server Fault
Viewing all articles
Browse latest Browse all 68

Partitioning Rocky Linux 9 on AWS ec2

$
0
0

I have a strange issue while working with partitions on my Rocky Linux 9 (non LVM) EC2 instance on AWS.

GOAL: I would like to enlarge a little (5GB) my ebs in order to create a new partition and a new xfs filesystem to mount on it /tmp to have it separated from root partition

MY ATTEMPT: I started to remove from /etc/cloud/cloud.cfg growpart and resizefs to prevent cloud-init to automatically enlarge root partition:

sudo sed -i '/ - growpart/d' /etc/cloud/cloud.cfgsudo sed -i '/ - resizefs/d' /etc/cloud/cloud.cfg

Then I enlarged my EBS volume from AWS console, from 15GB to 20GB

After that on my ec2 I see, from lsblk ,that the disk has the desired size, so I started my work

I created a new partition with fdiskI created a filesystem on it: mkfs.xfs -f -L tmp /dev/nvme0n1p5Until here, every reboot works

I modified /etc/fstab to mount at boot the partition

LABEL=tmp /tmp xfs defaults,noatime,nodev,nosuid,noexec 1 2

then I re-mount (mount -a) to ensure everything worksTmp is now on my new paritition

Then I reboot my ec2 and the OS is stuck, I cannot connect to it anymore

QUESTIONS: What is wrong with all of this? What am I missing? tmpfs? I just need a separated partition, only one this time but can be more in the future, is there a guide to to this on aws?


Viewing all articles
Browse latest Browse all 68

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>