Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to add new hard drives for aws and ubuntu

Shulou Source: shulou.com Published: 2022-06-01 01:49:06 09月22日 Update

Editor to share with you aws and ubuntu how to add a new hard drive, I hope you will learn something after reading this article, let's discuss it together!

1. Now create a hard disk on the aws website, note that the created Availability Zone must be in the same area as the EC2 virtual machine, because an AZ is equivalent to a data center, in order to ensure speed, it is impossible to put the hard disk and virtual machine in different data centers.

two。 Check the block storage device to see if the new hard drive is attached in the example description.

3. Now let's go to the ubuntu system / dev and see that the sda1,sdf,xvda1,xvdf is all there (notice that the name of the xvdf device viewed here is not the same as that on the aws website)

Df-h is to view mounted hard disk information.

4. Next format our new hard drive sudo mkfs-t ext4 / dev/xvdf

5. Create a new mount point. Sudo mkdir xvdf (note that I created and mounted it under / mnt)

6. Mount it. Sudo mount / dev/xvdf / mnt/xvdf

Df-h to see if it has been mounted.

7. Permanent mount (automatic mount after restart) to edit the / etc/fstab file

Vim / etc/fstab add a line to it

UUID=1aa8107b-bf5f-4777-acea-e4e009cf3ac2 / mnt/xvdb ext4 defaults,discard 00

9. Check the UUID command blkid-s UUID

After reading this article, I believe you have a certain understanding of "how to add a new hard drive to aws and ubuntu". If you want to know more about it, please follow the industry information channel. Thank you for reading!

Tags: Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Huawei Docker Shulou Tech Info Xiaomi