UUIDs on drives

Derek Broughton news at pointerstop.ca
Sun Aug 17 15:14:29 UTC 2008


Neil wrote:

> On Sun, Aug 17, 2008 at 12:45 PM, Nils Kassube <kassube at gmx.net> wrote:
>> Neil wrote:
>>> 1. You cannot resize a partition without changing it's UUID. If a
>>> partition is resized the UUID should ba changed in all the places it
>>> is used.
>>
>> What command did you use to resize your partition which didn't keep the
>> UUID? I couldn't believe what you wrote and therefore tested it with an
>> old disk which had no data of any value on it. There was a 40GB ext2
>> partition on the disk, I resized the partition to 20GB with this command:
>>
>> sudo resize2fs /dev/sdb1 20G
>>
>> Before and after resizing the partition I checked the UUID with the blkid
>> command and it was exactly the same in both cases.
>>
> I didn't test it. I read it in this thread:
> 
> On Thu, Aug 14, 2008 at 3:44 PM, Marcin 'Qrczak' Kowalczyk
> <qrczak at knm.org.pl> wrote:
>> 2008/8/14 Brian McKee <brian.mckee at gmail.com>:
>>
>>> But that's the point.  The drive and partition numbers can and do
>>> change - UUID doesn't.
>>
>> Except when resizing the swap with gparted, where /dev/sda5 does not
>> change but UUID does.

But that discussion was specifically about swap - where I maintain that two
different sized swap partitions _must_ be considered different, but a true
filesystem may potentially be grown.
-- 
derek





More information about the ubuntu-users mailing list