UUIDs on drives
Nils Kassube
kassube at gmx.net
Sun Aug 17 12:13:42 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.
OK, I didn't follow this thread closely enough and somehow missed that
mail. Therefore I didn't know it was mainly a problem with swap
partitions. I think you can't resize a swap partition but you can only
make a new one. Anyway, with the command mkswap you can give a new
partition a designated UUID, so I seems to be a problem with gparted, not
with UUIDs.
> I have no harddisks I do not use and do not like fiddling around with
> harddisks I use (unless nessicary) , so I didn't test it.
No problem, I can easily understand that. I wouldn't play with the
partitions of the harddisk of my main machine either.
Nils
More information about the ubuntu-users
mailing list