| View previous topic :: View next topic |
| Author |
Message |
phil_r Apprentice


Joined: 14 Mar 2006 Posts: 265 Location: Omaha, NE, USA
|
Posted: Wed Apr 12, 2006 1:59 pm Post subject: How to create a JBOD partition / append array... [SOLVED] |
|
|
Hi guys.
120Gb partition - sda1
160Gb partition - hdd1
Is it possible to join these together as a ~280Gb partition - WITHOUT formatting the partitions?
I'm looking at RAID how-to's etc but not really seeing anything on this topic.
Thanks,
Phil.
Last edited by phil_r on Fri Apr 14, 2006 12:43 pm; edited 1 time in total |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 54513 Location: 56N 3W
|
Posted: Wed Apr 12, 2006 4:56 pm Post subject: |
|
|
phil_r,
There are several ways to jooin these drives or partitions together as a single logical drive but all the methods involve having a single filesystem on the new logical drive. Unfortunately that means the logical drive must be formatted. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
phil_r Apprentice


Joined: 14 Mar 2006 Posts: 265 Location: Omaha, NE, USA
|
Posted: Wed Apr 12, 2006 5:06 pm Post subject: |
|
|
Crapola. So I need to store 110-ishGb of data somewhere....
Ok, assuming I do, what's the best way to join them together?
I see from other posts that NeddySeagoon is "da man" when it comes to RAID so I'll take what you say to the bank
Phil. |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 54513 Location: 56N 3W
|
Posted: Wed Apr 12, 2006 5:23 pm Post subject: |
|
|
phil_r,
You can join them end to end as a single append raid. If you lose the first drive, you loose all the data but if you lose the second drive, you can still read the first one. There are no speed or redundancy advanages over a single drive this way.
You can put them together as a raid0 array where blocks of data are written to each drive alternatly. You get a speed increase over a single drive but if either drive dies, everything is lost, back to your most recent backup. The kernel is supposed to handle mismatched raid sets like this but I have never tested it. The extra bit at the end is used normally with no spped increase.
You can create teo identical sized partitions for a raid0 set and have some unraided space left over.
Be aware that grub cannot boot from a raid0 /boot and lilo needs a patch, so /boot should not be raid0. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
phil_r Apprentice


Joined: 14 Mar 2006 Posts: 265 Location: Omaha, NE, USA
|
Posted: Wed Apr 12, 2006 5:35 pm Post subject: |
|
|
Thanks.
This is purely for /home so no booting issues there.
So, if I went RAID0 and had 2 x 120Gb partitions, that would leave a 40Gb left of non-raided. Could I append that to the RAID0? If not I'll just stick with an append array, I don't want to lose the space - I need to maximize what I have.
Thanks again dude...
Phil. |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 54513 Location: 56N 3W
|
Posted: Wed Apr 12, 2006 5:37 pm Post subject: |
|
|
phil_r,
You can just contribute both unequal partitions to a raid0. In theory, the kernel manages it properly.
Like I said, I've not tested that feature of the raid subsystem. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
phil_r Apprentice


Joined: 14 Mar 2006 Posts: 265 Location: Omaha, NE, USA
|
Posted: Wed Apr 12, 2006 5:42 pm Post subject: |
|
|
Sorry, I misunderstood that part.
Thanks for the clarification. I'll empty the drives, do a RAID0 and test with some junk to see how it goes.
Your input has been much appreciated... do you have a simple set of steps or url for a n00b's guide to building RAID0 or Append array?
Phil. |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 54513 Location: 56N 3W
|
Posted: Thu Apr 13, 2006 4:46 pm Post subject: |
|
|
phil_r,
Make the partitions that will contribute to the raid. Don't forget to make them type 0xfd so the raid auto assembles on boot.
Add the required raid modules to your kernel, built in if you need to boot from the raid, otherwise modules are ok.
Emerge raidtools or mdadm (I use the depreciated raidtools). Read the manpage and create your config file.
Raidtools is very picky anout the order of entries in /etc/raidtab (its config).
I can't comment on mdadm, which replaces raidtools.
With the config made you can create the raid set.
If that works, make a filesystem on your new /dev/md0 if its your only raid deice. Other than fdisk -l, never use the underlying partitions again. There is nothing on any individual partition thats useful outside of the raid set. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
phil_r Apprentice


Joined: 14 Mar 2006 Posts: 265 Location: Omaha, NE, USA
|
Posted: Fri Apr 14, 2006 12:43 pm Post subject: |
|
|
Thanks for your help.
For any others looking for something similar...
(Make sure your Kernel is compiled correctly, or at least you have modules loaded!)
1. fdisk /dev/whatever
2. Create partition
3. Hit "t" and set type to fd
4. Repeat for all partitions you want to RAID
5. Install/emerge raidtools
5b. cat /proc/mdstat should show you _something_ to indicate RAID is there.
6. Create a /etc/raidtab:
raiddev /dev/md0
raid-level 0
nr-raid-disks 2
persistent-superblock 1
chunk-size 4
device /dev/first
raid-disk 0
device /dev/second
raid-disk 1
7. mkraid /dev/md0
8. Because I use ReiserFS...
mkreisrefs /dev/md0
9. Edit /etc/fstab:
/dev/md0 /home reiserfs noatime 0 1
10. cat /proc/mdstat should show you it's all working.
For reference, I DID do this with 2 different sized partitions - ~80Gb and ~120Gb, one disc IDE and the other SATA. I've now got an ~200Gb partition.
If you get any message that /dev/md0 doesn't exist, try:-
mknod /dev/md0 b 9 0
Enjoy  |
|
| Back to top |
|
 |
|