[plug] Bash script help

Brad Campbell brad at wasp.net.au
Mon May 3 18:56:42 WST 2004


G'day all,

This is really simple I'm sure..

I can do this...

brad at srv:~$ for i in /dev/sda[1-9] ; do echo $i ; done
/dev/sda1
/dev/sda2
/dev/sda3
/dev/sda4
/dev/sda5
/dev/sda6
/dev/sda7
/dev/sda8
/dev/sda9
brad at srv:~$

How do I do it for sda[1-12] ?

brad at srv:~$ for i in /dev/sda[1-12] ; do echo $i ; done
/dev/sda1
/dev/sda2

I have tried brackets, braces, quotes, commas, google.. I'm sure I'm missing something really really 
silly.

Can somone point me right please?

Oh, and while I'm here. The backup method using tar -M and 8 firewire drives worked a treat.

A few findings for the archives.

- Firewire sucks under kernel 2.6. Kernel 2.4 works flawlessly

- Under 2.4 you need to bugger around with a script to re-detect the firewire drive every disk swap

- Use tar -M -b 254 with firewire to maximise the throughput over the bus. I averaged 18.5MB/s over 
1.4TB using this, with the standard tar default of -b 20 I was getting 4-7 MB/s.

- 2.4 can't cope with block devices > 2TB.

- With 10 disks and 3 controllers you really, really notice the 133MB/s PCI bus limit (Realistically 
about 95MB/s). 2 of these disks and 1 controller maxes out the PCI bus :p(

- A 10 disk 2.1TB raid-5 will take about 10 hours to sync because of the PCI bus speed limit.

- Raidreconf from a 7 disk 1.4TB to a 10 disk 2.1TB takes about 22 hours (and raidreconf needs to be 
patched to support > 2TB without treading on the start of your array)


Regards,
Brad.



More information about the plug mailing list