Installing on two Drives ?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
hdesknab
Level 1
Level 1
Posts: 10
Joined: Sun Mar 02, 2008 12:19 pm
Location: Norrköping, SWEDEN

Installing on two Drives ?

Postby hdesknab » Tue Mar 26, 2013 4:34 am

Hi,
Just determind to install LM14 Nadia on my primary PC, now i start to wonder if I am on the "right" track :)
What I want to do is:
Install OS (/) on my SSD, and install /home (for all "personal info"/dokuments/other files that I am creating), on a RAID disk (two 160 GB HDD in a RAID configuration with RAID0 (zero)).
Am i right after reading xenopeek´s grate post on partitioning, that in my case I create one / (root) partition on the SSD with a size of 30 Gb, plus one swap partition on 40 Gb, and then create (and format) one /home partition on my 320Gb disk, and that would be IT ?
In some other posts I read that I would need a Boot partition aswell (but I only want to run LM14, so do I need a boot partition or is that for "dual-boot" scenarios, or for older relases ?

Greateful for all help on the topic :D

--Hdesknab

User avatar
Pierre
Level 12
Level 12
Posts: 4418
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: Installing on two Drives ?

Postby Pierre » Tue Mar 26, 2013 5:42 am

by putting the / & the /swap onto the ssd, will give you the speed that you are chasing.
& by using the raid0 should also give you some redundancy, as well.

you didn't say how much memory that your PC has,
but around 1~2Gb should suffice, - unless you lots of memory,
in which case you don't really need a /swap anyway .. .

the boot is usually integrated into /, so you really don't need a separate /boot area.
- even with a dual_boot - it not really needed.
as a rule, the boot_strap is installed onto the beginning of the drive (usually sda)
& doesn't need a separate /boot area.
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.

hdesknab
Level 1
Level 1
Posts: 10
Joined: Sun Mar 02, 2008 12:19 pm
Location: Norrköping, SWEDEN

Re: Installing on two Drives ?

Postby hdesknab » Tue Mar 26, 2013 12:19 pm

Thanks Pierre,
As for your question regarding memory I have installed 32 Gb of RAM, and to follow your advice i think i will skip the swap partition (not rely sure that i need it) but on the other hand, sooner or later I probably will need it :D
I think I will leave space for the eventual swap partition at the end of the SSD anyway.
But I will skip the /boot partition.
Again thanks for you help.

--hdesknab

AlbertP
Level 16
Level 16
Posts: 6707
Joined: Sun Jan 30, 2011 12:38 pm
Location: Utrecht, The Netherlands

Re: Installing on two Drives ?

Postby AlbertP » Tue Mar 26, 2013 12:31 pm

Swap causes wear to the SSD so if you create a swap on it, please add vm.swappiness=10 to the /etc/sysctl.conf file for a longer life of the SSD.
Registered Linux User #528502
Image
Feel free to correct me if I'm trying to write in Spanish, French or German.

User avatar
yonnie
Level 2
Level 2
Posts: 78
Joined: Mon Jan 03, 2011 12:18 am

Re: Installing on two Drives ?

Postby yonnie » Tue Apr 16, 2013 12:32 am

Am trying to follow this but am having trouble.
I have a Toshiba Satellite U840. It has a 30gb ssd for sdb and a 500gb for sda.
I just installed 2013 64-bit onto it and chose sdb as my / and boot, as such the installer would not let me choose sda for anything, so now sda shows up as an extra hddrive as part of the file system. The original intent was to have sda be the /home drive for all users.

How do I get it(sda) to be the /home drive for all?
And should I just delete the swap as I have 6gb of ram installed? Is there a way to make a portion of ram be the swap file?
You have your way. I have my way. As for the right way, the correct way, and the only way, it does not exist.”
- Friedrich Nietzsche

beetleshirt
Level 1
Level 1
Posts: 15
Joined: Fri Apr 12, 2013 7:35 am
Location: Sydney, puɐlɹǝpunuʍop

Re: Installing on two Drives ?

Postby beetleshirt » Tue Apr 16, 2013 1:55 am

hdesknab wrote:Hi,
What I want to do is:
Install OS (/) on my SSD, and install /home (for all "personal info"/dokuments/other files that I am creating), on a RAID disk (two 160 GB HDD in a RAID configuration with RAID0 (zero)).

You are aware that RAID0 gives you no redundancy at all, and that if one drive fails you lose all your data, right? 160GB drives are typically going to be pretty old, so your chances of one failing soon are getting higher.

Fine if you know and are happy with the risks, but if you're new to RAID you may wish to reconsider the RAID level you are using. I would suggest RAID1 instead.
ASRock Z68Extreme4 Gen3 with i7-2600K, 16GB Corsair Vengeance 1600C9 RAM, Gigabyte GTX670 OC 2GB.
240GB Intel 335 SSD (Mint 14.1 x64 xfce), 120GB Corsair F120 (Win7 Pro x64), Hitachi 7k3000 3TB for data.
Dell U2711 @ 2560x1440

jbb
Level 1
Level 1
Posts: 19
Joined: Wed Apr 15, 2009 10:52 pm

Re: Installing on two Drives ?

Postby jbb » Tue Apr 16, 2013 11:20 am

I do have plans to write this up as a 'how to' guide, but following is the easiest way I found to install /home to a Raid partition. You can even move your data to your raid drives before installing Mint, making it an efficient way to install without having to backup to external media etc.
Warning: BACKUP before you try this, especially the first time!

[*] Boot up into the Linux Mint live cd
[*] Open terminal and update Live apt

Code: Select all

sudo apt-get update

[*] Install Raid software to Live install

Code: Select all

sudo apt-get install mdadm

[*] MAKE SURE THE DRIVES YOU ARE USING FOR YOUR ARRAY ARE EMPTY, THEY WILL BE WIPED!
[*] Create your array

Code: Select all

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc

where md0 is your new raid volume, level=1 means Raid1, and /dev/sdb is your first, and /dev/sdc is your second raid drive. /dev/sda is my non raid, bootup drive

[*] This process could take a while depending on your hard drive size etc if the drives need syncing
[*] You may have to use

Code: Select all

sudo mdadm --assemble --scan

[*] Copy over the data you want to keep to the new raid setup
[*] Run the Linux Mint install
[*] Set
sda as / partition (assuming sda is your ssd drive)
md0 as /home partition (Raid), and make sure you do not select format if you have data you want to keep

[*] Do not restart yet, in terminal type

Code: Select all

gksudo gedit /etc/network/interfaces

[*] Set the ethernet card settings as no NetworkManager in console only mode

Code: Select all

auto eth0
iface eth0 inet dhcp

[*] Reboot computer
[*] Bootup will say cannot find /home partion, or may present you with a blank screen
[*] Hit m for recovery
[*] Enter your password
[*] Lets update the installed apt

Code: Select all

sudo apt-get update

[*] Install Raid software

Code: Select all

sudo apt-get install mdadm

[*] Look for our already created Raid

Code: Select all

sudo mdadm --assemble --scan

[*] Your raid will now be back and active
[*] Force reboot (my version hangs and will not reboot if I do not use the -f option)

Code: Select all

sudo reboot -f now

[*] Remove eth0 as NetworkManager handles this

Code: Select all

gksudo gedit /etc/network/interfaces

[*] Remove

Code: Select all

auto eth0
iface lo eth0 dhcp

[*] System will start as normal with the /home drive up and going
Last edited by jbb on Wed Apr 17, 2013 2:36 pm, edited 1 time in total.

User avatar
yonnie
Level 2
Level 2
Posts: 78
Joined: Mon Jan 03, 2011 12:18 am

Re: Installing on two Drives ?

Postby yonnie » Wed Apr 17, 2013 12:11 am

Well, I'll try this. But big question in my little brain is: wasn't raid intended for equal sized drives? I have 1 standard type HDD that's 500gb(slow laptop variety) and 1 SSD drive 32gb (that's virtually supersonic in comparison by speeds). How's this going to work as a raid?
You have your way. I have my way. As for the right way, the correct way, and the only way, it does not exist.”
- Friedrich Nietzsche

User avatar
catweazel
Level 7
Level 7
Posts: 1658
Joined: Fri Oct 12, 2012 9:44 pm

Re: Installing on two Drives ?

Postby catweazel » Wed Apr 17, 2013 3:04 am

Pierre wrote:by putting the / & the /swap onto the ssd, will give you the speed that you are chasing.
& by using the raid0 should also give you some redundancy, as well.

Unmittigated drivel.
Mint Testing Team & Mint Donor #3606
Intel i7 4820K @ 4.7GHz, 32GB Corsair Vengeance Pro
2133MHz XMP, 4 Samsung 850 PRO 512GB SSDs in
RAID0, 12TB HW RAID10, 3 x 24" Samsung UlHD,
Custom pre-emptive kernel 4.7.5,
Dual nVidia GTX 1080

beetleshirt
Level 1
Level 1
Posts: 15
Joined: Fri Apr 12, 2013 7:35 am
Location: Sydney, puɐlɹǝpunuʍop

Re: Installing on two Drives ?

Postby beetleshirt » Wed Apr 17, 2013 10:01 am

yonnie wrote:Well, I'll try this. But big question in my little brain is: wasn't raid intended for equal sized drives? I have 1 standard type HDD that's 500gb(slow laptop variety) and 1 SSD drive 32gb (that's virtually supersonic in comparison by speeds). How's this going to work as a raid?

Short answer? It won't.

As you said, RAID works best with similarly sized drives. Not because (in most cases) it's required, but because you will waste a lot of space if you use sizes that are very different because the volume sizes that are made into a RAID volume must be equal. A 500GB and a 750GB drive would only be able to use 500GB from each disk in a RAID volume. A 200GB and a 2000GB would give you two 200GB volumes to use in RAID, either as a 200+200=400GB stripe set (RAID0, which would be ludicrous to give you a smaller volume that is more risky than just using the larger disk as standalone) or 200&200GB mirror set (RAID1, which is useful for protecting your data, but you'd be better off with disks of similar size.
If they are different performance levels you can cause bigger problems, and if you mix different drive technologies such as spinning disk and SSD you can cause even bigger problems. Both of these apply in your case, so don't use your disks in a RAID set of any type. Use the 32GB SSD and 500GB HDD as separate drives without RAID. If you want RAID, you will need at least one more drive.

While you're considering using RAID, don't even bother considering RAID0, it's a contradiction in terms. RAID means Redundant Array of Independent (or Inexpensive) Disks. RAID0 is not redundant. RAID0 means striping the volume in regular sized chunks across both disks, making one volume that is double the capacity of the smaller disk. If you have two 500GB disks you would have a 1000GB RAID0 volume. This sounds good, but the nasty gotcha is that if you lose either one of the two disks, you lose ALL your data, so you effectively double your chances of a disk failure. RAID0 should only be used if you want some fast disk as temp working space that you don't care if it disappears.

This is pretty generic info on RAID, mainly looking at RAID0. There are many other levels of RAID, and the ones most often used are RAID1 (mirroring, using at least 2 drives), RAID5 (striping with parity, with at least 3 drives) and RAID6 (striping with double parity; at least 4 drives). RAID10 (striped and mirrored; at least 4 drives) was quite popular for a while, but seems to be falling out of favour lately. More information on RAID levels can be found on wikipedia and many other places.
ASRock Z68Extreme4 Gen3 with i7-2600K, 16GB Corsair Vengeance 1600C9 RAM, Gigabyte GTX670 OC 2GB.
240GB Intel 335 SSD (Mint 14.1 x64 xfce), 120GB Corsair F120 (Win7 Pro x64), Hitachi 7k3000 3TB for data.
Dell U2711 @ 2560x1440

beetleshirt
Level 1
Level 1
Posts: 15
Joined: Fri Apr 12, 2013 7:35 am
Location: Sydney, puɐlɹǝpunuʍop

Re: Installing on two Drives ?

Postby beetleshirt » Wed Apr 17, 2013 10:50 am

jbb wrote:[*] Create your array

Code: Select all

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc

where md0 is your new raid volume, level=1 means Raid1, and /dev/sdb is your first, and /dev/sdc is your second raid drive. /dev/sda is my non raid, bootup drive

You should probably make it clearer that this will nuke the data on both disks, so you should be planning on copying the data back onto it from some other media when you've finished. I know you said to backup the data, but that implies it will only be needed if something goes wrong so people tend to skip it sometimes. This process will definitely wipe the data on the disks.

jbb wrote:[*] Do not restart yet, in terminal type

Code: Select all

gksudo gedit /etc/network/interfaces

[*] Set the ethernet card settings as no NetworkManager in console only mode

Code: Select all

auto eth0
iface eth0 inet dhcp

[*] Reboot computer


jbb wrote:[*] Remove eth0 as NetworkManager handles this

Code: Select all

gksudo gedit /etc/network/interfaces

[*] Remove

Code: Select all

auto eth0
iface lo eth0 dhcp

[*] System will start as normal with the /home drive up and going

Can you explain why you do this? How does the networking affect a RAID set build?

I found these articles by Zack Reed to be extremely useful to understand mdadm. He gives very clear and step-by-step sequences of events that he went through to perform various mdadm tasks, and just as importantly why he does them.

Another neat trick I plan on trying soon is to create a RAID set with a missing disk, copy the pre-existing data onto it, then add the last disk in to the set. For example, if you have sdb1 with data on it and sdc1 as a new volume, create the new mirror with the members sdc1 and 'missing', wait until the new (and degraded) RAID set syncs, create a filesystem on the new RAID volume, copy your data from sdb1 onto the new raid set, then add sdb1 into the raid set. Online process, YMMV, backup first, etc. More here.
ASRock Z68Extreme4 Gen3 with i7-2600K, 16GB Corsair Vengeance 1600C9 RAM, Gigabyte GTX670 OC 2GB.
240GB Intel 335 SSD (Mint 14.1 x64 xfce), 120GB Corsair F120 (Win7 Pro x64), Hitachi 7k3000 3TB for data.
Dell U2711 @ 2560x1440

jbb
Level 1
Level 1
Posts: 19
Joined: Wed Apr 15, 2009 10:52 pm

Re: Installing on two Drives ?

Postby jbb » Wed Apr 17, 2013 2:33 pm

beetleshirt wrote:
jbb wrote:[*] Do not restart yet, in terminal type

Code: Select all

gksudo gedit /etc/network/interfaces

[*] Set the ethernet card settings as no NetworkManager in console only mode

Code: Select all

auto eth0
iface eth0 inet dhcp

[*] Reboot computer


jbb wrote:[*] Remove eth0 as NetworkManager handles this

Code: Select all

gksudo gedit /etc/network/interfaces

[*] Remove

Code: Select all

auto eth0
iface lo eth0 dhcp

[*] System will start as normal with the /home drive up and going

Can you explain why you do this? How does the networking affect a RAID set build?


Linux Mint will not install raid software during the setup program. Therefore once it is complete and you reboot, the system will not start as it cannot see your raid or your /home partition. This forces you to do a text based recovery, which does not have NetworkManager to manage the network interfaces, so you are unable to access the internet. By putting those lines into the interfaces file you are enabling network access in console recovery mode, so you are then able to install the raid software to bring your raid back online.
Once you are back to a GUI environment, the network manager is available again, and the lines need to be removed from the file otherwise there will be a conflict and no network connection will be present.

User avatar
catweazel
Level 7
Level 7
Posts: 1658
Joined: Fri Oct 12, 2012 9:44 pm

Re: Installing on two Drives ?

Postby catweazel » Wed Apr 17, 2013 4:17 pm

beetleshirt wrote:While you're considering using RAID, don't even bother considering RAID0, it's a contradiction in terms. RAID means Redundant Array of Independent (or Inexpensive) Disks. RAID0 is not redundant. RAID0 means striping the volume in regular sized chunks across both disks, making one volume that is double the capacity of the smaller disk. If you have two 500GB disks you would have a 1000GB RAID0 volume. This sounds good, but the nasty gotcha is that if you lose either one of the two disks, you lose ALL your data, so you effectively double your chances of a disk failure.

While name RAID0 may be a contradiction, it's not a reason to not use it. Besides, what on earth do you think backups are for?
RAID0 should only be used if you want some fast disk as temp working space that you don't care if it disappears.

Drivel.
Mint Testing Team & Mint Donor #3606
Intel i7 4820K @ 4.7GHz, 32GB Corsair Vengeance Pro
2133MHz XMP, 4 Samsung 850 PRO 512GB SSDs in
RAID0, 12TB HW RAID10, 3 x 24" Samsung UlHD,
Custom pre-emptive kernel 4.7.5,
Dual nVidia GTX 1080

beetleshirt
Level 1
Level 1
Posts: 15
Joined: Fri Apr 12, 2013 7:35 am
Location: Sydney, puɐlɹǝpunuʍop

Re: Installing on two Drives ?

Postby beetleshirt » Wed Apr 17, 2013 10:00 pm

catweazel wrote:While name RAID0 may be a contradiction, it's not a reason to not use it. Besides, what on earth do you think backups are for?

The term RAID has an association with most people with the idea that your data is protected if a disk fails, but quite the opposite occurs with RAID0. Oh, and backups? For most people that's what you start doing after your first disk failure.

catweazel wrote:Drivel.

OK, I am probably a bit negative about R0 and it does have its uses, but people shouldn't be using it without knowing the risks.

Well chosen avatar, by the way.
ASRock Z68Extreme4 Gen3 with i7-2600K, 16GB Corsair Vengeance 1600C9 RAM, Gigabyte GTX670 OC 2GB.
240GB Intel 335 SSD (Mint 14.1 x64 xfce), 120GB Corsair F120 (Win7 Pro x64), Hitachi 7k3000 3TB for data.
Dell U2711 @ 2560x1440


Return to “Installation & Boot”

Who is online

Users browsing this forum: blue_bullet, DanielR and 7 guests