Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

This question already has an answer here:

Are disk partition labels or UUIDS stored in the partition area itself or in some other area of the hard disk?

e.g If the dd command is used is used to copy the raw partition image from one partition to another, or even onto a different hard disk. or the tar command is used (if it is stored in some special file) will the new partition have the same UUID or label?

Are they stored in some special area of the original physical disk or in the partition itself?

share|improve this question

marked as duplicate by Sven, Ward, TheCleaner, Tom O'Connor, Jenny D May 7 '13 at 13:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
Dude. the partition area IS On the hard disc, so the question can be answered with "yes". Case closed. –  TomTom May 7 '13 at 10:20
    
@TomTom The question is whether the UUID is stored in the partition area itself or stored in the partition table on the hard disk - hence the example asking if by using dd to copy the partition image to another partition on the same hard disk or even a different hard disk altogether. –  vfclists May 7 '13 at 10:46
    
@SvW Why to you link the question back to itself. –  vfclists May 7 '13 at 10:48
1  
Sorry, wrong URL went into clipboard ... serverfault.com/questions/54862/… –  Sven May 7 '13 at 10:50
    
@SvW The answer to the linked Ubuntu question does not answer my question. –  vfclists May 7 '13 at 10:50

1 Answer 1

Both the label and the UUID are part of the file system, not the partition or something inherent to the disk.

The question I linked to and that you deemed not helpful, explained that the UUID is stored in the superblock, which is a part of the file system and fully contained within the partition.

So, if you do a dd if=/dev/sda1 of=/dev/sdb1, both sda1 and sdb1 will have the same label and UUID.


Edit: More details.

  1. Google exist and it can tell you what a superblock is. This site is for professionals and I expect you to be able to get that kind of information yourself.

  2. An UUID is quasi-guaranteed to be unique at creation time. There is no explicit or implicit guarantee that it stays unique if it applied to an object and that object is cloned (as it is the case with a dd'ed file system. To make it explicit: If you clone a file system, the UUID will not be unique anymore as it is a part of the cloned filesystem.

  3. A MAC can't be considered unique for a long time now. You can change a MAC at will in many/most cases. The same is true with any aspect of a virtual machine.

share|improve this answer
    
The linked question doesn't say what a superblock is nor where it is located. The reason I ask is UUIDs are supposed to be unique everywhere, but partitions get duplicated, hence the question is to verify if blkids belong to the hard disk itself. If a partition is replicated on another disk or a new partition on the same hard disk will the blkid generated by the partitioning process be retained after the data is copied over? Another way of putting the question is whether blkids are always unique to the hardware like network MAC addresses, or even virtual hardware as may be the case. –  vfclists May 7 '13 at 11:36
    
@SwV Your answer is correct, but please edit it and make the answer as direct as possible in the best explanatory manner and more info about what superblocks are if it is important in understanding the answer –  vfclists May 7 '13 at 11:41
    
@vfclists: See my edit. –  Sven May 7 '13 at 11:53
    
As a comment on your 3rd point. MAC addresses ARE UUIDs. You can just as easily change the UUID of the filesystem. The difference of those UUID's is their permutation space and thus their collision probabilities. –  user May 7 '13 at 12:04
    
@user: My point was more along the line that the MAC is not immutable, which is an all-to common misconception. –  Sven May 7 '13 at 12:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.