Note: UUID-universally unique identifiers is a globally unique identifier.
I. How to obtain the uuid of a Linux disk partition
1. [San @ localhost ~] $ LS-L/dev/Disk/by-UUID/
Total 0
Lrwxrwxrwx 1 Root 10 2010-01-18 0733f5c1-cb85-4f98-9d4f-122cfcee9806-> http://www.cnblogs.com/sdc1
Lrwxrwxrwx 1 Root 10 2010-01-18 03754-1bdb-> http://www.cnblogs.com/sda5
Lrwxrwxrwx 1 Root 10 2010-01-18 041a18221-6b1f-4ca2-9bc3-dc1_c87d932-> http://www.cnblogs.com/sda9
Lrwxrwxrwx 1 Root 10 2010-01-18 057183ff9-d4a5-4623-a47f-f8f17339be03-> http://www.cnblogs.com/sda7
Lrwxrwxrwx 1 Root 10 2010-01-18 06bdfda-f-cad7-4197-b0d9-4ddc6df1de2d-> http://www.cnblogs.com/sda8
Lrwxrwxrwx 1 Root 10 2010-01-18 ae6dcc02-3f7f-47cc-8a6e-e29218b4d345-> http://www.cnblogs.com/sda6
Lrwxrwxrwx 1 Root 10 2010-01-18 CC47-2A04-> http://www.cnblogs.com/sda1
Lrwxrwxrwx 1 Root 10 2010-01-18 d2154d3e-3006-4a05-a134-f721145f1670-> http://www.cnblogs.com/sdc2
Lrwxrwxrwx 1 Root 10 2010-01-18 df974270-dbba-4f87-8121-427636dab396-> http://www.cnblogs.com/sdc3
Lrwxrwxrwx 1 Root 10 2010-01-18 f535fef8-f392-4c84-8e7a-85915d9179fb-> http://www.cnblogs.com/sdb1
VS:
Lrwxrwxrwx 1 Root 10 2010-01-18 0733f5c1-cb85-4f98-9d4f-122cfcee9806-> http://www.cnblogs.com/sdb1
Lrwxrwxrwx 1 Root 10 2010-01-18 03754-1bdb-> http://www.cnblogs.com/sda5
Lrwxrwxrwx 1 Root 10 2010-01-18 041a18221-6b1f-4ca2-9bc3-dc1_c87d932-> http://www.cnblogs.com/sda9
Lrwxrwxrwx 1 Root 10 2010-01-18 057183ff9-d4a5-4623-a47f-f8f17339be03-> http://www.cnblogs.com/sda7
Lrwxrwxrwx 1 Root 10 2010-01-18 06bdfda-f-cad7-4197-b0d9-4ddc6df1de2d-> http://www.cnblogs.com/sda8
Lrwxrwxrwx 1 Root 10 2010-01-18 ae6dcc02-3f7f-47cc-8a6e-e29218b4d345-> http://www.cnblogs.com/sda6
Lrwxrwxrwx 1 Root 10 2010-01-18 CC47-2A04-> http://www.cnblogs.com/sda1
Lrwxrwxrwx 1 Root 10 2010-01-18 d2154d3e-3006-4a05-a134-f721145f1670-> http://www.cnblogs.com/sdb2
Lrwxrwxrwx 1 Root 10 2010-01-18 df974270-dbba-4f87-8121-427636dab396-> http://www.cnblogs.com/sdb3
2. Use the blkid command
[San @ localhost ~] $ Blkid/dev/sdb1
/Dev/sdb1: Label ="San"UUID ="F535fef8-f392-4c84-8e7a-85915d9179fb"Type ="Ext3"
[San @ localhost ~] $ Blkid/dev/sda6
/Dev/sda6: Label ="/"UUID ="Ae6dcc02-3f7f-47cc-8a6e-e29218b4d345"Type ="Ext3"Sec_type ="Ext2"
Ii. Functions and significance of Linux UUID
Cause 1: it is the only identifier.
UUID provides a unique identifier string for the storage device in the system, regardless of the type of the device. If you add a new storage device, such as a hard disk, to the system, it may cause some trouble. For example, the device fails to be found during startup, however, using UUID will not cause such problems.
Cause 2: The device name is not always the same
The automatically assigned device names are not always the same. They depend on the kernel loading module sequence at startup. If you start the system when you insert a USB disk and unplug it the next time, the device name distribution may be inconsistent.
Using UUID is also very helpful for mounting mobile devices-for example, I have a 24-in-One Card Reader that supports a variety of cards, UUID can always mount the same card in the same place.
Cause 3: many key features in Ubuntu are dependent on UUID now
For example, grub-the system boot program can now recognize UUID and open your/boot/GRUB/menu. lst. You can see statements similar to the following:
Title Ubuntu hard (Development Branch), kernel 2.6.24-16-generic
Root (hd2, 0)
Kernel/boot/vmlinuz-2.6.24-16-generic root = UUID = c73a37c8-ef7f-40e4-b9de-8b2f81038441 Ro quiet splash
Initrd/boot/initrd. img-2.6.24-16-generic
Quiet
Source: DIY tribe (http://www.diybl.com/course/6_system/linux/Linuxjs/2008930/147029.html)