Installing on two Drives ?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
hdesknab

Installing on two Drives ?

Post by hdesknab »

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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Pierre
Level 21
Level 21
Posts: 13215
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: Installing on two Drives ?

Post by Pierre »

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

Re: Installing on two Drives ?

Post by hdesknab »

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: 6701
Joined: Sun Jan 30, 2011 12:38 pm
Location: Utrecht, The Netherlands

Re: Installing on two Drives ?

Post by AlbertP »

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.
yonnie
Level 3
Level 3
Posts: 128
Joined: Mon Jan 03, 2011 12:18 am

Re: Installing on two Drives ?

Post by yonnie »

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?
We are children of children and do as we are shown.
-James Curran
beetleshirt

Re: Installing on two Drives ?

Post by beetleshirt »

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.
jbb

Re: Installing on two Drives ?

Post by jbb »

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.
yonnie
Level 3
Level 3
Posts: 128
Joined: Mon Jan 03, 2011 12:18 am

Re: Installing on two Drives ?

Post by yonnie »

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?
We are children of children and do as we are shown.
-James Curran
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Installing on two Drives ?

Post by catweazel »

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.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
beetleshirt

Re: Installing on two Drives ?

Post by beetleshirt »

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.
beetleshirt

Re: Installing on two Drives ?

Post by beetleshirt »

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.
jbb

Re: Installing on two Drives ?

Post by jbb »

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 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Installing on two Drives ?

Post by catweazel »

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.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
beetleshirt

Re: Installing on two Drives ?

Post by beetleshirt »

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.
Locked

Return to “Installation & Boot”