LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 01-04-2009, 08: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, 10:21 AM   #2
tommylovell
Member
 
Registered: Nov 2005
Distribution: Raspbian, Debian, Ubuntu
Posts: 380

Rep: Reputation: 103Reputation: 103
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 10:28 AM.
 
Old 01-04-2009, 10:29 AM   #3
Braveheart1980
Member
 
Registered: Jan 2004
Location: Greece!
Distribution: Ubuntu 9.10
Posts: 633

Original Poster
Blog Entries: 1

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, 10:58 AM   #4
tommylovell
Member
 
Registered: Nov 2005
Distribution: Raspbian, Debian, Ubuntu
Posts: 380

Rep: Reputation: 103Reputation: 103
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



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
Software Raid 5 (md) recovery using mdadm fakeroot Linux - Server 24 04-15-2013 09:19 AM
Why can't I mount this md0 raid? (mdadm and software raid) cruiserparts Linux - Software 35 01-05-2013 03:35 PM
Software RAID which one mdadm or mkraid kernel99 Linux - Newbie 3 09-17-2008 04:50 PM
Software RAID with mdadm problems... robbow52 Debian 2 04-19-2004 07:06 PM
mdadm mail with software RAID brucehohl Linux - Software 1 12-20-2003 06:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:45 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
Open Source Consulting | Domain Registration