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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
12-26-2005, 10:09 PM
|
#1
|
LQ Newbie
Registered: Nov 2004
Distribution: Fedora Core 5
Posts: 12
Rep:
|
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.
|
|
|
12-27-2005, 05:43 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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.
|
|
|
12-31-2005, 11:02 PM
|
#3
|
LQ Newbie
Registered: Nov 2004
Distribution: Fedora Core 5
Posts: 12
Original Poster
Rep:
|
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.
|
|
|
01-01-2006, 10:54 AM
|
#4
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
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.
|
|
|
01-01-2006, 09:34 PM
|
#5
|
LQ Newbie
Registered: Nov 2004
Distribution: Fedora Core 5
Posts: 12
Original Poster
Rep:
|
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.
|
|
|
01-02-2006, 02:34 AM
|
#6
|
Member
Registered: Aug 2005
Distribution: Smoothwall
Posts: 283
Rep:
|
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.
|
|
|
01-02-2006, 06:21 PM
|
#7
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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.
|
|
|
All times are GMT -5. The time now is 06:43 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|