FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 02-16-2011, 04:00 PM
"James Smallacombe"
 
Default Software RAID Level 1, smartd and changing dev numbers

We have about 50 CentOS servers with software RAID level 1 (mirroring).
Each week, we swap out one of the drives (the one in the second of four
hot-swap bays, only the first two of which contain drives) on each server
and take them offsite for safekeeping.

The problem is, the kernel seemingly randomly switches between /dev/sdb
and /dev/sdc for these devices. This makes the process slower by
requiring more manual input where a script(s) could otherwise suffice.

It also confuses smartd, which AFAIK, needs the correct device names to
report accurately.

Ideally, we'd like to force the OS at some level to always see these
devices as /dev/sda and /dev/sdb. If not, is there at least some way to
configure smartd to be "smart" and recognize which devices are in use?

TIA,
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-16-2011, 04:30 PM
Robert Heller
 
Default Software RAID Level 1, smartd and changing dev numbers

At Wed, 16 Feb 2011 12:00:27 -0500 (EST) CentOS mailing list <centos@centos.org> wrote:

>
> We have about 50 CentOS servers with software RAID level 1 (mirroring).
> Each week, we swap out one of the drives (the one in the second of four
> hot-swap bays, only the first two of which contain drives) on each server
> and take them offsite for safekeeping.
>
> The problem is, the kernel seemingly randomly switches between /dev/sdb
> and /dev/sdc for these devices. This makes the process slower by
> requiring more manual input where a script(s) could otherwise suffice.

I'm assuming these are actually SATA disks with a controller that
supports hot-swap.

What I think is happening is that the kernel retains some 'memory' of
the pulled drive (say /dev/sdb) and when the fresh drive is installed, a
new dev file is created (/dev/sdc). Eventually, /dev/sdb is forgotten
by the time the next 'swap' and /dev/sdb is assigned to the next fresh
disk.

Question: are you always swapping in a *new* disk each week or
re-inserting the disk from the previous week?

>
> It also confuses smartd, which AFAIK, needs the correct device names to
> report accurately.
>
> Ideally, we'd like to force the OS at some level to always see these
> devices as /dev/sda and /dev/sdb. If not, is there at least some way to
> configure smartd to be "smart" and recognize which devices are in use?

The cure might be that you need to do a reboot to properly rescan the
disks.

>
> TIA,
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
>

--
Robert Heller -- 978-544-6933 / heller@deepsoft.com
Deepwoods Software -- http://www.deepsoft.com/
() ascii ribbon campaign -- against html e-mail
/ www.asciiribbon.org -- against proprietary attachments



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-16-2011, 04:38 PM
"James Smallacombe"
 
Default Software RAID Level 1, smartd and changing dev numbers

> At Wed, 16 Feb 2011 12:00:27 -0500 (EST) CentOS mailing list
> <centos@centos.org> wrote:
>
>>
>> We have about 50 CentOS servers with software RAID level 1 (mirroring).
>> Each week, we swap out one of the drives (the one in the second of four
>> hot-swap bays, only the first two of which contain drives) on each
>> server
>> and take them offsite for safekeeping.
>>
>> The problem is, the kernel seemingly randomly switches between /dev/sdb
>> and /dev/sdc for these devices. This makes the process slower by
>> requiring more manual input where a script(s) could otherwise suffice.
>
> I'm assuming these are actually SATA disks with a controller that
> supports hot-swap.

Correct.

> What I think is happening is that the kernel retains some 'memory' of
> the pulled drive (say /dev/sdb) and when the fresh drive is installed, a
> new dev file is created (/dev/sdc). Eventually, /dev/sdb is forgotten
> by the time the next 'swap' and /dev/sdb is assigned to the next fresh
> disk.

Interesting...one would think that this behavior would be consistent
across all servers then, but it isn't. Most accept the same dev,
/dev/sdb, but some assign /dev/sdc. Is there a way to just disable
/dev/sdc and force the kernel to use /dev/sdb every time?

> Question: are you always swapping in a *new* disk each week or
> re-inserting the disk from the previous week?

It's a rotation, so re-inserting from the previous week.

>>
>> It also confuses smartd, which AFAIK, needs the correct device names to
>> report accurately.
>>
>> Ideally, we'd like to force the OS at some level to always see these
>> devices as /dev/sda and /dev/sdb. If not, is there at least some way to
>> configure smartd to be "smart" and recognize which devices are in use?
>
> The cure might be that you need to do a reboot to properly rescan the
> disks.

Ugh. Thanks for your reponse.

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 12:20 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org