5

While in Linux every disk got a UUID.
I just wondering will the UUID be the same if I moved the same disk from one Linux box to another?

Is it the same UUID in different machines with the same disk?
Or for a disk the UUID will change with attached machine?

Also a similar question:
Will the UUID be the same after Linux distribution reinstalled in the same machine with the same disk?
For example: First is CentOS 5, then reinstalled it to CentOS 6.

Sunry
  • 209
  • 2
  • 10
  • Do you really mean disk? Or do you mean partition/filesystem? – David Schwartz Nov 03 '13 at 12:43
  • Do you mean slices/partitions? Partition UUID's will be the same across different machines (they are stored in the MBR/GPT) but the UUID changes on each format. (So going from CentOS 5 to CentOS 6 with a format would result in a new UUID.) – Josh Atkins Nov 03 '13 at 12:44

1 Answers1

8

Every filesystem has a UUID, which is stored as part of the partition table on the disk itself, so is "portable" with the disk.

Upgrading your OS should only change the UUID of a partition if that partition was formatted.

Phil
  • 1,222
  • 1
  • 7
  • 15