Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › implementing a MD Raid without reinstalling linux?
New Posts  All Forums:Forum Nav:

implementing a MD Raid without reinstalling linux?

post #1 of 5
Thread Starter 
I have a linux box with a single SSD drive. I want to add another drive of the same kind but whth out reinstalling everything all over again. is it possible to turn my single HD linux system into a raid-0 MD Raid without reinstalling linux?
dBag
(9 items)
 
yep...
(10 items)
 
air
(8 items)
 
CPUMotherboardRAMHard Drive
xeon e3-1230v2 supermicro mbd x9scm-0 KVR1333D3E9S/4G OCZ vertex3 60GB 
CoolingOSPowerCase
1u 80mm blower + passive cpu  proxmox 3.1 supermicro 300w 1u supermicro 1u 
Other
2x intel pro1000 nics  
CPUMotherboardGraphicsRAM
A8-3870K @ 3.7GHz GIGABYTE A75M-UD2H Power Cooler 7870 Team Group Inc 
Hard DriveCoolingOSPower
3x OCZ Agility 3 60GB (RAID-0 on Rocket RAID 27... Corsair H-80 core win-7 Seagate 750 Gold 
CaseAudio
some lian-li case... M-Audio AV40s + 10" Sony ___? 
CPUMotherboardGraphicsRAM
D525 @ 1.8GHz Supermicro onboard 2x2GB DDR1333 
Hard DriveOSCaseOther
WD Green ubuntu 12 1u  3x40mm fans  
  hide details  
Reply
dBag
(9 items)
 
yep...
(10 items)
 
air
(8 items)
 
CPUMotherboardRAMHard Drive
xeon e3-1230v2 supermicro mbd x9scm-0 KVR1333D3E9S/4G OCZ vertex3 60GB 
CoolingOSPowerCase
1u 80mm blower + passive cpu  proxmox 3.1 supermicro 300w 1u supermicro 1u 
Other
2x intel pro1000 nics  
CPUMotherboardGraphicsRAM
A8-3870K @ 3.7GHz GIGABYTE A75M-UD2H Power Cooler 7870 Team Group Inc 
Hard DriveCoolingOSPower
3x OCZ Agility 3 60GB (RAID-0 on Rocket RAID 27... Corsair H-80 core win-7 Seagate 750 Gold 
CaseAudio
some lian-li case... M-Audio AV40s + 10" Sony ___? 
CPUMotherboardGraphicsRAM
D525 @ 1.8GHz Supermicro onboard 2x2GB DDR1333 
Hard DriveOSCaseOther
WD Green ubuntu 12 1u  3x40mm fans  
  hide details  
Reply
post #2 of 5
https://wiki.archlinux.org/index.php...system_to_RAID

Should work about the same on all distro's.

[edit]

http://djlab.com/2009/05/convert-sin...-linux-server/

http://serverfault.com/questions/629...nimal-downtime

Google has bounds of answers.
Edited by mushroomboy - 12/29/10 at 12:44pm
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
post #3 of 5
Thread Starter 
everything you have listed is raid-1. im interested in raid-0
dBag
(9 items)
 
yep...
(10 items)
 
air
(8 items)
 
CPUMotherboardRAMHard Drive
xeon e3-1230v2 supermicro mbd x9scm-0 KVR1333D3E9S/4G OCZ vertex3 60GB 
CoolingOSPowerCase
1u 80mm blower + passive cpu  proxmox 3.1 supermicro 300w 1u supermicro 1u 
Other
2x intel pro1000 nics  
CPUMotherboardGraphicsRAM
A8-3870K @ 3.7GHz GIGABYTE A75M-UD2H Power Cooler 7870 Team Group Inc 
Hard DriveCoolingOSPower
3x OCZ Agility 3 60GB (RAID-0 on Rocket RAID 27... Corsair H-80 core win-7 Seagate 750 Gold 
CaseAudio
some lian-li case... M-Audio AV40s + 10" Sony ___? 
CPUMotherboardGraphicsRAM
D525 @ 1.8GHz Supermicro onboard 2x2GB DDR1333 
Hard DriveOSCaseOther
WD Green ubuntu 12 1u  3x40mm fans  
  hide details  
Reply
dBag
(9 items)
 
yep...
(10 items)
 
air
(8 items)
 
CPUMotherboardRAMHard Drive
xeon e3-1230v2 supermicro mbd x9scm-0 KVR1333D3E9S/4G OCZ vertex3 60GB 
CoolingOSPowerCase
1u 80mm blower + passive cpu  proxmox 3.1 supermicro 300w 1u supermicro 1u 
Other
2x intel pro1000 nics  
CPUMotherboardGraphicsRAM
A8-3870K @ 3.7GHz GIGABYTE A75M-UD2H Power Cooler 7870 Team Group Inc 
Hard DriveCoolingOSPower
3x OCZ Agility 3 60GB (RAID-0 on Rocket RAID 27... Corsair H-80 core win-7 Seagate 750 Gold 
CaseAudio
some lian-li case... M-Audio AV40s + 10" Sony ___? 
CPUMotherboardGraphicsRAM
D525 @ 1.8GHz Supermicro onboard 2x2GB DDR1333 
Hard DriveOSCaseOther
WD Green ubuntu 12 1u  3x40mm fans  
  hide details  
Reply
post #4 of 5
Raid0 is sketchy in Linux. But your going to have to make raid1 and raid0 in order to boot linux. That or have your /boot partition elsewhere so that it can boot. That or don't use Grub or LILO.

This would be the exact same thing as the raid1 tutorials except you'll have to modify everything for a separate raid0 and root mounts.
[edit]
basically make the raid0 partition, format it, copy the entire root / from a backup, modify the grub to mount the proper root, blah blah. It's no different than expanding the rootfs or imaging linux to another drive that's larger. All you want is to copy the files somewhere while preserving file permissions, you can do this in file containers or just use a spare drive. Once you have that you can just copy the files back with the permissions and boot the drive again. I did this when I expanded my /usr folder into it's own partition. Nothing special but copying the files to another linux fs to keep permissions then copying them back after the resize.

[edit] IMO with SSD your going to notice no real difference trying this, you might as well just use the drive for extra space.
Edited by mushroomboy - 12/29/10 at 2:28pm
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
post #5 of 5
mushroomboy is correct. The best way to go about doing this is with a LiveCD of some kind. The basic steps are as follows:

1) Back up your existing SSD. The last time I backed up a Linux install I used cpio, but I imagine there are other/better tools.

2) Install the second SSD.

3) Boot the LiveCD. Get to a command line, or install Webmin into the LiveCD environment.

4) Remove all existing partitions. Create three partitions on each drive, using fdisk. The first is a RAID 1 partition for /boot, the second RAID 0 for /. The third partition on each drive can be swap. Make sure they are the same size on each drive. Remember to set the partition types for /boot and / to "fd". The partition type for swap is "82".

5) use mdadm to create the RAID sets for /boot and /. Swap does not need to be RAIDed - you'll simply end up with double the swap space.

6) Copy the files back from the backup into /boot and /.

7) Configure run GRUB or LILO on each RAID 1 partition to tell it where to boot the kernel from. It has to be installed on the boot sector of each drive, so ensure the drives have separate configs that reflect /dev/sda and /dev/sdb (for example).

Hope this helps.
Ryzen
(12 items)
 
  
CPUMotherboardGraphicsRAM
Ryzen 7 1700 Gigabyte GA-AB350M Gaming 3 Palit GT-430 Corsair Vengeance LPX CMK16GX4M2B3000C15 
Hard DriveCoolingOSMonitor
Samsung 850 EVO AMD Wraith Spire Linux Mint 18.x Dell UltraSharp U2414H 
KeyboardPowerCaseMouse
Apple Basic Keyboard Thermaltake ToughPower 850W Lian-Li PC-A04B Logitech Trackman Wheel 
  hide details  
Reply
Ryzen
(12 items)
 
  
CPUMotherboardGraphicsRAM
Ryzen 7 1700 Gigabyte GA-AB350M Gaming 3 Palit GT-430 Corsair Vengeance LPX CMK16GX4M2B3000C15 
Hard DriveCoolingOSMonitor
Samsung 850 EVO AMD Wraith Spire Linux Mint 18.x Dell UltraSharp U2414H 
KeyboardPowerCaseMouse
Apple Basic Keyboard Thermaltake ToughPower 850W Lian-Li PC-A04B Logitech Trackman Wheel 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › implementing a MD Raid without reinstalling linux?