Linux software raid notes
Here are a few other notes on linux software raid. I created a directory called raidinfo to keep information in to make it easy to maintain the raid array. First… from the software raid howto, I’ve done the following….
sfdisk -d /dev/hda > /raidinfo/partitions.hda
sfdisk -d /dev/hde > /raidinfo/partitions.hde
So…. I’ve now got a good snapshot of the partitioning data. When I hooked up an external usb drive to add to the array, all I needed to do is this…
sfdisk /dev/sda < /raidinfo/partitions.hda
And…. I’ve got the drive partitioned.
Then I did a quick …. sudo mdadm –grow /dev/md0 -n 3 (previously 2)
and sudo mdadm –add /dev/md0 /dev/sda1
(for each partition and md0 device and things were happily syncing.) Actually, I’ve done a script to grow and add the partitions to the arrays and then to remove and “shrink” the array *(tip: – use the grow command with -n 2 to shrink.)
The master boot record is another issue (grub is used on this system.) I found a hint about grub’s batch mode and did a quick try of the following….
#!/bin/bash
cat <<EOF | /sbin/grub --batch
device (hd0) /dev/sda
root (hd0,0)
setup (hd0)
quit
EOF
which seemed to do the trick, things are still syncing (/boot had already finished though.) I’ll test once the sync is finished.
The software raid and grub how-to is excellent by the way…
The only other thing left seems to be to update the /etc/mdadm/mdadm.conf file…
cd /etc/mdadm
cp mdadm.conf mdadm.conf.`date +%y%m%d`
echo "DEVICE partitions" > mdadm.conf
mdadm --detail --scan >> mdadm.conf
Popularity: 2% [?]
Related Posts - Firewire/USB card and ethernet incompatibilities on Ubuntu 6.06 I've had a machine for quite a while that I've been working on as a "backup server". My goal with it is to have a RAID1 setup with two 250GB drives and I also wanted USB2/firewire functionality so that I could even add a USB drive to the array for......
- Ubuntu 9.04 Jaunty Netbook Remix on an Acer Aspire One ZG5 trackpad issues Recently I had the opportunity to work on an Acer Aspire One netbook. It's rare that I get the chance to work on a linux desktop system for a client. Most of my desktop users that I support run Windows (although I primarily run linux on my machines.) I get......
- Linux Software Raid Notes - Replacing Drives This post is going to be somewhat of a "link dump" for me of some pages that I've been perusing lately. After playing with RT (request tracker) - I added a few ticket items for the home network. Now, if you've been a longtime reader and sorted through ALL of......
Related Websites - Wordpress 2.9 "Carmen" released Wordpress has released the latest version of its famous blogging software! The new version 2.9, code named "Carmen" is now available for download. The new version comes with over 500 bug fixes, changes and enhancements which makes it a recommended download and install. Some of the new features include: Trashbin:......
- What to Look for in Your Blogging Software There are so many choices for blogging software on the market, that it can be very difficult to choose the right one. Every software choice has its advantages and disadvantages which means that you will have to make some decisions on your needs. This will help you to determine which......
- How Home Improvement Software Can Help You Out If you are interested in home improvement these days, you also need to be interested in what the modern world can do for you as far as home improvement is concerned. There is no type of handyman in today’s world that does not use the conveniences of modern technology to......
Similar Posts
- Ubuntu Linux Software Raid – Replacing a Failing Drive
- More linux software raid fun
- Software raid under linux (Ubuntu 6.06 Dapper Drake)
- Linux Software Raid Notes – Replacing Drives
- Firewire/USB card and ethernet incompatibilities on Ubuntu 6.06