LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-27-2013, 02:06 PM   #1
DebianUser
Member
 
Registered: Apr 2010
Posts: 88

Rep: Reputation: 15
Raid setup on NSLU2


I'm trying to setup raid 1 on my nslu2 so far i've copied the partitions and changed the type on the empty disk sdb to Linux raid autodetect. However I can't change one partition as it's extended what do I do?

Do I need to raid the swap partition as well?

fdisk -l

Disk /dev/sda: 15.7 GB, 15724707840 bytes
64 heads, 32 sectors/track, 14996 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sda1 * 1 245 250864 83 Linux
/dev/sda2 246 4061 3907584 83 Linux
/dev/sda3 4062 14996 11197440 5 Extended
/dev/sda5 4062 4123 63472 82 Linux swap / Solaris
/dev/sda6 4124 14996 11133936 83 Linux

Disk /dev/sdb: 15.7 GB, 15724707840 bytes
64 heads, 32 sectors/track, 14996 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0xc3072e18

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 245 250864 83 Linux
/dev/sdb2 246 4061 3907584 83 Linux
/dev/sdb3 4062 14996 11197440 5 Extended
/dev/sdb5 4062 4123 63472 82 Linux swap / Solaris
/dev/sdb6 4124 14996 11133936 83 Linux
 
Old 04-27-2013, 05:29 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Which partition are you having trouble with? In general, you would not modify an extended partition directly, but one of the partitions contained within the extended partition. You certainly wouldn't change the whole disk (sdb). I'm not sure what you're trying to do, since you don't seem to have any partitions defined for software RAID. Linux raid partitions have a different partition type than standard Linux partitions designed to hold an ext3 or whatever filesystem. They require special setup and metadata in the partition itself. I'm not sure if it's possible to convert a standard Linux partition to a RAID partition. IMO, the easiest thing to do is back up your data and then change the partition types to RAID partitions. Then you'll need to use mdadm to actually create a RAID array using these partitions and finally reformat the RAID array with a new filesystem. Then you can recover your data from back-up onto the new RAID array.
 
Old 04-27-2013, 06:50 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,406

Rep: Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396
Pretty much what btmiller said.
If you're doing SW RAID, you need to fdisk the partitions you want to use and set them up as type fd and use mdadm to construct; see http://www.linuxhomenetworking.com/w...et_The_ID_Type

You cannot 'use' the extended partition, as its not a real one as you'll see by looking at the Start/End figures. Its just a placeholder/container for the logical partitions.

Also, there's little point in using less than an entire disk (still need to partition as one big partition).
The usual use of RAID is to protect you in some form from disks going bad.
Note this does NOT constitute a backup.

Last edited by chrism01; 04-27-2013 at 06:51 PM.
 
Old 04-28-2013, 03:06 AM   #4
DebianUser
Member
 
Registered: Apr 2010
Posts: 88

Original Poster
Rep: Reputation: 15
This is how I have the second empty drive setup as at the moment

Device Boot Start End Blocks Id System
/dev/sdd1 * 1 245 250864 fd Linux raid autodetect
/dev/sdd2 246 4061 3907584 fd Linux raid autodetect
/dev/sdd3 4062 14996 11197440 5 Extended
/dev/sdd5 4062 4123 63472 fd Linux raid autodetect
/dev/sdd6 4420 14996 10830848 fd Linux raid autodetect

chrism01 I thought I was using the whole drive? do you think my partitioning scheme is too 'fussy'? i'm open to suggestions on a better/easier one.
 
Old 04-28-2013, 06:50 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,406

Rep: Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396
See my 2nd paragraph; unless this is just an academic exercise, you should be using the entire disk as one partition.
Like I said, it's designed to be use for whole disks.

As you can see from that link, with only 2 disks, the sane RAID choice is indeed RAID1/mirroring, but you mirror the whole of disk 1 to disk 2.
IF eg disk 2 goes bad, you can replace it and re-mirror.

See also
https://en.wikipedia.org/wiki/Standard_RAID_levels
https://en.wikipedia.org/wiki/RAID
 
  


Reply


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
NSLU2 setup- UpSlug2 source build terminal problem- "No such file or directory" RockandRoll24 Linux - Newbie 0 03-22-2010 09:58 AM
How to build debian for NSLU2 sheintze Debian 1 03-11-2007 08:26 AM
NSLU2 batch? files? ThrawnJL Linux - Software 3 09-14-2006 11:40 PM
Linksys NSLU2 zeke7050 Linux - General 5 07-21-2006 06:15 PM
Who uses the Linksys NSLU2 purelithium Linux - Hardware 0 01-12-2006 07:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:07 AM.

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