BuyVM Block Storage(数据盘)挂载方法

buyvm的存储块挂载方法

先在面板里把存储块分配给vps,然后重启下vps。

查找存储块名称

ls /dev/disk/by-id/

得到的结果差不多是这样的

ata-QEMU_DVD-ROM_QM00004  scsi-0BUYVM_SLAB_VOLUME-2522

这个就是 “scsi-0BUYVM_SLAB_VOLUME-2522”存储块,你看到的不同就是最后的数字不同。格式化存储块

mkfs.ext4 -F /dev/disk/by-id/scsi-0BUYVM_SLAB_VOLUME-2522

创建个挂载点

mkdir -p /mnt/pan

挂载到vps

mount -o discard,defaults /dev/disk/by-id/scsi-0BUYVM_SLAB_VOLUME-2522 /mnt/pan

查看下挂载结果

df -ls

加个开机启动

echo '/dev/disk/by-id/scsi-0BUYVM_SLAB_VOLUME-2522 /mnt/pan ext4 defaults,nofail,discard 0 0' | sudo tee -a /etc/fstab

重启vps 。特别提醒的是以上命令请修改最后的块id 为你自己的.

发表回复

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

14 − 10 =

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据