All of lore.kernel.org
 help / color / mirror / Atom feed
* best practice when using removable drives and USB enclosure?
@ 2009-10-17  5:34 Tim Bostrom
  2009-10-17  8:34 ` Justin Piszcz
  2009-10-17 18:50 ` Richard Scobie
  0 siblings, 2 replies; 6+ messages in thread
From: Tim Bostrom @ 2009-10-17  5:34 UTC (permalink / raw)
  To: linux-raid

I have a four drive USB enclosure that is populated with two drives
currently in RAID1 (md1).  [pay no attention to md0]

mdadm.conf
DEVICE  /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdg1 /dev/sdh1
ARRAY   /dev/md0 level=raid5 num-devices=4
UUID=cdaba8bd:80943c6a:ab2fedca:3ef56cfb
devices=/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1
ARRAY   /dev/md1 level=raid1 num-devices=2
UUID=649526d8:828a57b4:ab2fedca:3ef56cfb devices=/dev/sdg1,/dev/sdh1

fstab
/dev/md0                /mnt/teradata           ext3    defaults       1 2
/dev/md1                /mnt/mirror             ext3    defaults        1 2


[Fri Oct 16-22:34:15] [tbostrom@teraserver ~]$ sudo mdadm --detail
--scan /dev/md1
/dev/md1:
        Version : 0.90
  Creation Time : Wed Oct 14 09:38:10 2009
     Raid Level : raid1
     Array Size : 1465135936 (1397.26 GiB 1500.30 GB)
  Used Dev Size : 1465135936 (1397.26 GiB 1500.30 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Fri Oct 16 08:11:05 2009
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : 649526d8:828a57b4:ab2fedca:3ef56cfb (local to host
teraserver.teambostrom.com)
         Events : 0.36

    Number   Major   Minor   RaidDevice State
       0       8       97        0      active sync   /dev/sdg1
       1       8      113        1      active sync   /dev/sdh1


When I created the array, I had another a third drive in the enclosure
I was using for other work and the drive letters for the two RAID1
drives were /dev/sdh1 and /dev/sdi1.  After I removed the disks and
rebooted, the array drives changed to /dev/sdg1 and /dev/sdh1.  I then
fixed my mdadm.conf and fstab to list the correct partitions.

SO..... I don't anticipate changing drives in and out of the last two
open slots of my USB enclosure, but what would be the best practice
for making sure md1 comes up at boot all the time without having to
manually go into mdadm.conf and modify it back to /dev/sdh1 and
/dev/sdi1 when I put a drive in the open drive slots?

I'm sure I'm missing some newbie Linux feature and this may not have
to do with RAID.  Any ideas?

Thank you.

-- 
-Tim

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: best practice when using removable drives and USB enclosure?
  2009-10-17  5:34 best practice when using removable drives and USB enclosure? Tim Bostrom
@ 2009-10-17  8:34 ` Justin Piszcz
  2009-10-17  9:42   ` Majed B.
  2009-10-17 18:50 ` Richard Scobie
  1 sibling, 1 reply; 6+ messages in thread
From: Justin Piszcz @ 2009-10-17  8:34 UTC (permalink / raw)
  To: Tim Bostrom; +Cc: linux-raid



On Fri, 16 Oct 2009, Tim Bostrom wrote:

> I have a four drive USB enclosure that is populated with two drives
> currently in RAID1 (md1).  [pay no attention to md0]
>
> mdadm.conf
> DEVICE  /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdg1 /dev/sdh1
> ARRAY   /dev/md0 level=raid5 num-devices=4
> UUID=cdaba8bd:80943c6a:ab2fedca:3ef56cfb
> devices=/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1
> ARRAY   /dev/md1 level=raid1 num-devices=2
> UUID=649526d8:828a57b4:ab2fedca:3ef56cfb devices=/dev/sdg1,/dev/sdh1
>
> fstab
> /dev/md0                /mnt/teradata           ext3    defaults       1 2
> /dev/md1                /mnt/mirror             ext3    defaults        1 2
>
>
> [Fri Oct 16-22:34:15] [tbostrom@teraserver ~]$ sudo mdadm --detail
> --scan /dev/md1
> /dev/md1:
>        Version : 0.90
>  Creation Time : Wed Oct 14 09:38:10 2009
>     Raid Level : raid1
>     Array Size : 1465135936 (1397.26 GiB 1500.30 GB)
>  Used Dev Size : 1465135936 (1397.26 GiB 1500.30 GB)
>   Raid Devices : 2
>  Total Devices : 2
> Preferred Minor : 1
>    Persistence : Superblock is persistent
>
>    Update Time : Fri Oct 16 08:11:05 2009
>          State : clean
> Active Devices : 2
> Working Devices : 2
> Failed Devices : 0
>  Spare Devices : 0
>
>           UUID : 649526d8:828a57b4:ab2fedca:3ef56cfb (local to host
> teraserver.teambostrom.com)
>         Events : 0.36
>
>    Number   Major   Minor   RaidDevice State
>       0       8       97        0      active sync   /dev/sdg1
>       1       8      113        1      active sync   /dev/sdh1
>
>
> When I created the array, I had another a third drive in the enclosure
> I was using for other work and the drive letters for the two RAID1
> drives were /dev/sdh1 and /dev/sdi1.  After I removed the disks and
> rebooted, the array drives changed to /dev/sdg1 and /dev/sdh1.  I then
> fixed my mdadm.conf and fstab to list the correct partitions.
>
> SO..... I don't anticipate changing drives in and out of the last two
> open slots of my USB enclosure, but what would be the best practice
> for making sure md1 comes up at boot all the time without having to
> manually go into mdadm.conf and modify it back to /dev/sdh1 and
> /dev/sdi1 when I put a drive in the open drive slots?
>
> I'm sure I'm missing some newbie Linux feature and this may not have
> to do with RAID.  Any ideas?
>
> Thank you.
>
> -- 
> -Tim
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

Hi,

mdadm --examine --scan > /etc/mdadm/mdadm.conf

Make sure this is started up at boot via mdadm (/etc/init.d/mdadm-raid 
start) in Debian, this will/should put the UUID of the arrays in the file 
and then it should not matter what the disks are named.

If you are plugging them in randomly you will need to setup an event based 
script to do something similar for you.

Justin.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: best practice when using removable drives and USB enclosure?
  2009-10-17  8:34 ` Justin Piszcz
@ 2009-10-17  9:42   ` Majed B.
  0 siblings, 0 replies; 6+ messages in thread
From: Majed B. @ 2009-10-17  9:42 UTC (permalink / raw)
  To: Tim Bostrom; +Cc: linux-raid

Hello,

I don't think it's necessary to update the mdadm config file each time
they change names, since mdadm reads the superblock on each disk to
determine the array's information, then construct the array itself.

You should be aware that using external disks through USB means that
SMART tools can't monitor your disks for bad sectors and read errors,
thus if any occur you won't know till you start getting I/O errors --
it would be almost too late by then.

On Sat, Oct 17, 2009 at 11:34 AM, Justin Piszcz <jpiszcz@lucidpixels.com> wrote:
>
>
> On Fri, 16 Oct 2009, Tim Bostrom wrote:
>
>> I have a four drive USB enclosure that is populated with two drives
>> currently in RAID1 (md1).  [pay no attention to md0]
>>
>> mdadm.conf
>> DEVICE  /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdg1 /dev/sdh1
>> ARRAY   /dev/md0 level=raid5 num-devices=4
>> UUID=cdaba8bd:80943c6a:ab2fedca:3ef56cfb
>> devices=/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1
>> ARRAY   /dev/md1 level=raid1 num-devices=2
>> UUID=649526d8:828a57b4:ab2fedca:3ef56cfb devices=/dev/sdg1,/dev/sdh1
>>
>> fstab
>> /dev/md0                /mnt/teradata           ext3    defaults       1 2
>> /dev/md1                /mnt/mirror             ext3    defaults        1
>> 2
>>
>>
>> [Fri Oct 16-22:34:15] [tbostrom@teraserver ~]$ sudo mdadm --detail
>> --scan /dev/md1
>> /dev/md1:
>>       Version : 0.90
>>  Creation Time : Wed Oct 14 09:38:10 2009
>>    Raid Level : raid1
>>    Array Size : 1465135936 (1397.26 GiB 1500.30 GB)
>>  Used Dev Size : 1465135936 (1397.26 GiB 1500.30 GB)
>>  Raid Devices : 2
>>  Total Devices : 2
>> Preferred Minor : 1
>>   Persistence : Superblock is persistent
>>
>>   Update Time : Fri Oct 16 08:11:05 2009
>>         State : clean
>> Active Devices : 2
>> Working Devices : 2
>> Failed Devices : 0
>>  Spare Devices : 0
>>
>>          UUID : 649526d8:828a57b4:ab2fedca:3ef56cfb (local to host
>> teraserver.teambostrom.com)
>>        Events : 0.36
>>
>>   Number   Major   Minor   RaidDevice State
>>      0       8       97        0      active sync   /dev/sdg1
>>      1       8      113        1      active sync   /dev/sdh1
>>
>>
>> When I created the array, I had another a third drive in the enclosure
>> I was using for other work and the drive letters for the two RAID1
>> drives were /dev/sdh1 and /dev/sdi1.  After I removed the disks and
>> rebooted, the array drives changed to /dev/sdg1 and /dev/sdh1.  I then
>> fixed my mdadm.conf and fstab to list the correct partitions.
>>
>> SO..... I don't anticipate changing drives in and out of the last two
>> open slots of my USB enclosure, but what would be the best practice
>> for making sure md1 comes up at boot all the time without having to
>> manually go into mdadm.conf and modify it back to /dev/sdh1 and
>> /dev/sdi1 when I put a drive in the open drive slots?
>>
>> I'm sure I'm missing some newbie Linux feature and this may not have
>> to do with RAID.  Any ideas?
>>
>> Thank you.
>>
>> --
>> -Tim
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
> Hi,
>
> mdadm --examine --scan > /etc/mdadm/mdadm.conf
>
> Make sure this is started up at boot via mdadm (/etc/init.d/mdadm-raid
> start) in Debian, this will/should put the UUID of the arrays in the file
> and then it should not matter what the disks are named.
>
> If you are plugging them in randomly you will need to setup an event based
> script to do something similar for you.
>
> Justin.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
       Majed B.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: best practice when using removable drives and USB enclosure?
  2009-10-17  5:34 best practice when using removable drives and USB enclosure? Tim Bostrom
  2009-10-17  8:34 ` Justin Piszcz
@ 2009-10-17 18:50 ` Richard Scobie
  2009-10-17 19:09   ` Tim Bostrom
  1 sibling, 1 reply; 6+ messages in thread
From: Richard Scobie @ 2009-10-17 18:50 UTC (permalink / raw)
  To: Tim Bostrom; +Cc: linux-raid

Tim Bostrom wrote:

> SO..... I don't anticipate changing drives in and out of the last two
> open slots of my USB enclosure, but what would be the best practice
> for making sure md1 comes up at boot all the time without having to
> manually go into mdadm.conf and modify it back to /dev/sdh1 and
> /dev/sdi1 when I put a drive in the open drive slots?

Just remove the devices= entry; it is redundent when you are using UUID's.

mdadm.conf

ARRAY   /dev/md0 level=raid5 num-devices=4
UUID=cdaba8bd:80943c6a:ab2fedca:3ef56cfb
ARRAY   /dev/md1 level=raid1 num-devices=2
UUID=649526d8:828a57b4:ab2fedca:3ef56cfb


Regards,

Richard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: best practice when using removable drives and USB enclosure?
  2009-10-17 18:50 ` Richard Scobie
@ 2009-10-17 19:09   ` Tim Bostrom
  2009-10-18 12:26     ` adfas asd
  0 siblings, 1 reply; 6+ messages in thread
From: Tim Bostrom @ 2009-10-17 19:09 UTC (permalink / raw)
  To: linux-raid

Thank you for the help.


>>You should be aware that using external disks through USB means that
>>SMART tools can't monitor your disks for bad sectors and read errors,
>>thus if any occur you won't know till you start getting I/O errors --
>>it would be almost too late by then.

Yes, this is a major sticking point.  I am doing backups of this USB
RAID1 array offline, but I'd like to get SMART status.  Long term I
see this going into an eSATA enclosure.  Just need to find reasonable
card supporting port multipliers and a good port multiplier.


>>Just remove the devices= entry; it is redundent when you are using UUID's.

Gotcha, tried this and I'm still having issues with md1 being assembled on boot.

It looks like what I'm running into now is that mdadm is assembling
the arrays before the USB drives are initialized so the drives aren't
available until the USB module is initialized.  I'm running Fedora 11
- I think I need to modify my boot time options to either have USB
brought up earlier or mdadm assemble arrays later in the boot time.
I'm not using RAID on any boot partitions so I don't necessarily need
arrays early.


-- 
-tim

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: best practice when using removable drives and USB enclosure?
  2009-10-17 19:09   ` Tim Bostrom
@ 2009-10-18 12:26     ` adfas asd
  0 siblings, 0 replies; 6+ messages in thread
From: adfas asd @ 2009-10-18 12:26 UTC (permalink / raw)
  To: linux-raid

--- On Sat, 10/17/09, Tim Bostrom <tbostrom@gmail.com> wrote:
> >>You should be aware that using external disks
> through USB means that
> >>SMART tools can't monitor your disks for bad
> sectors and read errors,
> >>thus if any occur you won't know till you start
> getting I/O errors --
> >>it would be almost too late by then.
> 
> Yes, this is a major sticking point.  I am doing
> backups of this USB
> RAID1 array offline, but I'd like to get SMART
> status.  Long term I
> see this going into an eSATA enclosure.  Just need to
> find reasonable
> card supporting port multipliers and a good port
> multiplier.

If you use an advanced format like ZFS (ZFS-FUSE) or BTRFS you get checksumming, which should help.


      

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-10-18 12:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-17  5:34 best practice when using removable drives and USB enclosure? Tim Bostrom
2009-10-17  8:34 ` Justin Piszcz
2009-10-17  9:42   ` Majed B.
2009-10-17 18:50 ` Richard Scobie
2009-10-17 19:09   ` Tim Bostrom
2009-10-18 12:26     ` adfas asd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.