![]() |
HowTo.RAID1OnSlugOS HistoryHide minor edits - Show changes to markup January 08, 2008, at 12:17 PM
by -- formatting
Changed lines 47-48 from:
Before you move the root filesystem first properly initialise the Slug-OS further. This is described at InitialisingOpenSlug. to:
Before you move the root filesystem first properly initialise the Slug-OS further. This is described at InitialisingOpenSlug. (Note that the link on the InitialisingDisks is linking to a document for OpenSlug 2.5 and we are on 3.10beta). January 08, 2008, at 12:16 PM
by -- formatting
Changed lines 25-26 from:
Logon with the default root password, see [[OpenSlugDefaultPassword]. The password is likely opeNSLUg to:
Logon with the default root password, see OpenSlugDefaultPassword. The password is likely opeNSLUg January 08, 2008, at 12:16 PM
by -- formatting
Changed lines 17-18 from:
Details at UsingTheBinary? to:
Details at UsingTheBinary Changed lines 25-26 from:
Logon with the default root password, see OpenSlugDefaultPassword?. The password is likely opeNSLUg to:
Logon with the default root password, see [[OpenSlugDefaultPassword]. The password is likely opeNSLUg Changed lines 47-48 from:
Before you move the root filesystem first properly initialise the Slug-OS further. This is described at InitialisingOpenSlug (note that the link on the InitialiseDisks? is linking to a document for OpenSlug 2.5 and we are on 3.10beta). to:
Before you move the root filesystem first properly initialise the Slug-OS further. This is described at InitialisingOpenSlug. Changed line 174 from:
to:
Changed lines 176-177 from:
# root@NAS01?:/etc/dropbear# mv dropbear_rsa_host_key dropbear_rsa_host_key.orig # root@NAS01?:/etc/dropbear# dropbearkey -t rsa -f dropbear_rsa_host_key to:
# root@NAS01:/etc/dropbear# mv dropbear_rsa_host_key dropbear_rsa_host_key.orig # root@NAS01:/etc/dropbear# dropbearkey -t rsa -f dropbear_rsa_host_key December 26, 2007, at 05:59 PM
by --
Added lines 172-178:
Additional steps
After rebooting, during connect your ssh client will prompt you that the finger print has been changed. Accept the new key/finger print. December 26, 2007, at 05:45 PM
by --
Deleted lines 171-174:
Additional steps
December 26, 2007, at 12:51 PM
by -- Complete the How-To
Changed lines 170-175 from:
The configuration of the RAID-1 on Slug-OS is now completed. to:
The configuration of the RAID-1 on Slug-OS is now completed. Additional steps
December 24, 2007, at 08:52 PM
by --
Changed lines 1-3 from:
(:title How to enable RAID1 on SluOS:) Introductionto:
(:title How to enable RAID1 on SlugOS:) IntroductionChanged lines 6-7 from:
Step 1 Download the Slug-OS binaryto:
Step 1 Download the Slug-OS binaryChanged lines 10-11 from:
Step 2 Install upslug2to:
Step 2 Install upslug2Changed lines 15-16 from:
Step 3 Flash Slug-OS to the NSLU2to:
Step 3 Flash Slug-OS to the NSLU2Changed lines 21-22 from:
Step 4 Initialize the disksto:
Step 4 Initialize the disksChanged lines 63-64 from:
Step 5 Enable RAID-1to:
Step 5 Enable RAID-1Changed lines 109-110 from:
Step 6 Auto start/stop RAIDto:
Step 6 Auto start/stop RAIDChanged lines 113-114 from:
Create the myraid init scriptto:
Create the myraid init scriptChanged lines 163-164 from:
Install the myraid init scriptto:
Install the myraid init scriptDecember 24, 2007, at 08:50 PM
by -- Draft completed
Changed lines 4-5 from:
I tried to run Raid1 on Unslung (Raid1onUnslung6), but did not end up with a working device :-( To me it was unclear why the scripts didn't work. So I decided to try Slug-OS/BE HomePage. My first try did work and here is the overview of the steps taken. The steps are written for two empty disks, so no backup of any data is taken into account. to:
I tried to run Raid1 on Unslung (Raid1onUnslung6), but did not end up with a working device :-( To me it was unclear why the scripts didn't work. So I decided to try Slug-OS/BE, see HomePage. My first try did work and here is the overview of the steps taken. The steps are written for two empty disks, so no backup of any data is taken into account. Changed line 31 from:
At InitialisingDisks is described how to setup one disk. The basics of the description are valid for the setup of RAID-1 as well. So take that page as starting point and apply the changes as desccribed in here. to:
At InitialisingDisks is described how to setup one disk. The basics of the description are valid for the setup of RAID-1 as well. So take that page as starting point and apply the changes as described in here. Changed lines 41-42 from:
After rebooting continue with the section '"Initializing disks"'. Don't make the file system on /dev/sda3, we will do that after the raid is configured. Also initialise /dev/sdb1. to:
After rebooting continue with the section "Initializing disks". Don't make the file system on /dev/sda3, we will do that after the raid is configured. Also initialise /dev/sdb1. Changed lines 45-46 from:
The next section is the '"Moving root file system"' section. to:
The next section is the "Moving root file system" section. Changed lines 49-52 from:
So run the "turnup init", "turnup preserve" and reboot Now it is time to move the root file system: turnup disk -i /dev/sda1 -t ext3 to:
So run the # turnup init # turnup preserve and reboot Now it is time to move the root file system # turnup disk -i /dev/sda1 -t ext3 Changed lines 59-60 from:
Continue with the '"Finishing up"' section to:
Continue with the "Finishing up" section December 24, 2007, at 08:40 PM
by --
Changed lines 29-31 from:
Note: the two leds for the indication of DISK1? and DISK2? will not light. It should be possible to connect more then two drives through a USB-hub. So it does not really make sense to control the lights as it does for unslung with the hard map between the ports and drives. At InitialisingDisks is described. The basic of the description are valid for the setup of RAID1? as well. to:
Note: the two leds for the indication of DISK-1 and DISK-2 will not light. It should be possible to connect more then two drives through a USB-hub. So it does not really make sense to control the lights as it does for unslung with the hard map between the ports and drives. At InitialisingDisks is described how to setup one disk. The basics of the description are valid for the setup of RAID-1 as well. So take that page as starting point and apply the changes as desccribed in here. Changed lines 59-60 from:
to:
Step 5 Enable RAID-1Changed lines 67-70 from:
to:
# ipkg update # ipkg install udev-utils (from 1, don't know the reason)) Changed lines 72-76 from:
Install the kernel module (md-mod is installed automatical as a dependency)
to:
# ipkg install mdadm Install the kernel module (md-mod is installed automatic as a dependency) # ipkg install kernel-module-raid1 Changed lines 78-80 from:
to:
# insmod /lib/modules/2.6.16/kernel/drivers/md/md-mod.ko # insmod /lib/modules/2.6.16/kernel/drivers/md/raid1.ko Changed lines 82-84 from:
to:
# cat /proc/modules or with # lsmod Changed lines 86-88 from:
to:
# mknod /dev/md0 b 9 4 2>/dev/null # mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda3 /dev/sdb3 Changed lines 90-91 from:
to:
# mkfs.ext3 /dev/md0 Changed lines 94-95 from:
After 10 minutes (320GB disks) continue the configuration to:
After 10 minutes (320GB disks) waiting on building the filesystem, continue the configuration. Changed line 97 from:
to:
# cat /proc/mdstat Changed lines 103-108 from:
Step 6 Auto start/stop RAID If the RAID is not properly then after reboot the resync will take another 10 hours. to:
# mount /dev/md0 /home Step 6 Auto start/stop RAIDIf the RAID is not properly stopped then after reboot the resync will take place, which will take another 10 hours. Create the myraid init scriptChanged lines 113-122 from:
touch /var/lock/myraid
case "$1" in start) to:
#! /bin/sh # /etc/init.d/myraid # # Some things that run always touch /var/lock/myraid # Carry out specific functions when asked to by the system case "$1" in start) Changed lines 142-148 from:
esac exit 0 Create the file myraid in /etc/init.d and
to:
esac exit 0 Create the file myraid, as shown above, in /etc/init.d and # chmod +xxx myraid Changed lines 151-152 from:
to:
# myraid stop # cat /proc/mdstat Changed lines 155-156 from:
to:
# myraid start # cat /proc/mdstat Changed lines 159-160 from:
Install the myraid init script to:
Install the myraid init scriptChanged lines 162-171 from:
Now you should be able to reboot the NSLU2 keeping the RAID clean (ofcourse after the first resync has been completed). Step 7 Install samba Step 8 Protect the NSLU2 Generate another SSL key to:
# update-rc.d myraid defaults Now you should be able to reboot the NSLU2 keeping the RAID clean (of course after the first resync has been completed). The configuration of the RAID-1 on Slug-OS is now completed. December 24, 2007, at 08:28 PM
by --
Changed lines 15-17 from:
Step 3 Flash SlugOS to the NSLU2 Details at http://www.nslu2-linux.org/wiki/SlugOS/UsingTheBinary to:
Step 3 Flash Slug-OS to the NSLU2Details at UsingTheBinary? Changed lines 21-26 from:
Step 4 Initialize the disks Start the NSLU2 without the disks attached. ssh to the NSLU2. ssh -l root@192.168.xx.xx Logon in with the default root password, see http://www.nslu2-linux.org/wiki/FAQ/OpenSlugDefaultPassword. The password is likely opeNSLUg to:
Step 4 Initialize the disksStart the NSLU2 without the disks attached. ssh to the NSLU2, ssh -l root@192.168.xx.xx Logon with the default root password, see OpenSlugDefaultPassword?. The password is likely opeNSLUg Added line 28:
Changed lines 31-32 from:
At http://www.nslu2-linux.org/wiki/OpenSlug/InitialisingDisks is described. The basic of the description are valid for the setup of raid1. to:
At InitialisingDisks is described. The basic of the description are valid for the setup of RAID1? as well. Added line 34:
Changed lines 41-42 from:
After rebooting continue with the section "Initializing disks". Don't make the file system on /dev/sda, we will do that after the raid is configured. Also initialise /dev/sdb1. to:
After rebooting continue with the section '"Initializing disks"'. Don't make the file system on /dev/sda3, we will do that after the raid is configured. Also initialise /dev/sdb1. Changed lines 45-46 from:
The next section is the "Moving root file system" section. Before you move the root filesystem first properly initialise the SlugOS further. This is described at http://www.nslu2-linux.org/wiki/OpenSlug/InitialisingOpenSlug (note that the link on the InitialiseDisks? is linking to a document for OpenSlug 2.5 and we are on 3.10beta). to:
The next section is the '"Moving root file system"' section. Before you move the root filesystem first properly initialise the Slug-OS further. This is described at InitialisingOpenSlug (note that the link on the InitialiseDisks? is linking to a document for OpenSlug 2.5 and we are on 3.10beta). Added line 50:
Changed lines 55-56 from:
Continue with the "Finishing up" section to:
Continue with the '"Finishing up"' section Changed lines 59-63 from:
Now the NSLU2 runs SlugOS and starts from the first partition on the first USB drive. The following is inspired by http://n0tablog.wordpress.com/howtos/software-raid-6-on-openslug/ (1))and http://www.nslu2-linux.org/wiki/HowTo/Raid1onUnslung6. to:
Step 5 Enable RAID1?Now the NSLU2 runs Slug-OS and starts from the first partition on the first USB drive. The following is inspired by http://n0tablog.wordpress.com/howtos/software-raid-6-on-openslug/ (1))and Raid1onUnslung6. December 24, 2007, at 08:22 PM
by --
Changed lines 6-7 from:
Step 1 Download the SlugOS binaryto:
Step 1 Download the Slug-OS binaryChanged lines 10-11 from:
Step 2 Install upslug2 to:
Step 2 Install upslug2Changed lines 13-14 from:
Details at http://www.nslu2-linux.org/wiki/Main/UpSlug2 to:
Details at UpSlug2 December 24, 2007, at 08:20 PM
by --
Added line 1:
(:title How to enable RAID1 on SluOS:) Changed lines 4-9 from:
I tried to run Raid1 on Unslung (Raid1onUnslung6), but did not end up with a working device :-( To me it was unclear why the scripts didn't work. So I decided to try SlugOS/BE http://www.nslu2-linux.org/wiki/SlugOS/HomePage. My first try did work and here is the overview of the steps taken. The steps are written for two empty disks, so no backup of any data is taken into account. Step 1 Download the SlugOSThe binary is available at: http://www.slug-firmware.net/ to:
I tried to run Raid1 on Unslung (Raid1onUnslung6), but did not end up with a working device :-( To me it was unclear why the scripts didn't work. So I decided to try Slug-OS/BE HomePage. My first try did work and here is the overview of the steps taken. The steps are written for two empty disks, so no backup of any data is taken into account. Step 1 Download the SlugOS binaryThe binary is available at: http://www.slug-firmware.net/ December 24, 2007, at 08:15 PM
by -- How to enable RAID1 on SlugOS
Added lines 1-158:
IntroductionI tried to run Raid1 on Unslung (Raid1onUnslung6), but did not end up with a working device :-( To me it was unclear why the scripts didn't work. So I decided to try SlugOS/BE http://www.nslu2-linux.org/wiki/SlugOS/HomePage. My first try did work and here is the overview of the steps taken. The steps are written for two empty disks, so no backup of any data is taken into account. Step 1 Download the SlugOSThe binary is available at: http://www.slug-firmware.net/ Step 2 Install upslug2 You need upslug2 installed on your Linux computer to flash the NSLU2. Details at http://www.nslu2-linux.org/wiki/Main/UpSlug2 Step 3 Flash SlugOS to the NSLU2 Details at http://www.nslu2-linux.org/wiki/SlugOS/UsingTheBinary Command: ./upslug2 --image=../slugosbe/openslug-3.10-beta.bin Step 4 Initialize the disks Start the NSLU2 without the disks attached. ssh to the NSLU2. ssh -l root@192.168.xx.xx Logon in with the default root password, see http://www.nslu2-linux.org/wiki/FAQ/OpenSlugDefaultPassword. The password is likely opeNSLUg Connect the 2 drives to the NSLU2 Note: the two leds for the indication of DISK1? and DISK2? will not light. It should be possible to connect more then two drives through a USB-hub. So it does not really make sense to control the lights as it does for unslung with the hard map between the ports and drives. At http://www.nslu2-linux.org/wiki/OpenSlug/InitialisingDisks is described. The basic of the description are valid for the setup of raid1. Start with the creation the three partitions on /dev/sda as described (I've increased to first partition to 4Gb). Make the change to the swap partition as described. In addition set the type of the third partition to fd (Linux raid autodetect). Before rebooting the NSLU2 first perform the same tasks on /dev/sdb. On the second drive, the first 4Gb and the swap will not be used further. Only the large data partition will be used in the RAID. Reboot the NSLU2 after defining the partition table for both /dev/sda and /dev/sdb. After rebooting continue with the section "Initializing disks". Don't make the file system on /dev/sda, we will do that after the raid is configured. Also initialise /dev/sdb1. Reboot the NSLU2 again. The next section is the "Moving root file system" section. Before you move the root filesystem first properly initialise the SlugOS further. This is described at http://www.nslu2-linux.org/wiki/OpenSlug/InitialisingOpenSlug (note that the link on the InitialiseDisks? is linking to a document for OpenSlug 2.5 and we are on 3.10beta). So run the "turnup init", "turnup preserve" and reboot Now it is time to move the root file system: turnup disk -i /dev/sda1 -t ext3 Reboot again to boot from the file system. Continue with the "Finishing up" section As nothing needs to be done on /dev/sda3 only update /etc/fstab for /dev/sda2 Now the NSLU2 runs SlugOS and starts from the first partition on the first USB drive. The following is inspired by http://n0tablog.wordpress.com/howtos/software-raid-6-on-openslug/ (1))and http://www.nslu2-linux.org/wiki/HowTo/Raid1onUnslung6. Boot the NSLU2 and login as root Update the installer:
Install the raid admin tool
Install the kernel module (md-mod is installed automatical as a dependency)
Start the raid kernel modules
Check that modules are running
Define the raid
Build the filesystem
You will see both disks active :-) After 10 minutes (320GB disks) continue the configuration The NSLU2 might be a little less responsive as the raid is checked. See it with:
It will take about 10 hours to get the disks in sync. But you can continue with the next steps anyway. Don't start dumping your files here until everything is fully up and running. I prefer to mount the raid to /home, so for all other accounts the data will be on the raid. Root already has his homedir root in /home. It's empty, so I didn't bother, root has also a home at /root. Mount the raid partition
Step 6 Auto start/stop RAID If the RAID is not properly then after reboot the resync will take another 10 hours. A very basic (no error checking or whatever) script for start/stop is:
touch /var/lock/myraid
case "$1" in start)
echo "Starting script myraid "
/sbin/insmod /lib/modules/2.6.16/kernel/drivers/md/md-mod.ko
/sbin/insmod /lib/modules/2.6.16/kernel/drivers/md/raid1.ko
/bin/umount /dev/sda3
/bin/umount /dev/sdb3
/bin/mknod /dev/md0 b 9 4 2>/dev/null
/sbin/mdadm --assemble /dev/md0 /dev/sda3 /dev/sdb3
/bin/mount /dev/md0 /home
;;
stop)
echo "Stopping script myraid"
/bin/umount /dev/md0
/sbin/mdadm --stop /dev/md0
;;
*)
echo "Usage: /etc/init.d/myraid {start|stop}"
exit 1
;;
esac exit 0 Create the file myraid in /etc/init.d and
Test the script
The output of cat shows that no raid is active
The output of cat shows that the raid is active and likely still resyncing :-) Install the myraid init script The script is at the right place now /etc/init.d. Now it must be started and stopped automatical. Go for the defaults with the install of the myraid init script.
Now you should be able to reboot the NSLU2 keeping the RAID clean (ofcourse after the first resync has been completed). Step 7 Install samba Step 8 Protect the NSLU2 Generate another SSL key |