LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 01-04-2009, 09:49 AM   #1
Braveheart1980
Member
 
Registered: Jan 2004
Location: Greece!
Distribution: Ubuntu 9.10
Posts: 633
Blog Entries: 1

Rep: Reputation: 30
Wink Software raid & mdadm


I want to create a software linear raid between 2 and eventually more devices

I was wondering if this will work:


Code:
mdadm --create /dev/md0  --level=0 --raid-devices=2 /home/george/Dowloads  /dev/sdb1
Can I mount a disk to a disk folder which already has data without corrupting them ?
If yes is the above mentioned command correct?
 
Old 01-04-2009, 11:21 AM   #2
tommylovell
Member
 
Registered: Nov 2005
Distribution: Fedora, Redhat
Posts: 355

Rep: Reputation: 96
I don't think it will work. The mdadm man page mentions "component devices". "/home/george/Dowloads" is not a device.

I tried this:

Quote:
[root@athlon5k2 ~]# mdadm --create /dev/md2 --level=0 --raid-devices=2 /home/tommy missing
mdadm: Cannot get size of /home/tommy: Inappropriate ioctl for devicmdadm: create aborted
[root@athlon5k2 ~]#

Last edited by tommylovell; 01-04-2009 at 11:28 AM.
 
Old 01-04-2009, 11:29 AM   #3
Braveheart1980
Member
 
Registered: Jan 2004
Location: Greece!
Distribution: Ubuntu 9.10
Posts: 633
Blog Entries: 1

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by tommylovell View Post
I don't think it will work. The mdadm man page mentions "component devices". "/home/george/Dowloads" is not a device.

I tried this:
First of all , let me thank you tommylovell

Secondly since this command doesn't work , is there any way I can add to an existing folder one or more hard drives?
 
Old 01-04-2009, 11:58 AM   #4
tommylovell
Member
 
Registered: Nov 2005
Distribution: Fedora, Redhat
Posts: 355

Rep: Reputation: 96
I think you might be faced with shuffling data around a bit.

If you took your /dev/sdb1 partition and created an LVM Logical volume on it; moved your directory contents to it; then mounted that LV at "/home/george/Dowloads", that would do what you want. Then when you wanted to add more space, you could create another physical volume, add that PV to the volume group, and expand the logical volume into that space.

The problem that you'll face here is if that that directory is in use. ('lsof +D /home/george/Dowloads' will tell you, of course.)

If you have LVM, adding the new space to an existing VG gives you a lot of flexibility in moving the data around on those volumes later when you replace drives... (Or if /home is already on an LVM volume now - you didn't say, just adding more space to that LV will solve your problem.)

Doing this type of work generates a lot of anxiety. I would suggest having a good, tested backup.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Software Raid 5 (md) recovery using mdadm fakeroot Linux - Server 23 05-28-2011 10:53 PM
Software RAID which one mdadm or mkraid kernel99 Linux - Newbie 3 09-17-2008 05:50 PM
Why can't I mount this md0 raid? (mdadm and software raid) cruiserparts Linux - Software 34 04-12-2007 12:50 PM
Software RAID with mdadm problems... robbow52 Debian 2 04-19-2004 08:06 PM
mdadm mail with software RAID brucehohl Linux - Software 1 12-20-2003 07:17 AM


All times are GMT -5. The time now is 01:22 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration