BuyVM挂载存储块

BuyVM挂载存储块

进入 Storage Volumes 后台,将 Block Storage 附加到对应的VPS

查看数据块编号

ls /dev/disk/by-id/

格式化

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

挂载(/www/wwwroot为挂载路径)

mount -o discard,defaults /dev/disk/by-id/scsi-0BUYVM_SLAB_VOLUME-4291 /www/wwwroot

/etc/fstab文件添加一行用于开机自动挂载

/dev/disk/by-id/scsi-0BUYVM_SLAB_VOLUME-4291 /www/wwwroot ext4 defaults,nofail,discard 0 0