You are not logged in.

#1 2008-09-27 22:01:58

Dave Cohen
Member
Registered: 2008-09-27
Posts: 126

Adding new drive changes device names

Hi.  I'm an Arch newbie, but longtime linux user.  My first Arch install is also my first install of linux on RAID.  I followed these instructions: http://wiki.archlinux.org/index.php/Ins … AID_or_LVM.  So that when arch boots up I have four raid1 partitions, /dev/md0 through /dev/md3, and these partitions correspond to /dev/sda1 through /dev/sda4 and /dev/sdb1 through /dev/sdb4.  So far so good.

Then, I added another hard drive.  The first two are identical SATA drives, the new one is IDE.  Now, when I boot up, the new drive is /dev/sda, and the original drives are /dev/sdb and /dev/sdc.  This renaming has screwed up my raid arrays.  It's trying to build arrays based on the original names sda and sdb, when the disks are now sdb and sdc.

How can I set this up to work regardless of how many disks are on the machine?  Is there anyway to override the device names or use a separate scheme for the SATA drives?

Offline

#2 2008-09-27 22:41:26

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: Adding new drive changes device names

You really should use UUID in your fstab. http://wiki.archlinux.org/index.php/Fstab

Offline

#3 2008-09-28 00:50:25

Dave Cohen
Member
Registered: 2008-09-27
Posts: 126

Re: Adding new drive changes device names

That may be good advice, but doesn't solve this.

The device in my fstab is something like /dev/md1, which is a raid1 array over /dev/sda1 and /dev/sdb1.  The problem is that sda became sdb, and sdb became sdc.  So the volumes expected by my array are not both found.  I need to do something at teh mdadm level (or maybe udev).  At least that's what I suspect but I don't know exactly.

Offline

#4 2008-09-28 01:01:12

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,395
Website

Re: Adding new drive changes device names

UUID is the way to go.  This is probably a better link: http://wiki.archlinux.org/index.php/Per … ice_naming

Offline

#5 2008-09-29 18:24:21

Dave Cohen
Member
Registered: 2008-09-27
Posts: 126

Re: Adding new drive changes device names

Thanks for that link, Allan.

It appears that mdadm is a little too smart.  When I add a disk to an array using /dev/disk/by-id/xxxxxxxx, then I query the array to see what's in it, mdadm tells me /dev/sdc.  Like it's following the symlink before adding.

I feel like anytime I add or remove disks from this machine I'll need to boot from a livecd and re-arrange both my raid arrays and my grub config.  But at any rate I'm up and running until that happens.

Offline

Board footer

Powered by FluxBB