用 blkid 获取磁盘的uuid和属性
[root@wangbin3 mysql]# sudo blkid
/dev/sda1: UUID=“bfdac8aa-c1af-4ed9-b99d-627a06000953” TYPE=“ext4”
/dev/sda2: UUID=“32bd6852-c003-47f7-a658-4b5778b66ce2” TYPE=“swap”
/dev/sdb1: UUID=“3f77961c-e61c-49c0-bd23-95a3143eee1a” TYPE=“ext4”
/dev/sdb2: UUID=“27e6b2dc-d42b-42e2-9162-fa8ed192158f” TYPE=“ext4”
修改配置文件
vim /etc/fstab
UUID=bfdac8aa-c1af-4ed9-b99d-627a06000953 / ext4 defaults 1 1
UUID=32bd6852-c003-47f7-a658-4b5778b66ce2 swap swap defaults 0 0
UUID=“3f77961c-e61c-49c0-bd23-95a3143eee1a” /usr/local/mysql ext4 defaults 1 1
UUID=“27e6b2dc-d42b-42e2-9162-fa8ed192158f” /data/mysql ext4 defaults 1 1
采用uuid的方式进行开机mount
最新推荐文章于 2021-09-16 10:48:15 发布