LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-13-2011, 09:22 PM   #1
tier
LQ Newbie
 
Registered: Jan 2011
Location: Pennsylvania
Distribution: Arch
Posts: 4

Rep: Reputation: 0
Partition scheme assistance


I've been messing around with Arch for awhile in a VM within Windows and figured it's time to make the leap and put it on a new box I have here to attempt to run close to full time.

The main disk is a 64gb Crucial C300 SSD and the other a 1TB hard drive.

I've read several articles on trying to properly align the SSD partitions so hopefully I don't botch that up from the get go and I'm trying not to over complicate things for a basic home desktop but anyway here are my thoughts.

The ssd:

/ - 20gb
/boot - 100mb
/home - rest of space

The 1 TB:

Use LVM for 1 big volume group.

Probably make a partition for /var and /usr in there... not really sure how large to make them though. Then the rest will be /movies /music /data and so on, just space for me to fill up with whatever. I guess the beauty of LVM is I can re-size all of this as necessary after the fact.

Also, regarding the ssd, I want to make sure it's ok to leave /tmp as a folder on / since I plan on mounting it to tmpfs afterwards or should I make a separate tmp partition?

Thanks in advance for any advice.
 
Old 04-13-2011, 10:04 PM   #2
Sjonnie48
Member
 
Registered: Jun 2005
Location: Earth
Distribution: Ubuntu10.04
Posts: 308

Rep: Reputation: 43
Hi!
It is not necessary to create separate partitions for /boot, /tmp, /var and /usr.
Making your / partition 8GB will be more than sufficient for the entire file system including /boot, /tmp, /var and /usr.
On my system this all takes approx. 3.2GB.
The swap partition must have the size of your memory, and the rest of the ssd can be used for /home, or whatever you like.
 
Old 04-13-2011, 11:22 PM   #3
spazticclown
Member
 
Registered: Sep 2010
Distribution: Fedora, Android, CentOS
Posts: 91
Blog Entries: 2

Rep: Reputation: 21
About a year ago I did some (weeks) of reading about aligning to SSDs, the one thing I learned was that using an LVM displaced the partitions inside the LVM and everything ended up misaligned. I did some testing on my slow 30MiB SSD and didn't really see a speed difference when aligning vs not aligning but by that time I no longer needed/wanted to deal with alignment. Using one aligned partition, as Sjonnie48 said, makes it easier than using multiple partitions and aligning each independently.

Secondly SSD reality is expensive you might want to consider putting the Swap on the 1TB where space is cheap. Also constantly writing to the SSD is what decreases the life expectancy. Many of the posts I read recommended putting the firefox cache and swap on another drive or even on a SD card. Grain of salt, a year ago SSDs were twice the price for half the speed.
 
Old 04-14-2011, 12:40 AM   #4
Sjonnie48
Member
 
Registered: Jun 2005
Location: Earth
Distribution: Ubuntu10.04
Posts: 308

Rep: Reputation: 43
I partially agree with spazticclown. tier did not intend to use LVM for the SSD.
But it's better to put swap and /home on the 1TB drive.
Doing so will substantially decrease the number of write operations for the SSD.
 
Old 04-14-2011, 01:20 AM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
A separate /boot is useful in case you want to be able to boot a choice of several OSes, each with its own other file system(s) -- and essential if you want to use a file system type for / that the boot manager cannot read.

It is more likely that /tmp and /var will be filled (excessive logging, buggy non-system software ...) than that / and /usr will be filled. For some people this is a good enough reason to make them separate file systems.

IMHO there is little benefit in having /usr as a separate file system. The Filesystem Hierarchy Standard (FHS) is intended to allow a separate /usr which can be shared amongst multiple computers but the standard has not been closely enough followed to make this practicable.

Your swap needs to be as big as your swap needs to be; there is no simple way to calculate it. One approach is to use a file for swapping, set up an extreme load and see how big the file gets then (optionally) change to a swap partition bigger than that. Given the size of your 1 TB HDD and the probable swap needs you can afford to be generous. If swapping will be heavy there are performance benefits in placing it in the middle of the HDD (shorter head movements, on average) so you may like to use two LVM partitions either side of it instead of a single LVM partition of all the HDD -- but if it will be very heavy swap would be better on the SSD (subject to wear considerations ... ?). If you plan on hibernating then a separate swap partition dedicated to hibernating is required for a robust system.
 
Old 04-14-2011, 08:02 AM   #6
tier
LQ Newbie
 
Registered: Jan 2011
Location: Pennsylvania
Distribution: Arch
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks so far everybody.

My thoughts in just keeping /boot, / and /home on the ssd were to limit writes to the disk. Then probably adding either noatime or relatime mount flags to the partitions for / and /home. I've heard using noatime can cause problems since some apps just don't work with that flag in use so relatime could be the better option?

I guess not having /usr on its own on the 1tb drive could be beneficial since most apps will be launching from there so I might acquire some performance boost by having that on the SSD, right?

Then on the 1 tb drive give /var and /tmp a spot even though I plan on mounting it to tmpfs. Good call on the swap, almost forgot about that. This box has 8gb of ram so the swap probably won't be touched much but I have the space. I don't plan on hibernating with this system but then again, might be interesting to try to figure out how power management works in linux. Is a swap double the memory size the recommended for hibernation?
 
Old 04-14-2011, 11:30 AM   #7
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by tier View Post
I've heard using noatime can cause problems since some apps just don't work with that flag in use so relatime could be the better option?
relatime is working fine on all HDD-based file systems here.
Quote:
Originally Posted by tier View Post
Is a swap double the memory size the recommended for hibernation?
AFAIK there is no precise description of how it is used to base a calculation on. Working from first principles it needs to be a little bigger than the memory size because, worst case, all the memory is be in use (no free pages) and there's the non-memory data to recall -- processor state, GPU state etc. (I'm vague on the details); it's not big so a few tens of extra MB should (TM) be more than enough. The mysterious area is how any swap space being used is dealt with. For total robustness it should be copied into the dedicated swap partition in case another OS is booted and overwrites swap content but that would be inefficient and could be unacceptably slow because large amounts of data might have to be copied. In the absence of a precise description of the hibernate process we are left with trial-and-error

What happens when /tmp is created as tmpfs or when it is a symlink to /var/tmp? If anything is written to /tmp before the tmpfs is created or before /var is mounted it will become inaccessible.

Then there is the issue of persistent data in /tmp; AFAIK disk quota data comes into that category and I vaguely recall some other data ... ?
 
Old 04-14-2011, 11:05 PM   #8
lupusarcanus
Senior Member
 
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022
Blog Entries: 19

Rep: Reputation: 146Reputation: 146
I have everything on one partition to keep it simple.

Partitioning is specific to your needs and preferences, there is no magic bullet.

Looking at your setup, I would put / on your SSD with ext2(noatime) and /home on your HDD with ext4(noatime). You can mount /tmp in your RAM to minimize writes to your SSD and increase performance should you have a sufficient amount of RAM. You don't need swap unless you really want hibernation, which most users don't. I run the machine in my sig without a swap and it runs great.
 
  


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
Partition Scheme caloj Linux - Newbie 3 02-11-2007 03:06 PM
Partition Scheme Randall Slack Slackware 17 11-08-2005 08:49 AM
Partition Scheme Jaster Debian 6 11-13-2004 03:28 PM
partition scheme leeman_s Slackware 2 05-23-2004 11:41 AM
partition scheme -- why does it this way ??? Bluesuperman Slackware 2 10-31-2003 07:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:49 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration