Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 10-15-2013, 12:14 PM   #1
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060
A Really Dumb Question about RAID 1

It looks like Slackware 14.1 is pretty much a done deal. Yay.

I've got two servers sitting in their shipping cartons that have been waiting for 14.1 (while development work was going on somewhere else) and it's looking good for 14.1 pretty darn soon.

Both boxes have two 500G drives, there's supposed to be hardware RAID, and I'm feeling pretty dumb. The instructions for setting up RAID 1 look simple enough but my question is, can I partition the RAID array?

I partition my systems with root, swap, /opt, /var/lib/pgsql, /usr/local and /home, all mounted partitions (I also do /var/lib/mysql and /var/lib/virtual but those two will not be used on these machines). I will be adding [I]/hicl for Documents, Pictures and Videos (lots of big-butt files in those).

I do that so that when a new release of Slackware becomes available I do a clean install (you format the root partition during installation but only mount the others so you don't lose everything).

So, can you partition a RAID 1 array like this?

Old 10-15-2013, 12:26 PM   #2
Registered: Aug 2004
Location: MD
Distribution: Slackware
Posts: 114

Rep: Reputation: 24
Generally a hardware raid will appear to the OS as one drive, so yes, you should be able to partition it
Old 10-15-2013, 01:04 PM   #3
MLED Founder
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, CentOS, FreeBSD
Posts: 3,357

Rep: Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905
I use RAID 1 and RAID 5 quite a lot on both servers and workstations.

Let's say I want ot have RAID 1 with 100 MB for a small boot partition, 1 GB for swap, and the remaining space for a root partition.

Launch fdisk on the first disk, and create these partitions. As partition type, choose "non-fs-data". Once you've done this, do the same thing on the other disk. Create the exact same partitions.

Now create your arrays:

# mdadm --create /dev/md1 --level=1 --raid-devices=2 --metadata=0.90 /dev/sda1 /dev/sdb1
# mdadm --create /dev/md2 --level=1 --raid-devices=2 --metadata=0.90 /dev/sda2 /dev/sdb2
# mdadm --create /dev/md3 --level=1 --raid-devices=2 --metadata=0.90 /dev/sda3 /dev/sdb3
Make the swap partition manually so the installer will recognize it:

# mkswap /dev/md2
Launch the installer:

# setup
Now you can format /dev/md3 using the FS you want (ext4, ext3, whatever). This will be your main partition. Then you can format /dev/md1 as ext2, for example, and use it as /boot partition.

Now you can do the same thing with your personal partitioning scheme.

Beware, though. You *will* need to use the generic kernel with an initrd before the initial reboot, which is a bit tricky.

Another word of caution. When you experiment, you'll probably have to clean up any old array remnants from previous attempts. You'll have to do it like this:

# mdadm -Ss
# mdadm --zero-superblock /dev/sda1
# mdadm --zero-superblock /dev/sda2
# mdadm --zero-superblock /dev/sda3
# mdadm --zero-superblock /dev/sdb1
# mdadm --zero-superblock /dev/sdb2
# mdadm --zero-superblock /dev/sdb3
Last thing: don't forget to deactivate the hardware RAID in the BIOS. Otherwise you'll only see one disk.

Edit: if you don't want to go through all the hassle of a software RAID, just keep the hardware RAID and partition and format your disk as if it was one simple disk. No difference for the installer.

Have fun,


Last edited by kikinovak; 10-15-2013 at 01:06 PM. Reason: Added an option for keeping hardware RAID
Old 10-15-2013, 08:52 PM   #4
Richard Cranium
Senior Member
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 2,663

Rep: Reputation: 1104Reputation: 1104Reputation: 1104Reputation: 1104Reputation: 1104Reputation: 1104Reputation: 1104Reputation: 1104Reputation: 1104
You should spend some time to learn about LVM. Honest.
Old 10-16-2013, 02:00 AM   #5
Mark Pettit
Registered: Dec 2008
Location: Cape Town, South Africa
Distribution: Slackware 14.2 64 Multi-Lib
Posts: 505

Rep: Reputation: 183Reputation: 183
Also - when doing raid with mdadm (or lvm), you should make sure the drives have the correct partition code (set from fdisk or gdisk).


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Really dumb question peonuser Solaris / OpenSolaris 2 01-30-2009 07:23 AM
Linux Software RAID 0 dumb mistake edong23 Linux - General 4 12-09-2007 02:23 PM
dumb raid array question Kvetch Linux - Software 1 03-25-2007 04:19 PM
dumb raid question sigmaes Linux - Newbie 5 01-27-2006 04:19 PM
RAID, probably a dumb question, but I need help WorldBuilder Linux - General 4 06-02-2003 10:12 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:42 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration