我们购买了云服务器,一般都会购买数据盘,所以第一时间需要挂载数据盘,一流素材网之前分享了如何挂载数据盘的教程。点这里查看。
但手动挂载还是有点麻烦。
好在宝塔面版团队推出一款自动挂载的工具,非常方便,支持Centos、Ubuntu、Debian、Fedora。
说明
1:本工具默认将数据盘挂载到/www目录
2:若您的磁盘已分区,且未挂载,工具会自动将分区挂载到/www
3:若您的磁盘是新磁盘,工具会自动分区并格式化成xfs/ext4文件系统
使用方法 :根据系统选择命令后进入ssh执行命令即可
已安装宝塔若想挂载迁移请先做快照
Centos系统请使用以下命令:yum install wget -y && wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && bash auto_disk.sh
Ubuntu系统请使用以下命令:wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && sudo bash auto_disk.sh
Debian系统请使用以下命令:wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && bash auto_disk.sh