FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 08-14-2008, 01:31 PM
"Brian McKee"
 
Default UUIDs on drives

On Thu, Aug 14, 2008 at 2:08 AM, Brian Astill <bastill@adam.com.au> wrote:
> On Thursday 14 August 2008 13:48:44 you wrote:
>
>> > If there is a key to unravel the info implicit in /dev/hdb3
>> > (Primary partition on the Slave drive) from its UUID, would
>> > someone please publish it.
>>
>> huh?
> The "old" system tells what drive and what partition it refers to.
> UUID doesn't. If it did, I would complain MUCH less.

But that's the point. The drive and partition numbers can and do
change - UUID doesn't.

> partition. If the install goes well, I need to change fstab so
> it mounts my home directory, rather than the one it set up by
> default. How, if UUID is all I have to identify it?

UUID is all you need to identify it! You just put it in the fstab.
Who cares what arbitrary name the disk controller software gave it?

>> Your server world is different from my desktop world. In my world
> the trend is to fewer, but much larger, drives. In my world we
> often have a "working" drive, and use the other
> for "experimenting" - changing partitions and usage as desire
> dictates. For us, UUID seems to present an unnessary barrier.

How many USB keys do you own? How about external backup drives?
Picture frames with flash memory? In the desktop world I'm used to
even my wife has multiple 'hard drives' now and she never used to.
The only problem with UUID is the names look so horrible. They have
to, but it makes them seem mysterious when it's really quite straight
forward.

Brian

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-14-2008, 01:31 PM
Rashkae
 
Default UUIDs on drives

Brian Astill wrote:
> On Thursday 14 August 2008 13:48:44 you wrote:
>
>>> If there is a key to unravel the info implicit in /dev/hdb3
>>> (Primary partition on the Slave drive) from its UUID, would
>>> someone please publish it.
>> huh?
> The "old" system tells what drive and what partition it refers to.
> UUID doesn't. If it did, I would complain MUCH less.

Explain one last time, drive numbering is no longer predictable.. There
is no longer concept of Primary and Secondary controller, other than
legacy systems. If you have such a legacy system, feel free to use the
old nomenclature at your own risk.

>
>> create a file system, they all get a fresh new UUID.
> But what if I don't want to? Say I have a 32-bit version of
> Ubuntu with a separate /home partition. Assume that after that I
> want to try the 64-bit version on a separate partition without
> risking damage to my /home. so I just install all on the one
> partition. If the install goes well, I need to change fstab so
> it mounts my home directory, rather than the one it set up by
> default. How, if UUID is all I have to identify it?
>

Dude, I answer your question (How do I create a UUID) and you counter by
asking a completely different question... stop that.

As for your new question, use blkid to display UUID's.. copy and paste
the one one want. (or, you can type them in, but that's kind of silly)


>
> That is _the_ issue, SFAIAC. I would not object to a rational ID
> plus a random component, so there would be no duplication.
>

Seriously, wtf, first you imply that Vfat would be better cause it only
has 4 bytes, you say you would not object if there was random
component.... errrgh!


> Your server world is different from my desktop world. In my world
> the trend is to fewer, but much larger, drives. In my world we
> often have a "working" drive, and use the other
> for "experimenting" - changing partitions and usage as desire
> dictates. For us, UUID seems to present an unnessary barrier.
>



*this* is my desktop.
# /dev/sda2
UUID=684c7396-a24b-495b-a59c-0ae17389e1e2 / ext3
noatime,errors=remount-ro 0 1
# /dev/sda3
UUID=6081012e-49b9-4fff-b85b-9ed47bea1488 /home ext3
noatime 0 2
UUID=37e41ef4-ac22-42bd-9a3c-10fd415e0224 /mnt/storage ext3 noatime 0 2
UUID=0170f920-8abb-402d-a2ab-13e6119b0b0c /mnt/storage2 ext3 noatime
0 2
UUID=e56ed2cd-30df-486f-aadb-468e94e8a6d1 /mnt/storage3 ext3 noatime
0 2
# /dev/sda1
UUID=56ec0882-678f-46d4-b057-324f7bd52113 none swap pri=0
0 0
UUID=61c46e3e-a646-4750-9729-e08212371a6f none swap pri=0
0 0

/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-14-2008, 01:51 PM
"Brian McKee"
 
Default UUIDs on drives

On Thu, Aug 14, 2008 at 9:44 AM, Marcin 'Qrczak' Kowalczyk
<qrczak@knm.org.pl> wrote:
> 2008/8/14 Brian McKee <brian.mckee@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.

I can come up with a half dozen other ways where UUID doesn't change
but drive letter does. What's your point? How often is swap the last
partition on your drive and you have room to expand it so that your
example is valid? If it really upsets you, label it SWAP and use
labels. Just don't move that drive somewhere else you choose to do
the same thing.... For the majority of cases UUID is better.

Brian

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-14-2008, 02:24 PM
Rashkae
 
Default UUIDs on drives

Marcin ‘Qrczak’ Kowalczyk wrote:

>
> Perhaps gparted could be improved by being able to resize the swap
> without changing its UUID. It copied swap contents to the new
> location, very slowly (slower than ext3 contents apparently) — this
> can definitely be improved if it later does simply mkswap. I don't
> know if it does mkswap after copying, I just guess from the fact that
> the UUID changes. Why does it copy swap contents at all? Perhaps it
> should just mkswap and then write back the old UUID.
>


Agreed, this could be improved. While we are on gparted wish list, why
can't gparted create fstab entries for me? With all the talk about
home users now having multiple hard drives, I think this is one of the
few places where Ubuntu usability fell behind.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-14-2008, 03:27 PM
Derek Broughton
 
Default UUIDs on drives

Brian Astill wrote:

> On Thursday 14 August 2008 13:48:44 you wrote:

Please teach your mail program to quote properly. "You" isn't an
attribution, and you're replying to more than one of us, anyway.

>> > If there is a key to unravel the info implicit in /dev/hdb3
>> > (Primary partition on the Slave drive) from its UUID, would
>> > someone please publish it.
>>
>> huh?
> The "old" system tells what drive and what partition it refers to.
> UUID doesn't. If it did, I would complain MUCH less.

You're not paying attention. UUID has nothing to do with that. It's just
a way to look up a _filesystem_. Not a device, and not a partition. If
you want to see what's mounted, you use "mount", as always.

>> create a file system, they all get a fresh new UUID.

> But what if I don't want to? Say I have a 32-bit version of
> Ubuntu with a separate /home partition. Assume that after that I
> want to try the 64-bit version on a separate partition without
> risking damage to my /home. so I just install all on the one
> partition. If the install goes well, I need to change fstab so
> it mounts my home directory, rather than the one it set up by
> default. How, if UUID is all I have to identify it?

By UUID. Or by device (but you want to be certain it's fixed). Or by
label. It's all your choice. But really, you're making a mountain out of
a molehill here. In this case you copy the line for that partition from
your old fstab to your new one. Pretty simple - and again, it's irrelevant
whether the partition was originally mounted using UUID or device name or
label.

>> you can
>> change/create a new UUID with the filesystem utilities if you
>> want. (like tune2fs, I believe, for ext3)

> But it already has one, which is used (in the example above) by
> an existing system.

Yes, it does. That _is_ the point of UUID - it being fixed, and relatively
unique, for a particular filesystem. He only gave you that information
because it appeared you wanted to be able to write your own UUID.

>> More bits = less chance accidentally duplicating a UUID from
>> random creation.
>
> That is _the_ issue, SFAIAC. I would not object to a rational ID
> plus a random component, so there would be no duplication.

When you find some duplication, _then_ object. I don't believe you're ever
going to find any, even with a 4-byte vfat UUID. 2**128 is still a very
big number.
>
>> I deal
>> with system that have several hard drives on multiple
>> controllers.. I assure you, this change is not only progress,,
>> it's outright necessity.
>
> Your server world is different from my desktop world. In my world
> the trend is to fewer, but much larger, drives. In my world we
> often have a "working" drive, and use the other
> for "experimenting" - changing partitions and usage as desire
> dictates. For us, UUID seems to present an unnessary barrier.

Only because you make it so. Besides which, UUID has to do with
_filesystems_ not drives.
--
derek


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-14-2008, 03:28 PM
Derek Broughton
 
Default UUIDs on drives

Marcin ‘Qrczak’ Kowalczyk wrote:

> 2008/8/14 Brian McKee <brian.mckee@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.

No, you're wrong there. The swap has changed. You have created a new,
different, swap partition, so the UUID must change.
--
derek


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-14-2008, 04:29 PM
Smoot Carl-Mitchell
 
Default UUIDs on drives

On Thu, 2008-08-14 at 12:27 -0300, Derek Broughton wrote:

> When you find some duplication, _then_ object. I don't believe you're ever
> going to find any, even with a 4-byte vfat UUID. 2**128 is still a very
> big number.

A quick clarification here. With a 4 byte number, there is a 1 in 2**32
(about 1 in 4 billion) chance of duplicating a UUID. It is not 1 chance
in 2**128 which is for a 128 bit number.

To get an idea of the size of 2**128 it is bigger than the estimated
number of atoms in the known universe by many many orders of magnitude.
The number of atoms in the universe is approximately 10**80 which is
approximately 2**83.
--
Smoot Carl-Mitchell
System/Network Architect
smoot@tic.com
+1 480 922 7313
cell: +1 602 421 9005

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-14-2008, 04:42 PM
Derek Broughton
 
Default UUIDs on drives

Marcin ‘Qrczak’ Kowalczyk wrote:

> 2008/8/14 Derek Broughton <news@pointerstop.ca>:
>
>>> Except when resizing the swap with gparted, where /dev/sda5 does not
>>> change but UUID does.
>>
>> No, you're wrong there. The swap has changed. You have created a new,
>> different, swap partition, so the UUID must change.
>
> I resized an ext3 partition, and moved and resized a swap partition
> (without even changing its relative order to other partitions). The
> UUID of the ext3 partition did not change. I see no reason why the
> UUID of the swap would *have to* change. It is just what was for some
> reason easier for gparted developers to do.

No, a swap "filesystem" is a fixed length, and resizing it changes it.
Resizing some real filesystems would probably do the same.
--
derek


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-14-2008, 05:04 PM
Derek Broughton
 
Default UUIDs on drives

Smoot Carl-Mitchell wrote:

> On Thu, 2008-08-14 at 12:27 -0300, Derek Broughton wrote:
>
>> When you find some duplication, _then_ object. I don't believe you're
>> ever
>> going to find any, even with a 4-byte vfat UUID. 2**128 is still a very
>> big number.
>
> A quick clarification here. With a 4 byte number, there is a 1 in 2**32
> (about 1 in 4 billion) chance of duplicating a UUID. It is not 1 chance
> in 2**128 which is for a 128 bit number.

oops. :-)

2**32 is _still_ a very big number. There are almost certainly not 4
billion vfat filesystems in the world today.
--
derek


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-14-2008, 05:24 PM
ghe
 
Default UUIDs on drives

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brian McKee wrote:

| But that's the point. The drive and partition numbers can and do
| change - UUID doesn't.

Yay! A solution for the kernel 'improvements' and the udev virus! Have
to do it by hand, it sounds like, but maybe it'll work.

| UUID is all you need to identify it! You just put it in the fstab.
| Who cares what arbitrary name the disk controller software gave it?

Disk controller software used to call SCSI drives sda... and the IDE's
hda... When I set the SCSI ID to 0 on my system (boot) disk, it'd be
called sda -- all the time -- and grub's menu.lst and fstab would never
have a problem. When I bent something, I could at least boot the system
and fix it.

Then somebody had the brilliant idea of calling everything sd... Now
whatever is scanned first, SCSI, IDE, SATA, USB sticks, whatever, gets
called sda. Very poor.

udev was supposed to fix this, I think. But the installer(s) don't build
the rules, so when I installed Heron on my Mac Pro the other day, then
turned on an external SCSI disk, then updated Ubuntu's kernel, I got to
reinstall Ubuntu.

It looks like Ubuntu's got fstab fixed and menu.lst sorta fixed (it
still refers to the BIOS' (hd0,1) -- don't know, but that may be a
problem with grub). Getting there...

- --
Glenn English
ghe@slsware.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkikamcACgkQ04yQfZbbTLYAIwCeLMhvDheMWP skNOCpalaSdHyF
xfkAmwcc2YEcuN3jhHBoqk3SWnnAqgiJ
=rHwp
-----END PGP SIGNATURE-----

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 07:00 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org