Setting up a second HDD

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
Jahrew
Level 1
Level 1
Posts: 2
Joined: Tue Jan 07, 2014 10:27 pm

Setting up a second HDD

Post by Jahrew » Tue Jan 07, 2014 10:37 pm

Hey all, I'm new to Linux Mint and I'm trying to figure something out. I started out using a SSD for storing everything, but it's not very big so I got a 1tb HDD and what I want to do is have my OS and a couple of my games on the SSD but otherwise I want everything else to use the HDD by default. How would I go about doing this? I'm using Linux Mint 15 MATE. Thanks in advance.

I tried to search but I didn't anything that made sense, if theres another topic please point me in the right direction.

passerby
Level 6
Level 6
Posts: 1369
Joined: Sun Dec 16, 2012 7:29 pm

Re: Setting up a second HDD

Post by passerby » Tue Jan 07, 2014 10:49 pm

It's easiest to do during install, but what you likely want to do is put your /home partition onto the HDD.
Your home partition stores your user settings, documents, music, videos, pretty much any user data, but not the OS system files.
You can still move it post-install, eg. http://www.howtogeek.com/116742/how-to- ... ng-ubuntu/
Home PC: Xubuntu 14.04 x64, Nvidia GTX650, i7 3770K, 16GB RAM, Asus Xonar DX
Work PC: Mint 13 x64 XFCE, Nvidia GT620, i5 3470, 8GB RAM
Laptop: System76 Kudu Pro, Xubuntu 14.04 x64

My HTML5 login themes + screenshots

wayne128
Level 10
Level 10
Posts: 3412
Joined: Tue Jul 13, 2010 12:15 am

Re: Setting up a second HDD

Post by wayne128 » Wed Jan 08, 2014 3:40 am

Jahrew wrote:Hey all, I'm new to Linux Mint and I'm trying to figure something out. I started out using a SSD for storing everything, but it's not very big so I got a 1tb HDD and what I want to do is have my OS and a couple of my games on the SSD but otherwise I want everything else to use the HDD by default. How would I go about doing this? I'm using Linux Mint 15 MATE. Thanks in advance.

I tried to search but I didn't anything that made sense, if theres another topic please point me in the right direction.

To me, the easier to do is stay with what you have on SSD and OS.

Just plugin second HDD, use it own format, or use NTFS format on HDD, treat it as a data drive.

Change your browse default download location to the second HDD, now when you wish to store, it goes to HDD.
then once you are OK with using HDD to store new downloaded files, you can copy all your data from SSD to HDD and continue to use HDD as a data drive.

User avatar
Derek_S
Level 6
Level 6
Posts: 1274
Joined: Sat Dec 28, 2013 5:36 pm
Location: Long Island, N.Y.

Re: Setting up a second HDD

Post by Derek_S » Wed Jan 08, 2014 5:52 pm

Hello Jahrew - I think you have an excellent combination for your installation of Mint. I'll give you a couple of links to guide you plus several ideas of my own.

Pre-Installation: I would suggest using the SSD for the Root "/" partition and the SATA drive for both Swap and Home. I think between 16GB to 24GB would be fine for Root. This depends greatly upon how many applications you plan to install after installing Mint. A portion of the SSD should be left unallocated for garbage collection and wear leveling. This is known as "over-provisioning", a Google search using "SSD over-provisioning" will give you a better idea of what this is and why it is important. Usually 10% of the drive's capacity is considered to be the minimum, 20% is better. You will have to make your own decision about balancing the size of Root and the space left for over-provisioning. An example would be this: On a 30GB SSD, I would use 24GB for Root and leave 6GB (20%) unallocated.

Be aware of what is known as "partition alignment". This is to ensure that the filesystem blocks are aligned with the physical memory blocks on the SSD. If they are not aligned, then delete/rewrites involving small files on the SSD will erase and rewrite two memory blocks instead of one. You want to be sure that the Root partition is aligned on the 1MB boundary. Read this link for a better understanding of what I'm talking about: http://www.thomas-krenn.com/en/wiki/Partition_Alignment

As far as formatting Root, use the ext4 filesystem, because of the fact that it supports Trim, while ext2 and ext3 do not. There are other filesystems that support Trim, such as BTRFS and XFS, but for the sake of simplicity, I would use ext4 for both Root and Home. So to summarize: Root size 16GB to 24GB, formatted ext4, leaving 10% to 20% unallocated on the SSD. Be sure to align Root to the 1MB boundary. Put Swap and Home on the SATA drive, make Swap equal in size to your system memory, format Home using ext4. At this point you can do the installation of Mint.

Post-Installation: These steps are designed to optimize your SSD's performance and minimize the wear and tear of unnecessary writes. Here is the link: http://apcmag.com/how-to-maximise-ssd-p ... -linux.htm There are four main objectives here:

1.) Enable Trim - see the section under "Filesystem Layer"
2.) Optimize Read/Write Speeds - see the section under "Scheduler"
3.) Minimize Unnecessary Writes - see the section under "Swap and Temp"
4.) Move the Firefox cache files to the SATA drive - see the section under "Applications"

That's all I've got, now you know as much as I do. If another forum member wishes to add to this, please do so.
"When you rise in the morning, give thanks for the light, for your life, for your strength. Give thanks for your food and for the joy of living. If you see no reason to give thanks, the fault lies in yourself." - Tecumseh

Jahrew
Level 1
Level 1
Posts: 2
Joined: Tue Jan 07, 2014 10:27 pm

Re: Setting up a second HDD

Post by Jahrew » Wed Jan 08, 2014 10:20 pm

Derek_S wrote:Hello Jahrew - I think you have an excellent combination for your installation of Mint. I'll give you a couple of links to guide you plus several ideas of my own.

Pre-Installation: I would suggest using the SSD for the Root "/" partition and the SATA drive for both Swap and Home. I think between 16GB to 24GB would be fine for Root. This depends greatly upon how many applications you plan to install after installing Mint. A portion of the SSD should be left unallocated for garbage collection and wear leveling. This is known as "over-provisioning", a Google search using "SSD over-provisioning" will give you a better idea of what this is and why it is important. Usually 10% of the drive's capacity is considered to be the minimum, 20% is better. You will have to make your own decision about balancing the size of Root and the space left for over-provisioning. An example would be this: On a 30GB SSD, I would use 24GB for Root and leave 6GB (20%) unallocated.

Be aware of what is known as "partition alignment". This is to ensure that the filesystem blocks are aligned with the physical memory blocks on the SSD. If they are not aligned, then delete/rewrites involving small files on the SSD will erase and rewrite two memory blocks instead of one. You want to be sure that the Root partition is aligned on the 1MB boundary. Read this link for a better understanding of what I'm talking about: http://www.thomas-krenn.com/en/wiki/Partition_Alignment

As far as formatting Root, use the ext4 filesystem, because of the fact that it supports Trim, while ext2 and ext3 do not. There are other filesystems that support Trim, such as BTRFS and XFS, but for the sake of simplicity, I would use ext4 for both Root and Home. So to summarize: Root size 16GB to 24GB, formatted ext4, leaving 10% to 20% unallocated on the SSD. Be sure to align Root to the 1MB boundary. Put Swap and Home on the SATA drive, make Swap equal in size to your system memory, format Home using ext4. At this point you can do the installation of Mint.

Post-Installation: These steps are designed to optimize your SSD's performance and minimize the wear and tear of unnecessary writes. Here is the link: http://apcmag.com/how-to-maximise-ssd-p ... -linux.htm There are four main objectives here:

1.) Enable Trim - see the section under "Filesystem Layer"
2.) Optimize Read/Write Speeds - see the section under "Scheduler"
3.) Minimize Unnecessary Writes - see the section under "Swap and Temp"
4.) Move the Firefox cache files to the SATA drive - see the section under "Applications"

That's all I've got, now you know as much as I do. If another forum member wishes to add to this, please do so.
Thanks for all the info! I did a fresh install of Mint and did so as you recommended. Just going to optimize the SSD now and then find a stable amd driver! Thanks again!

User avatar
jsplicer
Level 3
Level 3
Posts: 103
Joined: Sun Dec 30, 2012 2:39 pm
Location: New York

Re: Setting up a second HDD

Post by jsplicer » Mon Jan 13, 2014 12:16 am

Wow, this is indeed a lot to digest. I started using linux about 2 years ago. Presently using Linux Mint (Petra) Cinnamon , It runs flawless! I love the name and the OS! I thought I had linux down pat, and along came formatting, and sectioning partitions. I used to just let the ISO I burned of the OS do all the formatting for me. Now that I will be buying a new SSD drive to improve performance, I better learn this stuff. Some stuff I pick up right away, formatting & partitioning has never been one of my strong suits, especially now that I am dealing with a foreign drive altogether. Personally I don't know why its called a drive at all, it's just memory right? No moving parts no plates...anyway Thank You all for this valuable information. This page is getting bookmarked as I will surely be referring back to it for some time till I have it right in my head. I don't do anything until I have it understood in my head first.

Thanks again!
Motherboard: EP45 UD3P
CPU: Intel Core2Quad Q8400
Memory: 4GiB DDR2 PC6400
GPU: NVIDIA GK107 Geforce GTX650
HD Drives: 1 SSD Samsung 840 EVO 120 GiB for /, Western Digital 1 TB for /home, USB2 500 GiB WD drive for /home backup

User avatar
DataMan
Level 6
Level 6
Posts: 1234
Joined: Thu Dec 04, 2008 6:47 am
Location: Carmel, Midwest USA at /var/www
Contact:

Re: Setting up a second HDD

Post by DataMan » Mon Jan 13, 2014 6:15 am

Here's my recommendations to your original posting:

1. Install your new hard drive (duh).
2. Restart and either use the LiveCd or a boot version of RescueCD
3. Launch GParted
4. Set up your storage partition(s) using GParted. Note the partitions and any pertinent labels your established (ie sdb2 - MyMusic)
5. Reboot into your resident ops.
6. Using the terminal, create your mount point(s) folders in either /media or /mnt. If you want to see the mount points on your desktop, use /media otherwise for a less cluttered look use /mnt.

Code: Select all

sudo mkdir /media/MyMusic
7. Using the terminal change the ownership and group ownership of the folders you just created to your login id (make it recursive).

Code: Select all

chown <youruserid> -R /mnt/MyMusic

Code: Select all

chgrp <youruserid> -R /mnt/MyMusic
8. Find the associated uui's of the newly created partitions (terminal mode)

Code: Select all

sudo ls /dev/disk/by-uuid -1h
9. Modify your /etc/fstab to include the mount points and the uuid's obtained in #8.

Code: Select all

UUID=8a310a69-f318-49dc-bcb7-020b9699999f /mnt/Data     ext4    defaults        0       2
10. Reboot - you should now see your data partitions in either /media or /mnt.

Additional hints:
1. Record your new fstab entries in a text file also and save in a permanent storage area. Use this for configuring future Mint installs.
2. When configuring a new Mint install, simply create a mount point for your existing Mint. Copy the contents of either /mnt or /media over to your new Mint. Set the ownership and permissions.

The above may seem like a bit, but it is really easy to do. I routinely configure 1-2 Lx ops per year and I have 3 2TB drives with ~20 data partitions. Takes just minutes to get my mount points fully operational on a new install.

I hope the above clarifies things a bit for you.

-DataMan
Linux'd since 2005 Linux ID 422356 Ubuntu ID 15015

altair4
Level 19
Level 19
Posts: 9760
Joined: Tue Feb 03, 2009 10:27 am

Re: Setting up a second HDD

Post by altair4 » Mon Jan 13, 2014 7:38 am

I would make one change in the procedure outlined above. "step 7" should be done after the partition is mounted if this is a brand new partition.

Changing ownership of a mount point before anything is mounted has no affect on the ownership or permissions after the mount. An Ext4 partition carries permissions with it so to change them it must be mounted first.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

User avatar
jsplicer
Level 3
Level 3
Posts: 103
Joined: Sun Dec 30, 2012 2:39 pm
Location: New York

Re: Setting up a second HDD

Post by jsplicer » Sat Jan 18, 2014 9:48 pm

Dataman, just to see if I'm understanding you correctly. After I create a home directory on my regular drive, I should just copy over the contents of my home folder from a backup I have. Then just do a new mint install first making the ssd drive /root then I'll have an option in the mint installer to choose my regular internal drive for my home folder?
Motherboard: EP45 UD3P
CPU: Intel Core2Quad Q8400
Memory: 4GiB DDR2 PC6400
GPU: NVIDIA GK107 Geforce GTX650
HD Drives: 1 SSD Samsung 840 EVO 120 GiB for /, Western Digital 1 TB for /home, USB2 500 GiB WD drive for /home backup

-RYknow
Level 1
Level 1
Posts: 48
Joined: Mon Dec 23, 2013 2:35 am

Re: Setting up a second HDD

Post by -RYknow » Sat Jan 18, 2014 11:17 pm

altair4 wrote:I would make one change in the procedure outlined above. "step 7" should be done after the partition is mounted if this is a brand new partition.

Changing ownership of a mount point before anything is mounted has no affect on the ownership or permissions after the mount. An Ext4 partition carries permissions with it so to change them it must be mounted first.
+1

Mount the drive first, then change permissions. These are a lot of steps, but after setting up numerous machines with an SSD and storage drive, this is by far the way to go!

-RYknow
This blood is flowing through a warped mind.

Post Reply

Return to “Newbie Questions”