Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Two virtual raid devices switch places every time I boot!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
kbzium
Tux's lil' helper
Tux's lil' helper


Joined: 31 Jul 2012
Posts: 146

PostPosted: Tue Apr 16, 2013 7:03 pm    Post subject: Two virtual raid devices switch places every time I boot! Reply with quote

Hello,

I have two hard drives and there are two partitions on each. One pair of partitions is set to be raid0, and the other as raid1. The thing is that they go with somehow random identifier - they swap every time I boot (md126 and md127). It just changes my fstab configuration to be just the opposite, which is annoying!
I want it this way no-matter-what:

raid0 - /mnt/storage
raid1 - /mnt/secstorage

How to do this? I have no options left :(

Thank you!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 31344
Location: 56N 3W

PostPosted: Tue Apr 16, 2013 8:11 pm    Post subject: Reply with quote

kbzium,

Use blkid to determine the UUID of the filesystem on the raid set, say
Code:
 /dev/md125: UUID="741183c2-1392-4022-a1d3-d0af8ba4a2a8" TYPE="ext2"

Be careful not to choose the UUID of one of the underlying devices, which looks like
Code:
/dev/sdb1: UUID="9392926d-6408-6e7a-8663-82834138a597" TYPE="linux_raid_member"


In your /etc/fstab put something like
Code:
UUID=741183c2-1392-4022-a1d3-d0af8ba4a2a8 /boot           ext2            noauto,noatime  1 2


This mounts the filesystem by UUID. The filesystem UUIDs are set at filesystem create time and are fixed regardless of the name of the /dev node they are attached to.

Trap for the unwary - you may not use UUIDs in grub.conf unless you also use an initrd to provide the userspace mount.

The example above is my /boot
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum