just curious...

I’m curious as to why they switched the fstab disk identifiers from the traditional /dev/sda (etc.) to the newer preference - I believe it’s called UUID? The real answer is probably too technical for me…

I just did a reinstall of opensuse12.1 because I had ghosted the disk to a different piece of bare metal. But of, course, it wouldn’t boot. So I’m reinstalling the root partition and checked “by device ID” for it - so that way fstab will have entries like /dev/sda …which will allow future ghosting of the disk to arbitrary bare metal drives for backup.

The reason for the “bare metal” style backups is to make short work of a disk crash when I’m out in the field with my instruments. You just unplug one disk and plug in another. 5 minutes. (I am my own IT support - well, me and this forum ;))

There may be an easy, comprehensive backup utility these days, but it used to be that the only way to quickly have exactly the same system up and running again was a ghosted hard drive on stand-by. I guess the next simplest thing is a RAID1 system - but RAID setups are always “touchy.”

What’s the 2012 Wisdom of the Forum?

HAVE A GREAT WEEKEND!!!

Patricia

EDIT: I should have said that the main reason I’m asking is that I don’t want to switch to an fstab mode that will be discontinued or inhibit opensuse’s functionality in any significant way!

If you were to install a new disk to your system, AND your BIOS decided to list
it BEFORE the other one, you would appreciate the use of UUID.


henk@boven:~> ls -l /dev/disk/
totaal 0
drwxr-xr-x 2 root root 560 20 jul 09:15 by-id
drwxr-xr-x 2 root root 140 20 jul 09:15 by-label
drwxr-xr-x 2 root root 280 20 jul 09:15 by-path
drwxr-xr-x 2 root root 120 20 jul 09:15 by-uuid
henk@boven:~>

These are the possibilties you have. They are not openSUSE dependent, but are created by udev and IMHO will not depricate in the near future.

All have there PROs and CONs.

The good old ones are based on the sequence the devices are detected. As @lwfinger said, this can change when you add disks (*sda *may become sdb) and the same is true for plugin storage devices, it depends if you plug in USB stick A before USB stick B or the other way around when you use them at the same time.

An by-label entry is only there if you gave the file system a volume label. It is a good one to use on plugin devices like USB sticks. It travels with the device and is easy to memorize.

The by-id is used as default by an openSUSE installation. It uses a unique hardware maker’s id and will find the disk when it wanders around e.g. from sda to sdb. A CON is that when you clone the disk (or a partition), the clone is on different hardware and thus has a different by-id. Thus booting and mounting such a cloned device will not function without alterations to e.g.* /boot/grub/menu.lst* and /etc/fstab and even* initrd*.

The* by-uuid* is created on creation of a file system. It is thus like a* by-label*, but a normal human being can not memorize it. It should be unique worldwide, where a lot of people will label an USB stick BACKUP :(. Both will be copied at disk cloning, thus a cloned root disk can be used without further problems.

I can not come with a good case for the* by-path,* but I have no doubt there is.

Again without doubt, others will come with more PROs and CONs on the diferent methods (could become einteresting ;)).

The choices are, I think:
device name: “/dev/sda5”
device-id: “/dev/disk/by-id/ata-WDC_WD3200AAKS-75SBA0_WD-WCAPZ2050503-part6”
label: this depends on whether you have assigned a label to the disk.
uuid: “17b3dca0-48af-48b1-aff0-368827993254” a string that is supposedly unique to this file system.

The opensuse default seems to be device-id, except that if grub2 is used, that might want uuid for its partition.

The device names can change, depending on whether you boot from the hard drive, a USB or a CD. The device IDs are fixed, but if you replace a hard drive, the new hard drive will have a different ID. The label (if there is one) and the UUID are both stored in the file system itself, so if you clone a disk to a new drive those could or should be preserved (might depend on the cloning software).

For what you want, you should probably be using UUID or label.

OIC - now that I think about it, I’ve always been paranoid of that. I guess maybe I should just stick with UUID and give up on ghosting linux. Funny - I was able to ghost a functioning Win7 partition. I always thought linux was less sensitive than Win7 that way…

UUID is the best choice. You can select it during setup in the fstab options for each partitions (when you run the partitioner in expert mode):
http://www.unixversal.com/linux/opensuse/images/opensuse_vm_install17.jpg
http://www.unixversal.com/linux/opensuse/images/opensuse_vm_install18.jpg

Notice that the notation UUID=… in /etc/fstab reads the partition superblock (safer, slower) while the form “by-uuid” use the symlinks generated by the udev daemon.

Be careful when you clone a disk while mounting by UUID or label NOT to mount both the original and its clone at the same time (since they’ll have the same labels or UUIDs).

As far as I know, ghosting should be fine with UUID.

On 2012-07-21 03:46, PattiMichelle wrote:
> I
> guess maybe I should just stick with UUID and give up on ghosting linux.

Why? As several have already told you, there are four types of partition identification, each
with its own advantages and problems. Some are thought for use with replication, so use one
that is appropriate for that use.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)