LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-26-2005, 09:09 PM   #1
Spitfire24
LQ Newbie
 
Registered: Nov 2004
Distribution: Fedora Core 5
Posts: 12

Rep: Reputation: 0
Is there a way to both mirror and combine drives in RAID?


So I received a 300GB hard drive for Christmas. I have a Fedora Core 4 box running MythTV with a 200GB drive. The 200GB is filling up quickly because of the large MPEG2 files from recording TV shows. So I figured I would add the 300GB drive to the 200GB one. But I want to do it a special way if possible. Is there a way I could mirror 5GB on each drive and the rest be shared. For example, have one folder in called "backup" and have everything put in there be put on both drives for backup purposes. Then have the remaining space act on the two drives as a single drive for the MythTV recordings.

The only way possible I can think of is through RAID, but I haven't dealt with it before and I don't know about all the various types. If this can't be done, what form of RAID would be best for just making both drives act as one? If I'm correct, RAID 0 wouldn't be good because both drives don't match in size.

Finally, I would be using FC4's software RAID controller. Anything I would need to know about using this? Will I need any guides or should it be pretty self-explanatory?

Thanks.
 
Old 12-27-2005, 04:43 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
for the mirroring part yes i'd suggest a basic raid 1 implementation, so make a 5gb partition at the start of both drives and make them linux raid type. Then use mdadm to set them up as raid 1. That's the boring part though. for the big space, don't use raid. instead use LVM. make the remaining space on both drives an LVM partition, then use pvcreate to create physical LVM volumes on both. then vgcreate to bind both pv's into a single volume group. then just allocate all the space to a single logical volume which you can mount. this is NOT raid of course, it's much much more flexible than that.. at any time in the future you can get another drive of whatever type you want and just extend the LVM onto it, totally flexibly.

if you require the existing data to be untouched, then it's sinple enough to just create the LVM and raid partition on the larger drive, mount it and copy all data into the LVM. Then nuke the old one and extend the LVM over onto it.

LVM might seem a little daunting to set up from cold, but it's just the fact that it's containers inside other containers.. it's really simple once you "get" it and it's so horribly flexible, you can easily migrate all your data across different devices without any downtime etc... you could also run LVM ontop of a raid partition... but that's just getting silly.
 
Old 12-31-2005, 10:02 PM   #3
Spitfire24
LQ Newbie
 
Registered: Nov 2004
Distribution: Fedora Core 5
Posts: 12

Original Poster
Rep: Reputation: 0
Forgive me for bumping this back up, but I'm having trouble figuring out how to copy the data over from the smaller drive to the larger one. I want to keep all the data from the old drive (which includes the FC4 install), so I created a 200GB logical volume in the volume group. But that's where I've stopped. I think I have to setup a file system, but I'm a bit unsure of how to do that. After that, I don't know how I'd go about transferring all my files over to the new drive. Won't I have to edit some config files to have FC4 boot up from the larger drive and not the smaller one so I'll be able to nuke it out?

Thanks for the help, btw.
 
Old 01-01-2006, 09:54 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
First, where did you (or will you) back up your data before all this shuffling?

To set up a new drive, you need partitions and filesystems. As one example, you might use fdisk to create a partition, and then format it using mkfs, or any of its variants. Do a "man mkfs" to see details and a list of the variants.

It sounds like you are not looking for RAID for redundancy---do you need it for speed? If neither, then just use LVM as suggested---or perhaps just keep them separate. You can mount partitions on either drive to any point on your directory tree.

Why do you want to move FC4 to a different drive? If you really need to do this, it may be simpler to just re-install.
 
Old 01-01-2006, 08:34 PM   #5
Spitfire24
LQ Newbie
 
Registered: Nov 2004
Distribution: Fedora Core 5
Posts: 12

Original Poster
Rep: Reputation: 0
My original intent was to, if possible, have a few GB on each of the two drives set up in RAID 1. So I could transfer files from other machines on my network to this space to use as a backup for them. Then I was going to use the remaining space on the drives as a storage area for the MythTV recordings. The LVM method described above would be perfect for my needs, but I'm beginning to think it's going to be a hassle to transfer all my files from the current drive to the new drive so I could set the whole system up. I'm probably just going to end up backing up all my MythTV recordings and settings and then just reinstalling FC4 with LVM set up from the start.
 
Old 01-02-2006, 01:34 AM   #6
slantoflight
Member
 
Registered: Aug 2005
Distribution: Smoothwall
Posts: 283
Blog Entries: 3

Rep: Reputation: 35
Actually, if you intend to do a whole bunch of recording, maybe you should setup your drives in a RAID 0(striping mode). You'll get better performance. Especially if you intend to record multiple shows at once. Or HDTV. Fewer chances of dropped frames and stuff like that. Plus you'll get more out of your computer if you a intend to use it while its recording.
 
Old 01-02-2006, 05:21 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well as long as the stride is set right for LVM you'll get the same performance from LVM as raid0, but with much greater flexibility.

as for reinstalling or not... i would probably just recommend leaving FC4 where it is, creating LVM on the new drive and moving any videos acrodss to it, and shrink the FC4 install down to make space for a new LVM volume on the smalelr drive. leave FC4 as a largely seperate concern to the mass data storage. It's possibly beneficial to boot the OS from a single drive (save for mirrored raid configurations), irrespective of video data spannign mutliple devices.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding additional drives/resizing drives in RAID arrays kheldar Linux - Hardware 1 10-19-2005 01:21 PM
Undo a RAID mirror curlyroger Linux - General 2 09-18-2005 01:54 PM
Remove raid and mirror Chaiyakorn Linux - General 0 07-06-2004 01:59 AM
Mirror Raid support? Mediocre_Driver Linux - Hardware 1 01-20-2004 08:14 PM
Upgrading hard drives on Software raid 1 boot drives. linuxboy123 Linux - General 0 12-11-2003 03:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

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
Open Source Consulting | Domain Registration