华为云之EVS云硬盘的使用与快速入门

编程入门 行业动态 更新时间:2024-10-09 11:17:00

<a href=https://www.elefans.com/category/jswz/34/1769368.html style=华为云之EVS云硬盘的使用与快速入门"/>

华为云之EVS云硬盘的使用与快速入门

华为云之EVS云硬盘的使用与快速入门

  • 一、EVS云硬盘介绍
  • 二、购买ECS云服务器
    • 1.创建windows系统的ECS云主机
    • 2.创建Linux系统的ECS云主机
  • 三、创建EVS云硬盘
  • 四、云硬盘挂载windows系统的ECS
    • 1.挂载云硬盘windows
    • 2.登录到windows的ECS云主机
    • 3.查看磁盘列表
    • 4.初始化磁盘
    • 5.新建卷
    • 6.查看新加卷
    • 7.向磁盘写入数据
  • 五、云硬盘挂载Linux系统的ECS
    • 1.挂载到Linux系统的云主机
    • 2.进入Linux云主机
    • 3.查看磁盘列表
    • 3.磁盘分区
    • 4.格式化磁盘
    • 5.挂载分区
    • 6.向磁盘写入数据
  • 六、云硬盘EVS快照
    • 1.创建磁盘快照
    • 2.查看快照列表
    • 3.删除文件
    • 4.卸载分区
    • 5.卸载云硬盘
    • 6.使用快照恢复磁盘
    • 7.重新挂载linux云主机
    • 8.查看数据恢复情况

一、EVS云硬盘介绍

云硬盘(Elastic Volume Service)是一种为ECS、BMS等计算服务提供持久性块存储的服务,通过数据冗余和缓存加速等多项技术,提供高可用性和持久性,以及稳定的低时延性能。您可以对云硬盘做格式化、创建文件系统等操作,并对数据做持久化存储。

二、购买ECS云服务器

1.创建windows系统的ECS云主机

2.创建Linux系统的ECS云主机

三、创建EVS云硬盘

创建两块云硬盘,一块挂载windows使用,一块挂载linux使用

四、云硬盘挂载windows系统的ECS

1.挂载云硬盘windows

2.登录到windows的ECS云主机

3.查看磁盘列表

4.初始化磁盘

5.新建卷


6.查看新加卷

7.向磁盘写入数据

五、云硬盘挂载Linux系统的ECS

1.挂载到Linux系统的云主机

2.进入Linux云主机

3.查看磁盘列表

[root@ecs-b15f ~]# lsblk
NAME   MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda    253:0    0  40G  0 disk 
└─vda1 253:1    0  40G  0 part /
vdb    253:16   0  10G  0 disk 

3.磁盘分区

[root@ecs-b15f ~]# fdisk /dev/vdb
Welcome to fdisk (util-linux 2.23.2).Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xb7e5d6cb.Command (m for help): n
Partition type:p   primary (0 primary, 0 extended, 4 free)e   extended
Select (default p): p
Partition number (1-4, default 1): 
First sector (2048-20971519, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-20971519, default 20971519): 
Using default value 20971519
Partition 1 of type Linux and of size 10 GiB is setCommand (m for help): w
The partition table has been altered!Calling ioctl() to re-read partition table.
Syncing disks.

4.格式化磁盘


[root@ecs-b15f ~]# mkfs.ext4 /dev/vdb1
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
655360 inodes, 2621184 blocks
131059 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2151677952
80 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done 

5.挂载分区


[root@ecs-b15f ~]# mount /dev/vdb1 /data/
[root@ecs-b15f ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        486M     0  486M   0% /dev
tmpfs           496M     0  496M   0% /dev/shm
tmpfs           496M  6.8M  489M   2% /run
tmpfs           496M     0  496M   0% /sys/fs/cgroup
/dev/vda1        40G  2.1G   36G   6% /
tmpfs           100M     0  100M   0% /run/user/0
/dev/vdb1       9.8G   37M  9.2G   1% /data

6.向磁盘写入数据

[root@ecs-b15f ~]# cd /data/
[root@ecs-b15f data]# touch file100
[root@ecs-b15f data]# ll
total 16
-rw-r--r-- 1 root root     0 Oct 21 21:39 file100
drwx------ 2 root root 16384 Oct 21 21:37 lost+found

六、云硬盘EVS快照

1.创建磁盘快照

2.查看快照列表

3.删除文件

[root@ecs-b15f data]# ls
file100  lost+found
[root@ecs-b15f data]# rm -rf file100
[root@ecs-b15f data]# ll
total 16
drwx------ 2 root root 16384 Oct 21 21:37 lost+found
[root@ecs-b15f data]# 

4.卸载分区

umount /data

5.卸载云硬盘

6.使用快照恢复磁盘

7.重新挂载linux云主机

8.查看数据恢复情况

[root@ecs-b15f ~]# mount /dev/vdb1 /data
[root@ecs-b15f ~]# cd /data/
[root@ecs-b15f data]# ls
file100  lost+found
[root@ecs-b15f data]# 

更多推荐

华为云之EVS云硬盘的使用与快速入门

本文发布于:2024-03-13 06:50:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1733400.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:华为   入门   硬盘   快速   EVS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!