西数超哥博客
运维经验教程分享

修改XFS文件系统设备的UUID,解决centos 8挂载系统盘备份冲突

使用xfs_admin -U修改XFS文件系统设备的UUID:

[root@ebs-97785 data0609]# blkid
/dev/vda1: UUID="281f884a-e5c5-41b2-98bf-3838498d822b" TYPE="xfs" PARTUUID="b21d7e01-01"
/dev/vdb1: UUID="0afba912-19f8-488a-a79b-8d5c5b693d10" TYPE="ext4" PARTUUID="073b0b5f-01"
/dev/vdc1: UUID="0afba912-19f8-488a-a79b-8d5c5b693d10" TYPE="ext4" PARTUUID="073b0b5f-01"
/dev/vdd1: UUID="281f884a-e5c5-41b2-98bf-3838498d822b" TYPE="xfs" PARTUUID="b21d7e01-01"
这里看到两个uuid一样,导致系统挂载不上!
 使用uuidgen命令生成uuid:
[root@ebs-97785 data0609]# uuidgen
bb070ab1-9a68-466b-847e-f111316d51c5
[root@ebs-97785 data0609# xfs_admin -U bb070ab1-9a68-466b-847e-f111316d51c5
 /dev/vdd1
Clearing log and setting UUID
writing all SBs
new UUID = bb070ab1-9a68-466b-847e-f111316d51c5
[root@node112 ~]# blkid 
/dev/vda1: UUID="281f884a-e5c5-41b2-98bf-3838498d822b" TYPE="xfs" PARTUUID="b21d7e01-01"
/dev/vdb1: UUID="0afba912-19f8-488a-a79b-8d5c5b693d10" TYPE="ext4" PARTUUID="073b0b5f-01"
/dev/vdc1: UUID="0afba912-19f8-488a-a79b-8d5c5b693d10" TYPE="ext4" PARTUUID="073b0b5f-01"
/dev/vdd1: UUID="b5e01451-e43e-4e07-bbd5-1a727c58cdae" TYPE="xfs" PARTUUID="b21d7e01-01"
 最后mount磁盘:
[root@ebs-97785 /]# mount -t xfs /dev/vdd1 /data0609
[root@ebs-97785 data0609]# df -lh
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        3.8G     0  3.8G   0% /dev
tmpfs           3.9G  4.0K  3.9G   1% /dev/shm
tmpfs           3.9G  8.5M  3.9G   1% /run
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/vda1        30G  3.5G   27G  12% /
/dev/vdb1       127G   51G   70G  43% /home
tmpfs           781M     0  781M   0% /run/user/0
/dev/vdc1       127G   55G   66G  46% /home0609
/dev/vdd1        30G  3.5G   27G  12% /data0609

赞(0)
声明:本站发布的内容(图片、视频和文字)以原创、转载和分享网络内容为主,若涉及侵权请及时告知,将会在第一时间删除。本站原创内容未经允许不得转载:西数超哥博客 » 修改XFS文件系统设备的UUID,解决centos 8挂载系统盘备份冲突

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址