Software RAID setup (Was: AmigaONE && RAID install)
>>>>> "Martin" == Martin Michlmayr <tbm@cyrius.com> writes:
Martin> * Turbo Fredriksson <turbo@debian.org> [2004-05-28 09:02]:
>> A couple of years ago I wrote a patch to give RAID install
>> support to the 'debian-boot' system. It was to close to a
>> release, so nothing happened.
>>
>> But now I have the exact same problem again, so I thought I'd
>> give it a shoot. I got 'debian-installer', and are currently
>> familiarising myself with the code. I'll let you know what
>> happens (maybe it's even there already :).
Martin> There is Software RAID support already. Maybe you can
Martin> test it.
Oki, i was running the CD (20040606) through VMWare (with two 1Gb
virtual disks) just to try it out virtually before I tried it on a
real machine. These are my notes (and thoughts). I was booting with
'linux26', not 'expert26' which I tried, but thought was WAY to complex
for my needs. It asks so many questions I don't care about, and don't
want to see (I'm in a 'rush' :).
---------------------------------------------------------------------------------
1 Partitioning method:
Erase entire disk: SCSI1 (0,0,0) (sda) - 1.0 GB VMware SELECT
Erase entire disk: SCSI1 (0,1,0) (sdb) - 1.0 GB VMware
Manually edit partition table
2 Partitioning scheme:
All files in one partition
Separate partition for home directories
Multi-user system SELECT
3 Partition disks
Configure software RAID NOTE #5
Configure the LVM
Guided partitioning
Help on partitioning
SCSI1 (0,0,0) (sda) - 1.0 GB VMware
#1 primary 73.3 MB ! x ext3 / NOTE #3
#5 logical 525.3 MB x ext3 /usr
#6 logical 54.5 MB x ext3 /var
#7 logical 20.9 MB x ext3 /tmp
#8 logical 327.1 MB x ext3 /home
#9 logical 71.2 MB x swap swap
SCSI1 (0,1,0) (sdb) - 1.0 GB VMware SELECT
Undo changes to partitions
Finish partitioning and write changes to disk NOTE #4
4 Partition disks - How to use this free space:
Create a new partition
Automatically partition the free space SELECT
Clone partition table from another disk NOTE #1
Show Cylinder/Head/Sector information
5 Partition settings:
Usage method: do not use
Bootable flag: on
Size: 73.3 MB
Partition type: 0x83 (Linux ext3) NOTE #3
Done setting up the partition
Copy data from another partition
Delete the partition
6 Active devices for the RAID1 multidisk device:
[ ] /dev/scsi/host0/bus0/target0/lun0/part1
[ ] /dev/scsi/host0/bus0/target0/lun0/part5
[ ] /dev/scsi/host0/bus0/target0/lun0/part6
[ ] /dev/scsi/host0/bus0/target0/lun0/part7
[ ] /dev/scsi/host0/bus0/target0/lun0/part8
[ ] /dev/scsi/host0/bus0/target0/lun0/part9 NOTE #2
[ ] /dev/scsi/host0/bus0/target1/lun0/part1
[ ] /dev/scsi/host0/bus0/target1/lun0/part5
[ ] /dev/scsi/host0/bus0/target1/lun0/part6
[ ] /dev/scsi/host0/bus0/target1/lun0/part7
[ ] /dev/scsi/host0/bus0/target1/lun0/part8
[ ] /dev/scsi/host0/bus0/target1/lun0/part9
7 Partition disks
Configure software RAID
Configure the LVM
Guided partitioning
Help on partitioning
RAID1 device #0 - 73.2 MB Software RAID device
#1 73.2 MB NOTE #6
RAID1 device #1 - 526.2 MB Software RAID device
#1 526.2 MB
RAID1 device #2 - 54.3 MB Software RAID device
#1 54.3 MB
RAID1 device #3 - 20.8 MB Software RAID device
#1 20.8 MB
RAID1 device #4 - 327.0 MB Software RAID device
#1 327.0 MB
RAID1 device #5 - 71.1 MB Software RAID device
#1 71.1 MB
SCSI1 (0,0,0) (sda) - 1.0 GB VMware NOTE #7
#1 primary 73.3 MB ! x raid
#5 logical 525.3 MB x raid
#6 logical 54.5 MB x raid
#7 logical 20.9 MB x raid
#8 logical 327.1 MB x raid
#9 logical 71.2 MB x raid
SCSI1 (0,1,0) (sdb) - 1.0 GB VMware
#1 primary 73.3 MB ! x raid
#5 logical 525.3 MB x raid
#6 logical 54.5 MB x raid
#7 logical 20.9 MB x raid
#8 logical 327.1 MB x raid
#9 logical 71.2 MB x raid
Undo changes to partitions
Finish partitioning and write changes to disk NOTE #8
8 Create FS on partitions
if you continue, these changes to the partition
table will be written to disk.
[...]
The following partitions are going to be formatted: NOTE #9
partition #1 of SCSI1 (0,0,0) (sda) as raid NOTE #10
partition #5 of SCSI1 (0,0,0) (sda) as raid
partition #6 of SCSI1 (0,0,0) (sda) as raid
partition #7 of SCSI1 (0,0,0) (sda) as raid
partition #8 of SCSI1 (0,0,0) (sda) as raid
partition #9 of SCSI1 (0,0,0) (sda) as raid
partition #1 of SCSI1 (0,1,0) (sdb) as raid
partition #5 of SCSI1 (0,1,0) (sdb) as raid
partition #6 of SCSI1 (0,1,0) (sdb) as raid
partition #7 of SCSI1 (0,1,0) (sdb) as raid
partition #8 of SCSI1 (0,1,0) (sdb) as raid
partition #9 of SCSI1 (0,1,0) (sdb) as raid
Write these changes to disk? <Yes> <No> NOTE #11
9 Partition settings:
Usage method: physical volume for RAID NOTE #12
File system: ext3 journalling file system
Mount point: /tmp
Mount options: defaults
Bootable flag: off
Size: 20.9 MB
Done setting up the partition
Copy data from another partition
Delete the partition
---------------------------------------------------------------------------------
* NOTE #1: Create new partition?
* No - copy/duplicate partition table from disk X (so they're identical for RAID)
* Instead I had to first partition disk0, then disk1 (using automatic partitioning).
Can it be guarantied that the disks are identical that way?
- No, not if they're not the exact same type/make of disks (which isn't a
requirenment)!
* NOTE #2: View
There should be an empty line separating target0 from target1 to make it easier
to distinguish the disks. They kind'a floats together, making it hard to choose
the partitions to use for the md device... Luckily I had only two disks, which gave
me the option to just look at the very last character (the partition number). But
if i had more (say a RAID5 with lots of partitions), it whould be VERY difficult
to select them all correctly... Something like this perhaps?
/dev/scsi/host0/bus0/target0/lun0/
[ ] part1
[ ] part5
[ ] part6
[ ] part7
[ ] part8
[ ] part9
/dev/scsi/host0/bus0/target1/lun0/
[ ] part1
[ ] part5
[ ] part6
[ ] part7
[ ] part8
[ ] part9
* NOTE #3: Partition settings
* How are type 0xFD choosen (without going through a [c]fdisk on tty2)?
If selecting 'Configure software RAID' in point 4, it complains that:
- Partition table needs to be written
If selecting Yes, then FS are created on ALL partitions. Don't want
that (yet). I want RAID first, _THEN_ FS!
- That there are no partitions of type "Linux RAID Autodetect".
* NOTE #4: Write changes to disk
If this is done before BOTH (or more) of the disks are partitioned, the
installation will start. This might be obvious to those that used the
installer before. But the very first time(s) I tried it, I wanted to
create md devices, so I partitioned disk0, and saved. This so that
[c]fdisk on tty2 would have the new partition table (so that I could
change partition type to 0xFD)...
This naturaly isn't the way to go (see note 5 below).
* NOTE #5: Configure software RAID
If both disks are partitioned, the list in point 4 will look weird.
No mount points configured for disk0, only for disk1 (which is ALSO
wrong since I'm going to use RAID1 only).
After partitioning both disks, and THEN choose to configure/create
RAID devices, I will be asked if I want to save the partition table
-> Yes!
Unfortunatly (?) it will also create file system(s) here (it flashes
past so quickly, but I'm almost certain that it creates at least ONE
ext3 FS on some partition(s) here). I'd prefere that it doesn't do
this here...
When I'm given the choice to 'Create MD device', I go into tty2 to
use [c]fdisk to set partition type 0xFD on _ALL_ partitions (even
the swap) in both disks, then I can go back to tty1 and choose
'Create MD device' for all the md devices I want successfully.
After successfully managed to configure my RAID1 md devices, I end
up in something that looks like point three again (exact view is
point 7), showing first all the md devices, then all the SCSI1
devices.
* NOTE #6: Partition on MD device
Is this even possible? Isn't this a little redundant information?
It's already stated on the line above that RAID1 device #x have the
size xx.yy MB, so why state it again?
Looking closer on these 'partitions', I see that the usage flag isn't
set on the md devices, only on (all!) the SCSI1 devices. This also
means that each and every SCSI1 device have a mount point (i.e.
duplicate mount points!).
Fixing this by creating FS and mount the md devices, set nomount
on the SCSI1 devices (all I had to do was select 'Usage method'
and 'Use the parititon as a RAID device', and all the other stuff
- FS, mount {point,options} etc (see point 9) - was reset. It would
have been nice if this was done automaticly when choosing to use
RAID.
This will give me something that's very close to point 8, but with
the following additions at the top:
partition #x on RAID1 device #x as ext3
Note that I _still_get the
partition #1 of SCSI1 (0,x,0) (sdX) as raid
Which I did NOT expect...
Selecting 'Yes' anyway when asked if ok to create FS will mkfs
BOTH the mdX devices _AND_ the sdX devices! Even though I've
clearly told it NOT to!
Identical mount points for two filesystems
Two file system are assigned the same mount point (/):
RAID1 device #0 and SCSI1 (0,1,0), partition #sdb1 ().
I TRIPPLE checked that this was NOT specified before continuing
with save changes... Selecting 'Continue', will (try to) restart
the partitioner (but it seems to hang at 55%).
* NOTE #7: View
There should be an empty line (or other) to separate RAIDx devices
from each other and from the SCSIx (IDEx?) lines...
* NOTE #8: Write changes to disk
I'm done, everything looks ok. Exept there's no mount points defined
anywhere!
- Asks me if it's ok to create FS on all partitions. It doesn't look
QUITE ok (see point 8 and NOTE #10).
* NOTE #9: Language
'will be formatted'? Shouldn't the correct 'Linux english' be:
'will be getting a file system'? :)
* NOTE #10: Format partition(s)
I don't want to FS partition x on device y! I want the FS on mdX!
* NOTE #11: Write changes
If I select No here, ALL my changes are scratched (?) and I'll end
up with a restarted partitioner (which seems to hang at 55%). I
only wanted to go back to 'Create FS on partitions' (view/point 8),
not all the way back to the 'main' menu...
--
security toluene Cuba iodine North Korea SDI president Delta Force
nitrate jihad South Africa Iran explosion Panama colonel
[See http://www.aclu.org/echelonwatch/index.html for more about this]
Reply to: