buyvm添加块存储Block Storage的方法
buyvm就是一匹黑马,vps便宜
存储也便宜1美金就有256GB的块存储,真心的实惠和良心哈
下面是 buyvm添加块存储Block Storage的方法
首先进入你的vps后台把块添加到vps ...如下图
查看硬盘分区信息
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
fdisk -l
Disk /dev/vda: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x6385f4f5
Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 39843455 39841408 19G 83 Linux
/dev/vda2 39843456 41940607 2097152 1G 82 Linux swap / Solaris
Disk /dev/sda: 256 GiB, 274877906944 bytes, 536870912 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
256GB的就是块存储的硬盘分区,下面是格式化该分区,并设置开机挂载该分区
1
2
3
mkdir /data
mkfs.ext4 -F /dev/sda
echo '/dev/sda /data ext4 defaults 0 0' | sudo tee -a /etc/fstab