最新消息:

Centos7查看磁盘UUID三种方法

linux命令 admin 66浏览 0评论

第一种:

[root@localhost ~]# blkid

 # blkid
/dev/sda2: UUID="6dfd5fd3-881e-470f-9617-6f62d285e5a6" TYPE="xfs"
/dev/sda1: UUID="93433f5f-cf61-4706-bfaa-f82713010308" TYPE="xfs"
/dev/sda3: UUID="ce3ceed0-314e-45f1-8f0c-7eb4cb6ca750" TYPE="xfs"
/dev/sda5: UUID="02445dab-bcd3-4ebd-aff0-8f5f9e685ced" TYPE="xfs"
/dev/sda6: UUID="30d6e93c-b72a-4b3b-a0f5-caba6b34bf02" TYPE="swap"
/dev/sda7: UUID="f4cd64c1-b1bc-4d4b-8fac-4f468782abbb" TYPE="swap"
/dev/sda8: UUID="707dca29-1c80-49ad-8592-74ceca64b97f" TYPE="xfs"
/dev/sdb1: UUID="23bfe524-1112-4c3c-86e5-344961ee2c53" TYPE="xfs" PARTUUID="b4a3a34a-3f06-4859-95ec-b8ce0e2a46b2"
/dev/sdc1: UUID="b90b26ab-90b3-43c9-b6f4-388296bf879a" TYPE="xfs" PARTUUID="7a2bf62b-b375-44e3-9db7-5639c2f6b848"
/dev/sdd1: UUID="491aa032-6884-4e99-9397-3c6701a34de9" TYPE="xfs" PARTUUID="eae41a9e-fffb-4d4a-a0d1-9bbfa891801d"
/dev/sde1: UUID="e5d2461a-8484-4f0d-909b-2285a54d4280" TYPE="xfs" PARTUUID="c935136c-105b-47ea-84bf-7d8de8a4ef49"

第二种:

[root@localhost ~]# lsblk -f

 # lsblk -f
NAME   FSTYPE LABEL UUID                                 MOUNTPOINT
sda
├─sda1 xfs          93433f5f-cf61-4706-bfaa-f82713010308 /usr
├─sda2 xfs          6dfd5fd3-881e-470f-9617-6f62d285e5a6 /var
├─sda3 xfs          ce3ceed0-314e-45f1-8f0c-7eb4cb6ca750 /
├─sda4
├─sda5 xfs          02445dab-bcd3-4ebd-aff0-8f5f9e685ced /tmp
├─sda6 swap         30d6e93c-b72a-4b3b-a0f5-caba6b34bf02
├─sda7 swap         f4cd64c1-b1bc-4d4b-8fac-4f468782abbb [SWAP]
└─sda8 xfs          707dca29-1c80-49ad-8592-74ceca64b97f /data1
sdb
└─sdb1 xfs          23bfe524-1112-4c3c-86e5-344961ee2c53 /vm1
sdc
└─sdc1 xfs          b90b26ab-90b3-43c9-b6f4-388296bf879a /vm2
sdd
└─sdd1 xfs          491aa032-6884-4e99-9397-3c6701a34de9 /vm3
sde
└─sde1 xfs          e5d2461a-8484-4f0d-909b-2285a54d4280 /vm4

第三种:

[root@localhost ~]# ll /dev/disk/by-uuid/

 # ll /dev/disk/by-uuid/
total 0
drwxr-xr-x 2 root root 260 2018-10-30 17:00:01.293538450 +0800 .
drwxr-xr-x 6 root root 120 2018-10-30 16:52:57.440240003 +0800 ..
lrwxrwxrwx 1 root root  10 2018-10-30 16:59:07.231280616 +0800 02445dab-bcd3-4ebd-aff0-8f5f9e685ced -> ../../sda5
lrwxrwxrwx 1 root root  10 2018-10-30 16:53:01.764239999 +0800 23bfe524-1112-4c3c-86e5-344961ee2c53 -> ../../sdb1
lrwxrwxrwx 1 root root  10 2018-10-30 17:05:04.722922608 +0800 30d6e93c-b72a-4b3b-a0f5-caba6b34bf02 -> ../../sda6
lrwxrwxrwx 1 root root  10 2018-10-30 16:53:01.745239999 +0800 491aa032-6884-4e99-9397-3c6701a34de9 -> ../../sdd1
lrwxrwxrwx 1 root root  10 2018-10-30 16:59:06.974303158 +0800 6dfd5fd3-881e-470f-9617-6f62d285e5a6 -> ../../sda2
lrwxrwxrwx 1 root root  10 2018-10-30 17:00:01.293538450 +0800 707dca29-1c80-49ad-8592-74ceca64b97f -> ../../sda8
lrwxrwxrwx 1 root root  10 2018-10-30 16:59:06.973303245 +0800 93433f5f-cf61-4706-bfaa-f82713010308 -> ../../sda1
lrwxrwxrwx 1 root root  10 2018-10-30 16:53:01.744239999 +0800 b90b26ab-90b3-43c9-b6f4-388296bf879a -> ../../sdc1
lrwxrwxrwx 1 root root  10 2018-10-30 16:59:06.975303070 +0800 ce3ceed0-314e-45f1-8f0c-7eb4cb6ca750 -> ../../sda3
lrwxrwxrwx 1 root root  10 2018-10-30 16:53:01.746239999 +0800 e5d2461a-8484-4f0d-909b-2285a54d4280 -> ../../sde1
lrwxrwxrwx 1 root root  10 2018-10-30 17:05:04.660928045 +0800 f4cd64c1-b1bc-4d4b-8fac-4f468782abbb -> ../../sda7

转载请注明:热门技术 » Centos7查看磁盘UUID三种方法

发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

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