Show volumes attached to C9 on editor view

0

Hi,

I want to add space to my C9 EC2 machine by adding a new volume instead of expanding the current volume.

Today I can toggle the option "Show home in favorites" to browse the files on the home root volume, but after I attach the new volume, can't find the way to browse the content from the C9 file tree browser. ( I can access it from the command line).

Is there a way to do this or I would need to keep adding space to my root volume instead?.

質問済み 2年前246ビュー
1回答
0

You will need to add to the existing volume. Here are the commands to make it happen.

## Assume a role with permissions

SIZE=50
INSTANCEID=$(curl http://169.254.169.254/latest/meta-data/instance-id)
REGION=$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone | sed 's/\(.*\)[a-z]/\1/')
VOLUMEID=$(aws ec2 describe-instances --instance-id $INSTANCEID --query "Reservations[0].Instances[0].BlockDeviceMappings[0].Ebs.VolumeId" --output text --region $REGION)

aws ec2 modify-volume --volume-id $VOLUMEID --size $SIZE --region $REGION

Wait until finished, check with this:

aws ec2 describe-volumes-modifications --region $REGION --volume-id $VOLUMEID

After finished

lsblk
sudo growpart /dev/nvme0n1 1
df -h
sudo xfs_growfs /dev/nvme0n1p1
df -h

profile pictureAWS
エキスパート
kentrad
回答済み 2年前
  • Thanks for your answer! The volumen is already working and accessible from the command line, the issue is with the C9 editor, can't point to browse files on the attached volume

  • Yes, if you need more space and you want to see it from C9, you will need to expand the root volume.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ