Adding Storage to EC2 instance that’s already created

0

I am having issues in regards to adding storage onto my instances I have already created and have been using for awhile. My storage is low so I decided to add more storage. I added 30GB of storage to each instance (General Purpose SSD (gp2) changed to 60 GiB from 30 GiB, when I sign onto the server it doesn’t show up in the storage but it shows up in my disk management that I have 30GB unallocated. What do i need to do to get the 30GB I added to the instance onto the server itself?

질문됨 일 년 전1543회 조회
3개 답변
3

this is more related with linux

you need to extend storage

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html

please read the link and follow these steps

  1. Identify the device name of the new volume that you attached to your instance. You can do this by running the command lsblk in your server's terminal. The output will show you a list of all the attached devices along with their device names and sizes.
  2. Create a file system on the unallocated space using the appropriate command for your file system type. For example, if you're using an ext4 file system, you can use the command sudo mkfs -t ext4 /dev/xvdf1 to create the file system on the device named /dev/xvdf1.
  3. Create a mount point directory for the new file system. This can be any directory in your server's file system that you want to use as the access point for the new storage. For example, you can use the command sudo mkdir /mnt/new-storage to create a new directory named new-storage under the /mnt directory.
  4. Mount the new file system to the mount point directory using the command sudo mount /dev/xvdf1 /mnt/new-storage. This will make the new storage available at the /mnt/new-storage directory in your server's file system.
  5. Optionally, you can configure the file system to mount automatically at boot time by adding an entry to the /etc/fstab file. For example, you can add the following line to the file: /dev/xvdf1 /mnt/new-storage ext4 defaults 0 0.
profile picture
전문가
답변함 일 년 전
1
수락된 답변

Hey,

I'm Assuming this is Windows instance and 30GB vol is your C drive ( root Volume), but below solution should work for non root volumes as well. Once you allocate EBS storage at the cloud, you will still have to login to the EC2 Instance and complete the disk configuration from the OS perspective. This is like any addition of Disk at the OS level. follow below steps

Extending the file system using Disk Management

  1. Connect to your EC2 Windows instance using Remote Desktop Protocol (RDP).
  2. Open a command prompt, and then run the diskmgmt.msc command to launch Disk Management. From Action, choose Refresh.
  3. Open the context (right-click) menu for the Volume, and then choose Extend Volume.
  4. Choose Next, Next, Finish.

for more details, Please check the following article from AWS.

Windows : https://repost.aws/knowledge-center/expand-ebs-root-volume-windows
Linux : https://repost.aws/knowledge-center/expand-root-ebs-linux

답변함 일 년 전
profile pictureAWS
전문가
검토됨 일 년 전
0

As mentioned in the other replies, the OS has to extend the file system. You've presented the larger storage to the instance. The instance itself "sees" the additional storage, but it lacks a file system. So, this is similar to seeing an additional partition on the disk because the file system only covers what you had before. See the other replies from the 2 other authors, based upon your OS to extend the file system.

AWS
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠