Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.