Tuesday, May 29, 2007

uuid instead of /dev/sda1

Sometimes there can be problems identifying some device with install and moving around

use the
/sbin/blkid function to get information
/bin/blkid /dev/sda1

which returns the same uuid for each of the raid1 devices by the way

and

UUID=421535b5-e73d-1a2e-9a16-54b97d2ff4e6 none swap sw 0 3

here is greg folkerts comment on debian-users

How about posting it here?

---------------------------------------------

# /etc/fstab: static file system information.
#
#
proc /proc proc defaults 0 0

# /dev/hda3
UUID=456600fd-b794-4931-8703-bded8a1902bc / xfs defaults 0 1

# /dev/hda1
UUID=8a2ba95b-82d1-4905-a1ec-ceebb8cfc2b7 /boot ext3 defaults 0 2
#/dev/hda2
# /devUUID=f2986c54-13db-453a-80e3-6c75d19de15d none swap sw 0 0

# LVM Logical Volume (could use UUID but didn't)
/dev/mapper/stor-storLV /stor xfs defaults 0 0

# CD and DVD writer
/dev/hdd /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/hdc /media/cdrom1 udf,iso9660 user,noauto 0 0

# No Floppy in this machine
#/dev/ /media/floppy0 auto rw,user,noauto 0 0

#NFS Comments
void:/music /music nfs4 defaults,bg,posix,rsize=32768,wsize=32768 0 0
void:/stor /stor1 nfs4 defaults,bg,posix,rsize=32768,wsize=32768 0 0

Remaining problem:
What if you have a raid so you have 2 devices with same uuid
/dev/sda1 and /dev/sdb1 so what do you put in /etc/fstab
you would like to have
/dev/md0
if you simply put
UUID then if you took away one of the raid devices and then restored it, which would be mounted in /etc/fstab during boot?



No comments: