In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
Today I'll show you how to mount and unmount AWS EBS disks. The content of the article is good. Now I would like to share it with you. Friends who feel in need can understand it. I hope it will be helpful to you. Let's read it along with the editor's ideas.
1. AWS EBS mount
1. View the volumes that have been connected
[root@worker-oss centos] # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
Xvda 202:0 0 20G 0 disk
└─ xvda1 202:1 0 20G 0 part /
Xvdf 202:80 0 30G 0 disk / fastdfs
Xvdg 202:96 0 15G 0 disk
2. Format the volume you just loaded. For example, xvdg is a newly added volume.
[root@worker-oss centos] # sudo mkfs-t xfs / dev/xvdg
Meta-data=/dev/xvdg isize=512 agcount=4, agsize=983040 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0, sparse=0
Data = bsize=4096 blocks=3932160, imaxpct=25
= sunit=0 swidth=0 blks
Naming = version 2 bsize=4096 ascii-ci=0 ftype=1
Log = internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
Realtime = none extsz=4096 blocks=0, rtextents=0
3. Check the UUID of the device xvdg
[root@worker-oss centos] # ls-al / dev/disk/by-uuid/
Total dosage 0
Drwxr-xr-x. 2 root root July 20, 01:39.
Drwxr-xr-x. 3 root root 60 July 17 14:57..
Lrwxrwxrwx. 1 root root 10 July 20 01:39 0cf71957-56a6-4302-873e-1998f81aac5b->.. / xvdg
Lrwxrwxrwx. 1 root root 11 July 17 14:57 5f1871e2-c19c-4f86-8d6c-04d5fda71a0a->.. /.. / xvda1
Lrwxrwxrwx. 1 root root 10 July 18 10:51 9a011466-05e8-475d-ac40-745309acf40a->.. / xvdf
4. Create a directory to be mounted
[root@worker-oss centos] # mkdir / db
5. Mount xvdg to the / db directory
[root@worker-oss centos] # cp / etc/fstab / etc/fstab.bak
[root@worker-oss centos] # vim / etc/fstab
UUID=5f1871e2-c19c-4f86-8d6c-04d5fda71a0a / xfs defaults 0 0
UUID=9a011466-05e8-475d-ac40-745309acf40a / fastdfs xfs defaults,nofail 0 2
UUID=0cf71957-56a6-4302-873e-1998f81aac5b / db xfs defaults,nofail 02
6. Mount the volume
[root@worker-oss db] # sudo mount-a
6. View the mounted directory
[root@worker-oss centos] # cd / db/
[root@worker-oss db] # ls-al
Total dosage 0
Drwxr-xr-x. 2 root root June 20, 01:41.
Dr-xr-xr-x. 20 root root 261 July 20 01:41..
[root@worker-oss db] #
Unmount the AWS EBS volume
1. Unmount volume fastdfs
Umount-d / dev/xvdf
2. Delete the uuid in / etc/fstab
Vim / etc/fstab/
# UUID=9a011466-05e8-475d-ac40-745309acf40a / fastdfs xfs defaults,nofail 0 2
This is all about how to perform AWS EBS disk mount and unmount. For more information about how to perform AWS EBS disk mount and unmount, you can search the previous articles or browse the following articles to learn! I believe the editor will add more knowledge to you. I hope you can support it!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.