[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: using UUID's for a raid1 in /etc/fstab instead of /dev/md0

Alex Samad wrote:
On Tue, Apr 08, 2008 at 11:08:11PM -0400, Mitchell Laks wrote:

Someone recently talked about using ls -l /dev/disk/by-uuid

to figure out the correct UUID to put into /etc/fstab
for hard drives.
I have /home on a raid1 /dev/md0 which is composed of two drive partitions

Now in /etc/mdadm/mdadm.conf
I have:
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=3cfd16a0:6eaa64dd:0dfcf1b5:2690c9eb

Now, I thought to try that UUID, but when I tried that and put the line /etc/fstab


UUID=3cfd16a0:6eaa64dd:0dfcf1b5:2690c9eb  /home ext3 defaults,errors=remount-ro      0       1

It was a real bust and dropped me into control d boot land. I then fixed it /etc/fstab back to /dev/md0 and all was ok.
thats because you have placed the UUID of the parts not the fs system
that exists on the raid

try tune2fs -l /dev/md0 and use the UUID from there

So that must be the UUID for the individual /dev/sda1 and /dev/sdb1.

What is the UUID for the raid1 itself?


To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

I looked at tune2fs -l /dev/md0:
Filesystem UUID:          d3bb5b79-2d5f-438d-a60e-5437e80e2edf

from ls -l /dev/disk/by-uuid

root root 9 2008-04-07 12:51 d3bb5b79-2d5f-438d-a60e-5437e80e2edf -> ../../md0

As you can see, same UUID.  So then I went to look at /etc/fstab:

# /dev/md0
UUID=d3bb5b79-2d5f-438d-a60e-5437e80e2edf /home ext3 defaults 0 2

As you can see, same uuid and md0 is mounted by uuid.

from my menu.lst

title		Ubuntu 7.10, kernel 2.6.22-14-generic
root		(hd0,5)
kernel		/boot/vmlinuz-2.6.22-14-generic root=UUID=cbec0e90-a36f-4850-8da0-8c4ab3d94247 ro quiet splash
initrd		/boot/initrd.img-2.6.22-14-generic

different uuid becuse / is not on a raid, only /home is.  From fstab for /:

# /dev/hda6
UUID=cbec0e90-a36f-4850-8da0-8c4ab3d94247 / ext3 defaults,errors=remount-ro 0 1

Disclaimer, this is NOT debian, but ubuntu 7.10. Due to not being able to print in debian, I am currently forced to run ubuntu. Very close to debian though.

What you did not say was what version of Debian are you running? It all works here. There is the bug listed above but the dev says that sid does not fix the issue. If you are running ubuntu, it should work. (it does here, YMMV.). But then again, it always worked for me in Debian also.


Damon L. Chesser

Reply to: