LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 02-07-2013, 08:47 AM   #1
WiseDraco
Member
 
Registered: Nov 2006
Location: Europe,Latvia,Riga
Distribution: slackware,slax, exMandriva
Posts: 382

Rep: Reputation: 30
create software raid1 on one disk, later add second disk?


Hello!
I want to install my new home server on software raid 1, on two physically disks. problem is in money - i cannot purchase both hdd at a time, as so i plan in few days buy first hdd, and approx after month buy a second one ( st500dm005, sata2, 500 gb energy friendly).
can i install slackware 14 x32 as on raid1 with only one disk, with plans to add another disk to mirror later? there is be any problem that? can any do that previously?

also thinking about distro - x32 or better, x64? plan to run it in apache with joomla 2.5, samba server, sendmail with procmail, milter regex and spamassassin filters. also dns, ftp, but that on x64 works without problems, i think....who you says?
PS hw is asus p5b mobo ( i965 chipset), c2d 2 ghz cpu, 4 gb RAM, 3com905cx, rtl8139 and built in mobo realteg gigabit NIC...
 
Old 02-07-2013, 09:13 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047
Yes, this is totally possible.
As for which Slackware version, at first, please don't mix up the terms. x32 (aka multiarch) is not the same as IA32 or x86 and there currently is no Slackware version that supports x32. As I see it, as long as your hardware supports it I would go for 64 bit. 32 bit may be worth consideration if you have to run 32 bit software and don't want to maintain a multilib system, but other than that there is no reason not to use the advanced features of your CPU.
 
Old 02-07-2013, 09:20 AM   #3
WiseDraco
Member
 
Registered: Nov 2006
Location: Europe,Latvia,Riga
Distribution: slackware,slax, exMandriva
Posts: 382

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by TobiSGD View Post
Yes, this is totally possible.
As for which Slackware version, at first, please don't mix up the terms. x32 (aka multiarch) is not the same as IA32 or x86 and there currently is no Slackware version that supports x32. As I see it, as long as your hardware supports it I would go for 64 bit. 32 bit may be worth consideration if you have to run 32 bit software and don't want to maintain a multilib system, but other than that there is no reason not to use the advanced features of your CPU.
ok, thanks for clarification about x32
i do not have any problems with apache and joomla 2.5 ( and mysql) on 64bit slack? all it works on it ok?
 
Old 02-07-2013, 09:46 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047
Quote:
Originally Posted by WiseDraco View Post
ok, thanks for clarification about x32
i do not have any problems with apache and joomla 2.5 ( and mysql) on 64bit slack? all it works on it ok?
I don't use Joomla, but I don't think that there are any problems. Since Joomla is widely used and most larger servers run 64 bit OSes for years now I assume it would be known and pointed out on their website if there are problems with 64 bit.
 
Old 02-08-2013, 08:25 PM   #5
tux_dude
Member
 
Registered: Dec 2008
Distribution: Slackware64 Current
Posts: 226

Rep: Reputation: 33
To setup a RAID1 array with one device, need to create a degraded array. Look up the man pages for mdadm on how to create arrays with missing devices. Once you get the other disk, add it to the RAID array and mdadm will do the rebuild automatically. I like to call this the PMR (Poor Man's RAID).
 
Old 02-17-2013, 08:20 PM   #6
Slackovado
Member
 
Registered: Mar 2005
Location: Burnaby, BC, Canada
Distribution: Slackware 14 32bit, Debian, Arch
Posts: 216

Rep: Reputation: 27
Quote:
Originally Posted by WiseDraco View Post
Hello!
I want to install my new home server on software raid 1, on two physically disks. problem is in money - i cannot purchase both hdd at a time, as so i plan in few days buy first hdd, and approx after month buy a second one ( st500dm005, sata2, 500 gb energy friendly).
can i install slackware 14 x32 as on raid1 with only one disk, with plans to add another disk to mirror later? there is be any problem that? can any do that previously?

also thinking about distro - x32 or better, x64? plan to run it in apache with joomla 2.5, samba server, sendmail with procmail, milter regex and spamassassin filters. also dns, ftp, but that on x64 works without problems, i think....who you says?
PS hw is asus p5b mobo ( i965 chipset), c2d 2 ghz cpu, 4 gb RAM, 3com905cx, rtl8139 and built in mobo realteg gigabit NIC...
I just did this on my own system.
I had raid 5 before and replaced it with raid 1 going from 3x320Gb drives to 2x2Tb drives.
My /home directory was on that raid5 and needed to be moved to the new drives.
It was easier to install that one new drive in the system, create a raid one on it, copy all my data from the old raid 5, and then remove the old drives and add the second new drive to the system and let the raid 1 sync both drives.
I got most of my raid info from the Slackware raid howto.
But the following commands are directly relevant to the task.
If anyone notices any errors or omissions, please correct them.

Creating raid 1 with only one drive (already had /dev/md0 in the system plus a boot SSD drive with Slackware on it, so devices /dev/sda to /dev/sdd were used)
Code:
mdadm --create /dev/md1 --level 1 --raid-devices 2 /dev/sde1 missing
Then I created file system on the new md1 raid (xfs system in my case, no partitions)
Code:
mkfs.xfs /dev/md1
Created a new directory for it in /mnt
Code:
mkdir /mnt/newhome
and mounted
Code:
mount /dev/md1 /mnt/newhome
Then copied everything from my /home to the /newhome
Code:
rsync -a --force /home /mnt/newhome
Then power off computer, disconnect old drives and add the second new drive.
The new drives are now /dev/sdb and /dev/sdc so the /dev/md1 is no longer valid after reboot.
Also the old /home which was on /dev/md0 is now gone.
So as root have to re assemble the new raid 1 but first stop the wrongly auto-detected raid by kernel
Code:
mdadm -S /dev/md127
(could be a different number on your system)

Code:
mdadm -A /dev/md0 /dev/sdb1
mdadm /dev/md0 --add /dev/sdc1
That's it
You can then mount /home again
and check that the two new drives are syncing
Code:
mdadm -D /dev/md0
It worked great for me.
And I'd like to add that I've been running Linux software raid now for about a decade or longer in my own systems and used it in various other places (office backup computers and servers) for quite a few years and it has never failed me.
Combined with the know-how of partitioning utilities, fstab,initrd, and lilo it's a steep learing curve for newbies but it's a worthwhile investment because it's such a great and reliable technology.
And my limited know-how (I'm still a newbie myself) has only scratched the surface yet I've been reaping wonderful benefits for many years.
Good luck.

Last edited by Slackovado; 02-18-2013 at 04:23 PM.
 
2 members found this post helpful.
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
mdadm software raid1 failed disk detection too long ian1 Linux - Server 1 07-27-2011 09:32 AM
Add disk to raid1 array in imsm container with mdadm (not losing data). 82801ER ICH5R moon300 Linux - General 7 01-06-2010 03:39 PM
RAID1 software - 1 disk DEAD cferron Linux - Software 1 05-12-2008 02:14 PM
RAID1 array down to one disk with bad blocks, clone to good disk with dd noerror? ewolf Linux - Server 2 05-10-2008 12:40 AM
add a new disk to raid1 array retrev Linux - General 1 04-08-2007 01:57 AM


All times are GMT -5. The time now is 05:29 AM.

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 Google+: linuxquestions
Open Source Consulting | Domain Registration