Vultr赠送的50G Block Storage使用教程 - 开发说
当前位置: 主页 » Centos » Vultr赠送的50G Block Storage使用教程

Vultr赠送的50G Block Storage使用教程

      2017年11月14日   阅读 2,227 次     0 评论   Tags: ·

Vultr最近改版了,看起来不太习惯,不过还是不丑的。Vultr今年应该会发展更好,又要新上个亚洲机房。这不又来做活动了,每个用户能申请免费50G的硬盘
50G 硬盘是SATA-based with an SSD cache
目前只可以挂在在 NY/NJ节点
Attach block storage as a secondary drive to instances in NY/NJ.
好多人说赠送的50G是永久的,但是我要明确的告诉你不是永久的,只是在BETA期间。
官方说明:
During the Beta period, Block Storage will be available in our New Jersey location for no additional charge.

50G Block Storage使用教程:

QQ截图20171114162924.jpg
QQ截图20171114164911.jpg

  • 第三步:attach Block Storage

QQ截图20171114161253.jpg

  • 第四步:分区,格式化,mount

#分区
parted -s /dev/vdb mklabel gpt
parted -s /dev/vdb unit mib mkpart primary 0% 100%

#格式化
mkfs.ext4 /dev/vdb1
mkdir /mnt/blockstorage
#开机自动挂载
echo >> /etc/fstab
echo /dev/vdb1               /mnt/blockstorage       ext4    defaults,noatime 0 0 >> /etc/fstab
mount /mnt/blockstorage

#查看:
fdisk -l

[root@vultr ~]# fdisk -l

Disk /dev/vda: 21.5 GB, 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
Disk label type: dos
Disk identifier: 0x00092061

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *        2048    41942999    20970476   83  Linux
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

#下面这个/dev/vdb就是那50G Block Storage
Disk /dev/vdb: 53.7 GB, 53687091200 bytes, 104857600 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
Disk label type: gpt
Disk identifier: 10309895-54D2-4D0C-9CAF-512B32DAD1F8


#         Start          End    Size  Type            Name
 1         2048    104855551     50G  Microsoft basic primary
 #查看:
[root@vultr ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        234M     0  234M   0% /dev
tmpfs           244M     0  244M   0% /dev/shm
tmpfs           244M  4.4M  239M   2% /run
tmpfs           244M     0  244M   0% /sys/fs/cgroup
/dev/vda1        20G  4.0G   15G  22% /
/dev/vdb1        50G  481M   47G   2% /mnt/blockstorage
tmpfs            49M     0   49M   0% /run/user/0

删除VPS后,保存在Block Storage的数据并不会消失,保存时长未知,最好备份一份,VPS脚本自动备份数据到Dropbox 只需要新建VPS,重新挂载即可,正确的挂载方式:

新建VPS,连接Block Storage,点击:Attach按钮,系统会自动链接,链接完成后,VPS会自动重启,重启完成后执行以下命令,记得不要执行上面的命令,上面的命令是第一次挂载需要格式化Block Storage这个数据盘:

QQ截图20171117212737.jpg


[root@vultr ~]# fdisk -l

Disk /dev/vda: 21.5 GB, 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
Disk label type: dos
Disk identifier: 0x00092061

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *        2048    41942999    20970476   83  Linux
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/vdb: 53.7 GB, 53687091200 bytes, 104857600 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
Disk label type: gpt


#         Start          End    Size  Type            Name
 1         2048    104855551     50G  Microsoft basic primary
[root@vultr ~]# mkdir /mnt/blockstorage
[root@vultr ~]#  echo >> /etc/fstab
[root@vultr ~]# echo /dev/vdb1 /mnt/blockstorage ext4 defaults,noatime 0 0 >> /etc/fstab
[root@vultr ~]# mount /mnt/blockstorage
[root@vultr ~]# df -h 

Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        20G  1.2G   18G   7% /
devtmpfs        235M     0  235M   0% /dev
tmpfs           245M     0  245M   0% /dev/shm
tmpfs           245M  8.3M  236M   4% /run
tmpfs           245M     0  245M   0% /sys/fs/cgroup
tmpfs            49M     0   49M   0% /run/user/0
/dev/vdb1        50G  1.1G   46G   3% /mnt/blockstorage  (出现此行代表挂载成功)
  • 版权声明:本文版权归开发说和原作者所有,未经许可不得转载。文章部分来源于网络仅代表作者看法,如有不同观点,欢迎进行交流。除非注明,文章均由 开发说 整理发布,欢迎转载,转载请带版权。

  • 来源:开发说 ( https://www.kaifashuo.com/ ),提供主机优惠信息深度测评和服务器运维编程技术。
  • 链接:https://www.kaifashuo.com/141.html
  • 评论(0

    1. 还没有任何评论,你来说两句吧

    发表回复

    您的电子邮箱地址不会被公开。 必填项已用 * 标注