BuyVM开启IPv6及挂载Block Storage Slabs

发布于 2020-10-26  47 次阅读


进入后台,

https://manage.buyvm.net/

选择Virtual Servers-Manage-Networking-IPv6-Assign IPv6 Address-Status ON-Save Changes

#Debian
nano /etc/network/interfaces
iface eth0 inet6 static
        address 分配的IPv6地址(全)
        netmask 查询到的位掩码(一般是48)
        gateway 查询到的IPv6网关地址
#Virtual Servers-Manage-Networking-对应的IPv6地址后面的齿轮图标-Network Settings

nano /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0

reboot
ifconfig |grep -i inet6

https://manage.buyvm.net/volumes/

点击齿轮按钮,将Block Storage Slabs附加到(Attached To)VPS。

在附加好的VPS中,查看数据盘ID:

ls /dev/disk/by-id/

scsi-0BUYVM_SLAB_VOLUME-xxxx(xxxx即为ID)

格式化该储存块:

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

创建挂载文件夹:

mkdir -p /mnt/1024

挂载储存块至该文件夹:

mount -o discard,defaults /dev/disk/by-id/scsi-0BUYVM_SLAB_VOLUME-xxxx /mnt/1024

设置开机自动挂载:

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

或者

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

Love is merely a madness.