LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 10-24-2009, 07:36 AM   #1
Switch7
Member
 
Registered: Sep 2009
Posts: 92

Rep: Reputation: 16
Using both SSD/HDD for partitioning or is it better to just get external HDD?


I wanted to test out the SSD and it only has very little GB. I download many things so this is very small for me and I always use over 1TB of space. I wanted to know if something like this would work out. (Please note that I'm still quite new to the linux world)

SSD
/dev/sda1, /boot
/dev/sda2, /
/dev/sda3, /usr
/dev/sda4, /tmp

2TB HDD
/dev/sdb1, /var
/dev/sdb2, /home

I been wondering how I should partition it and came across this site (I don't use this distro though)

Quote:
There are several advantages for using discrete filesystems, rather than combining all into one partition:

* Security: Each filesystem may be configured in /etc/fstab as 'nosuid', 'nodev', 'noexec', 'readonly', etc.
* Stability: A user, or malfunctioning program can completely fill a filesystem with garbage if they have write permissions for it. Critical programs, which reside on a different filesystem remain unaffected.
* Speed: A filesystem which gets written to frequently may become somewhat fragmented. (An effective method of avoiding fragmentation is to ensure that each filesystem is never in danger of filling up completely.) Separate filesystems remain unaffected, and each can be defragmented separately as well.
* Integrity: If one filesystem becomes corrupted, separate filesystems remain unaffected.
* Versatility: Sharing data across several systems becomes more expedient when independent filesystems are used. Separate filesystem types may also be chosen based upon the nature of data and usage.
Quote:
If you are using an SSD, you may wish to locate your /var on an HDD and keep the / and /home partitions on your SSD to avoid needless read/writes to the SSD.
Would separating the partition to both SSD and HDD make my system slower or unstable or have any negative effects? I'm not sure what other way I could do other than using a external HDD. I just want to store musics, pictures, and videos on the storage (which goes to /home). I heard about making a file called /storage on the second HDD and mount it. I searched more on this but I became more confused. I have no idea how this is done if that's even possible.

If I do use a external HDD, how would this work? I download files directly into the external HDD and if I wanted to play a video, would the mplayer that's located inside SSD get the benefit from the increased performance of the SSD even while playing the video that's located inside the slower external HDD? Or would I need to bring out the video into the SSD and play it from there? I'm not sure if mplayer in the SSD does all the job reading it or the slower external HDD is doing the work(which means I'm not getting an benefit from the SSD).

I apologize for sounding very confusing. Just until yesterday, I had no idea about separating partition was even possible (I always made one partition and one swap) and I'm quite new at this.
 
Old 10-24-2009, 09:35 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,469
Blog Entries: 4

Rep: Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525
Hi,

As you know the 'SSD' will be functionally faster than the 'HDD'. The limited capacity of the 'SSD' is a controlling factor. Your partitioning scheme should be setup to optimize the use of a 'SSD'. Your example of the player is a good one. Your launch of the player would be faster on the 'SSD' then the player will be operating out of the memory. The load from the storage 'HDD' for video will be noticeable but depending on system resources the playing of the video should be steady. Sure it would be better to have it on the 'SSD' but you have a limited capacity.

For a desktop system the partitioning scheme should reflect the typical user applications to be performed. If this were for a server then the scheme would be different. Partition schemes can be very personal and debates occur all the time over the best scheme.

I would look at my physical memory first. Max out to the limit of your system memory capability. Then look at how your 'SSD' should be used to speed things up. If you do a lot of compiling then that should give you some lead. If you do video editing then that may dictate how you setup the basic scheme. So for someone else to provide a scheme generally then I say '/' on the 'SSD', minimal 'swap' on 'SSD'. I would create a separate partition on the 'SSD' for '/home'. Then use that big boy 1TB as a storage drive & backup.

Do a search here on LQ as this very subject has been covered many times.
 
Old 10-24-2009, 10:17 AM   #3
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
The /Storage on the external is probably a pretty good idea. There are a lot of config files stored in /home that get accessed a lot(SSD accesses will be faster). As far as building it, that is pretty easy. You make a sub directory in you home partition (/home/whoever/storage) and then mount the external drive to it. Another alternative (and the one I use) is to put the mount point in a general system area and then put a link to that mount point on your desktop. Here is the line I use from my fstab:

Quote:
/dev/sda2 /media/Storage ext3 defaults
/media/ is where RH based systems generally mount removable drives (DVD,plug in USB stuff(hot mount), CDs). I just make sure that my /Storage has R/W permissions for everybody. With either of these two solutions, the other drive just appears to be another sub directory(seamless).
 
Old 10-24-2009, 05:40 PM   #4
Switch7
Member
 
Registered: Sep 2009
Posts: 92

Original Poster
Rep: Reputation: 16
Thank you for the reply. I'm probably making some people frustrated with all these newbie questions but I really want to make sure I'm doing things right first. I did do a search but I was confused about the way SSD was supposed to be setup because I was told partition scheme should be different from your normal HDD. All the search is coming up for HDD partition scheme and there's things I'm not supposed to do for SSD like making a swap partition or keeping /var in SSD.

I should've mentioned that I don't have any external HDD yet so if it's possible, I could use this 2TB internal HDD that I already have as my storage to save money.

I'm not sure if I need a swap since I have 12GB of ram. I also did a google search and it mentioned to never create a swap "partition" on the SSD. I was looking at swap "file" now and maybe create one as a file if 12GB isn't enough for browsing the web, listening to music, storing and browsing pictures, watching DVD or videos, or using Virtualbox for windows on the application that is not compatible with wine. I don't hibernate my computer but I heard I still need at least 1GB minimum of swap no matter how much RAM I have. I'll probably just create 1GB of swap "file" to be on the safe side. Am I on the right track?

What I'm confused is when I do a fresh install, how I should create a file called /storage on the 2TB HDD. I'm guessing (I think I'm making a horrible mistake) as root, I do:
(sdb is where my 2TB HDD is located at)

Code:
mkdir /dev/sdb storage
This 2TB HDD has nothing in it so I'm guessing that I just leave this HDD completely alone without touching it when doing a fresh install.

Or is this the correct way?

Go to fstab then add a line like this:

Code:
/dev/sdb /Storage ext4 defaults
I'm guessing this will simply create a folder called Storage and I can store all my pictures, videos, and musics in here.

According to the wiki, I should make a /var partition (/var isn't recommended on the SSD) here so I should probably add these two instead?
Code:
/dev/sdb1 /var ext4 defaults
/dev/sdb2 /Storage ext4 defaults
or maybe I'm supposed to add the /var when doing a fresh install since I might make two /var folders.

So for a complete newbie guide, it should be something like this.

1) Do a fresh install and making /var partition on the second HDD at /dev/sdb1. /home, /, /boot should be located on the SSD. I heard I only need 32MB for /boot. I'm replacing LILO and going to use grub and I just wanted to make sure if this would be right on the SSD. I only have one OS and I never dual boot. I've seen people make over 150MB for /boot but I'm guessing this is only for dual booters?
2) Install everything else normally
3) After, make 1GB of swap "file"
4) Go to fstab and add: /dev/sdb2 /Storage ext4 defaults. This should magically create a folder called /storage and I can access this and directly download things into this folder.

Maybe I'm supposed to follow Lazlow's way (even though this is for internal HDD, I think it should be the same) and make a folder called /home/myname/Storage then go to fstab and mount it using:

Code:
/dev/sdb2 /home/myname/Storage ext4 defaults
I'm a bit confused at this as my /home folder is located in the SSD and I'm about to mount a section of my /home into the 2TB HDD. I'm thinking this might cause some sort of problem.
 
Old 10-24-2009, 07:03 PM   #5
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,743

Rep: Reputation: 196Reputation: 196
No problem...

I think that you might profit by reading these.

http://www.tuxfiles.org/linuxhelp/linuxfiles.html

http://www.tuxfiles.org/linuxhelp/mounting.html

As I read the post from lazlow, the suggestion is that your /home directory be on the SSD in a /home partition. Then" You make a sub directory in your home partition (/home/whoever/storage) and then mount the external drive to it."

Mounting either an external or internal HDD to the sub-directory "storage" puts the content that you want to store on the larger but slower drive, and the directory in which it is located, that will be called upon more often, on the smaller but faster SSD.

A directory is a logical location for files, but the physical location of the files does not have to be the same as the the logical location.

Last edited by thorkelljarl; 10-24-2009 at 07:31 PM.
 
Old 10-25-2009, 12:21 AM   #6
Switch7
Member
 
Registered: Sep 2009
Posts: 92

Original Poster
Rep: Reputation: 16
Thank you for the links thorkelljarl.

I read few things about SSD and came up with this and this. It seems like I don't have to make separate partition like /var or use something like ext2 according to the ext4 lead developer (Theodore Tso).

I made my partition scheme very simple:

/etc/fstab
Code:
/dev/sda1 /boot ext2 defaults 0 1
/dev/sda2 / ext4 defaults 0 1
/dev/sda3 swap swap defaults 0 0
/dev/sda4 /home ext4 defaults 0 1
/dev/sdb1 /home/myname/Storage ext3 defaults 0 1
Before I added the last line for my /Storage, I went to /home/myname and did:

Code:
mkdir Storage
I confirmed that I successfully created a directory in /home/myname and /Storage was there. My computer can no longer boot up anymore. It can boot up if I change it to
Code:
/dev/sdb1 /home/myname/Storage ext3 defaults 0 0
but it saids the file doesn't exist.

When I checked what's inside /dev, I see:

sda1, sda2, sda3, sda4, sdb, sdc, sdd, sde, sdf. There's nothing called sdb1 in there so I changed it the /dev/sdb and I still get the same problem.
 
Old 10-25-2009, 12:39 AM   #7
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
I will take a guess that you have not formatted the file system on the drive, yet. You will probably need to put a partition on it (sdb1) and then put a file system on it. Gparted is probably either on your system or available in your repo, and it does both jobs very well.
 
Old 10-25-2009, 12:47 AM   #8
Switch7
Member
 
Registered: Sep 2009
Posts: 92

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by lazlow View Post
I will take a guess that you have not formatted the file system on the drive, yet. You will probably need to put a partition on it (sdb1) and then put a file system on it. Gparted is probably either on your system or available in your repo, and it does both jobs very well.
I haven't touch anything at all. Thank you, I will do that now and will make a post again if it gets working or not. I think this should solve it though.
 
Old 10-25-2009, 01:58 AM   #9
Switch7
Member
 
Registered: Sep 2009
Posts: 92

Original Poster
Rep: Reputation: 16
I successfully created sdb1 but I have a quick question regarding this. I'm trying this out on another HDD which has 600GB in it. I'm using large amounts of GB after I used the entire HDD for sdb1 storage. Is this normal?

Also, when I cd into /Storage and type ls -a, I get something called lost+Found. Is this what's taking 10GB of space? I used the entire drive space and using ext4 on this.

This is what I added to my /etc/fstab:
Quote:
/dev/sdb1 /home/myname/Storage ext4 defaults 0 0
Also, when I try creating a directory there, I get permission denied or when saving something, firefox tells me "/home/myname/Storage/3115.png could not be saved, because you cannot change the contents of that folder. Change the folder properties and try again, or try saving in a different location."

Last edited by Switch7; 10-25-2009 at 02:38 AM.
 
Old 10-25-2009, 08:12 AM   #10
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,743

Rep: Reputation: 196Reputation: 196
They lie...

If you were to buy a 500GB HDD, its actual size may be less than the nominal 500GB that it would be sold as by measure. Look at the description of capacity measurements in point 3.1 in this .

http://en.wikipedia.org/wiki/Hard_disk_drive

In addition, the HDD size listed is as it is unformatted, and formatting also uses some of its storage capacity. My formatted 500GB HDD has 465GB of actual capacity as measure by "lshw"

lost+found is normal. You may find it and its function with Google.

Last edited by thorkelljarl; 10-25-2009 at 11:30 AM.
 
Old 10-25-2009, 09:26 AM   #11
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,469
Blog Entries: 4

Rep: Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525
Hi,

Quote:
Originally Posted by Switch7 View Post
Thank you for the links thorkelljarl.

I read few things about SSD and came up with this and this. It seems like I don't have to make separate partition like /var or use something like ext2 according to the ext4 lead developer (Theodore Tso).

I made my partition scheme very simple:

/etc/fstab
Code:
/dev/sda1 /boot ext2 defaults 0 1
/dev/sda2 / ext4 defaults 0 1
/dev/sda3 swap swap defaults 0 0
/dev/sda4 /home ext4 defaults 0 1
/dev/sdb1 /home/myname/Storage ext3 defaults 0 1
Before I added the last line for my /Storage, I went to /home/myname and did:

Code:
mkdir Storage
I confirmed that I successfully created a directory in /home/myname and /Storage was there. My computer can no longer boot up anymore. It can boot up if I change it to
Code:
/dev/sdb1 /home/myname/Storage ext3 defaults 0 0
but it saids the file doesn't exist.

When I checked what's inside /dev, I see:

sda1, sda2, sda3, sda4, sdb, sdc, sdd, sde, sdf. There's nothing called sdb1 in there so I changed it the /dev/sdb and I still get the same problem.
To cherry pick information will cause you to fall into traps. First, what is your 'SSD' device? Specification, drive manufacture and model?

You have too understand that the general statement of placing your '/var' on a 'SSD' can produce potential problem(s). The issue of writes to newer 'SSD' is not what it was for their predecessors. The major reason for not placing '/var' is that your will be writing logs and information which will be dependent on the operations performed. Placing on a different media like a 'HDD', the writing of the log(s) will not effect a noticeable problem, if you do notice a problem then you had better find out why or what the problem is.

Whenever you allocate space on a storage media you must also create a 'filesystem' on that media.



Just a few links to aid you with your Linux ventures;

Linux Documentation Project
Rute Tutorial & Exposition
Linux Command Guide
Utimate Linux Newbie Guide
LinuxSelfHelp
Getting Started with Linux
Advanced Bash-Scripting Guide
Virtualiation- Top 10

These links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!
 
Old 10-25-2009, 10:31 AM   #12
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
Ok, the HD manufactures round off when they label their HD drives on size (one issue). Ext3 and Ext4 are journaling file systems, which means the can fix themselves relatively easily (sorta). However it also means that it takes up more space, if I remember correctly the default is 5% of the disk space. While this amount can be adjusted(takes longer to look up how than to actually do it), in most cases I would just leave it as is.
 
Old 10-25-2009, 06:19 PM   #13
Switch7
Member
 
Registered: Sep 2009
Posts: 92

Original Poster
Rep: Reputation: 16
Thank you for the reply and links.

Quote:
Originally Posted by onebuck View Post
Hi,
To cherry pick information will cause you to fall into traps. First, what is your 'SSD' device? Specification, drive manufacture and model?
Brand: Intel
Series: X25-M
Model : SSDSA2MH160G2R5

The ext4 lead developer mentions "However, the next generation of SSD’s, such as Intel’s X25-M SSD, have worked around the write amplification affect" so I was thinking it was alright to place /var into SSD or even make a swap partition. (I have 12GB of ram but I read before that I must have 1GB of swap partition/file no matter how much RAM I have or my computer won't function correctly. I don't use hibernation either.)

I made a post about the read/write permission issue and wanted to confirm if this is safe to do:

Quote:
# chgrp storage /home/myname/Storage
# chmod 775 /home/myname/Storage
# gpasswd -a user_name storage
I read that some chmod are dangerous to do and it'll give everyone access to it so I should limit it by only giving permission to user group in storage, which is what I want to do to begin with. I did a google search and it seems safe to do but I wanted to confirm it since I'm a bit too cautious. As far I can tell, the first line changes /home/myname/Storage to storage group. chmod 775 makes it so it can only be accessed by the certain group (it gives read/write permission). The last line adds specific user into storage group.

Last edited by Switch7; 10-25-2009 at 06:21 PM.
 
Old 10-25-2009, 08:13 PM   #14
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,469
Blog Entries: 4

Rep: Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525
Hi,

Your setting up a multi-user system now? Your concerned about control of the access to the storage by some other account on this machine?

Who made the 1GB swap statement for a 12GB base memory?

I'd ask why and not accept such as verbatim. How did you define the use of the system to the person that stated 1GB swap? If you are going to be doing large or intense applications that will utilize the memory footprint and your paging is set high then a 1GB would be a safe choice. But if your utilizing a normal desktop with that much memory then your paging most likely won't occur to swap so a smaller swap could be designated. Especially if your wanting to place the swap on the 'SSD'.

The growth of the '/var' is the issue if you are not careful. By placing the contents of '/var' space on the 'HDD' an mounting on the 'SSD' directory '/var' won't cause a problem as long as the space allocation is sufficient.

 
Old 10-25-2009, 11:29 PM   #15
Switch7
Member
 
Registered: Sep 2009
Posts: 92

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by onebuck View Post
Your setting up a multi-user system now? Your concerned about control of the access to the storage by some other account on this machine?
Yes, in the future, I'll probably make a guest account for friends or family if they wish to use the computer. I don't want them being able to erase, or write on it unless I give them access to it by placing them in storage group. Reading is no concern though.

Quote:
Originally Posted by onebuck View Post
Who made the 1GB swap statement for a 12GB base memory?

I'd ask why and not accept such as verbatim. How did you define the use of the system to the person that stated 1GB swap? If you are going to be doing large or intense applications that will utilize the memory footprint and your paging is set high then a 1GB would be a safe choice. But if your utilizing a normal desktop with that much memory then your paging most likely won't occur to swap so a smaller swap could be designated. Especially if your wanting to place the swap on the 'SSD'.
I did a google search and found that I needed at least 1GB of ram minimum, or at least that's what was mentioned on the site. It's a normal desktop that won't be used for intense applications. I never seen it go more than 10% before. Maybe he/she expected everyone had lower amounts of ram. I'll probably just set it up as 512MB of swap partition. I'm not sure if this is another myth but I read before that it's always good to keep some swap partition and it's not recommended to use none or it won't function correctly.


Quote:
Originally Posted by onebuck View Post
The growth of the '/var' is the issue if you are not careful. By placing the contents of '/var' space on the 'HDD' an mounting on the 'SSD' directory '/var' won't cause a problem as long as the space allocation is sufficient.
I see, I guess I'll create a /var partition on the HDD. I thought it might cause some problem but it looks like there's nothing to lose.

Last edited by Switch7; 10-25-2009 at 11:32 PM.
 
  


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
I installed ubuntu 9.04 to my Maxtor external hdd. I have no internal hdd. I can boot dont33 Linux - Newbie 1 08-13-2009 05:13 PM
[SOLVED] Removing Grub from internal HDD and installing it only on external hdd M3GA8U5H Linux - Newbie 5 08-07-2009 02:47 AM
Installing Ubuntu on External HDD; PC has no internal HDD 449 Ubuntu 2 11-28-2007 06:12 PM
booting machine with linux on an external HDD without HDD connected drsoum Linux - Newbie 2 07-22-2007 04:47 AM
Bootable partion on external HDD? 40 gb firelight hdd. Trebile34 Linux - Hardware 1 03-14-2005 12:50 PM


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

Main Menu
Advertisement
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