Jump to content

Linux Partitioning

Go to solution Solved by CornOnJacob,

This is what I'm going to use:

 

120GB mSATA SSD:
/boot--128MB
/--everything else
swap--8,192MB
 
750GB HDD:
/home--everything else
/tmp & /var sym-linked

 

Thank you for all your help IdeaStormerJorge!

Hi everyone,

I want to find the best partitioning setup for a laptop I plan on buying soon. I will be running Linux Mint 15, and the machine will have a 750 GB HDD and a 120 GB mSATA SSD. I've put my potential setup below, but I'm looking for feedback, particularly since I've never done this before. (I don't really know what size all the directories should be, e.g. /usr).

 
Partitions:
120GB mSATA SSD:
/boot--512MB
/--everything else
/usr--16GB
 
750GB HDD:
/var--4GB
/home--everything else
 
No swap, I will have 8GB of RAM and I don't plan on hibernating
Everything will be formatted as ext4
 
How would I put some programs on SSD but take others off if I run out of room? In Windows currently, my Program Files + Program Files (x86) folders total about 30GB.
Thank you,
    Jacob
 
P.S. I didn't know if this thread should go in the "Storage" section or the OS section, so I put it here.

[spoiler=My Current PC]AMD FX-8320 @ 4.2 Ghz | Xigmatek Dark Knight Night Hawk II | Gigabyte GA-990FXA-UD3 | 8GB Adata XPG V2 Silver 1600 Mhz RAM | Gigabyte 3X Windforce GTX 770 4GB @ 1.27 Ghz/7.25 Ghz | Rosewill Hive 550W Bronze PSU | Fractal Design Arc Midi R2 | Samsung Evo 250 GB SSD | Seagate Barracuda 1TB HDD | ASUS VS239H-P | Razer Deathadder 2013 Partlist

 

LTT Build-Off Thread: http://linustechtips.com/main/topic/35226-the-ltt-build-off-thread-no-building-required/

Link to comment
https://linustechtips.com/topic/22926-linux-partitioning/
Share on other sites

Link to post
Share on other sites

I'd put /var under the SSD as well, just sym link /var/log to the HDD. Everything else makes sense but why not a SWAP on the HDD? Not sure you an get away without it.

 

I'm just glad you didn't post in the Off Topic section (and liking that)

I roll with sigs off so I have no idea what you're advertising.

 

This is NOT the signature you are looking for.

Link to comment
https://linustechtips.com/topic/22926-linux-partitioning/#findComment-290486
Share on other sites

Link to post
Share on other sites

I'd put /var under the SSD as well, just sym link /var/log to the HDD. Everything else makes sense but why not a SWAP on the HDD? Not sure you an get away without it.

 

I'm just glad you didn't post in the Off Topic section (and liking that)

 

 

He shouldn't need swap. Swap helps when memory is low. In his case, he probably wont touch that 8GB, especially with Mint.

Link to comment
https://linustechtips.com/topic/22926-linux-partitioning/#findComment-290811
Share on other sites

Link to post
Share on other sites

I'd put /var under the SSD as well, just sym link /var/log to the HDD. Everything else makes sense but why not a SWAP on the HDD? Not sure you can get away without it.

Thanks for your help--I really appreciate it. Roughly how big should /var be? Can you explain the reasoning behind the symlink? (I want to learn as much as I can).

 

He shouldn't need swap. Swap helps when memory is low. In his case, he probably wont touch that 8GB, especially with Mint.

I do some 3D Modeling/Rendering, and I might actually use all of my RAM (I should have mentioned this originally). I've read that it is better to just let the OS kill processes than to offload things to the HDD via swap, which is slow. Is that true or should I put an 8GB swap just in case?

[spoiler=My Current PC]AMD FX-8320 @ 4.2 Ghz | Xigmatek Dark Knight Night Hawk II | Gigabyte GA-990FXA-UD3 | 8GB Adata XPG V2 Silver 1600 Mhz RAM | Gigabyte 3X Windforce GTX 770 4GB @ 1.27 Ghz/7.25 Ghz | Rosewill Hive 550W Bronze PSU | Fractal Design Arc Midi R2 | Samsung Evo 250 GB SSD | Seagate Barracuda 1TB HDD | ASUS VS239H-P | Razer Deathadder 2013 Partlist

 

LTT Build-Off Thread: http://linustechtips.com/main/topic/35226-the-ltt-build-off-thread-no-building-required/

Link to comment
https://linustechtips.com/topic/22926-linux-partitioning/#findComment-292690
Share on other sites

Link to post
Share on other sites

Thanks for your help--I really appreciate it. Roughly how big should /var be? Can you explain the reasoning behind the symlink? (I want to learn as much as I can).

 

I do some 3D Modeling/Rendering, and I might actually use all of my RAM (I should have mentioned this originally). I've read that it is better to just let the OS kill processes than to offload things to the HDD via swap, which is slow. Is that true or should I put an 8GB swap just in case?

Well if you're rendering something that's actually that big the killing off it won't be very succesful... So just put a swap in case. 

Kinda off topic: You spelled *Murica wrong.

Stuff I have I like: Moto G - Superlux HD681 Evo - Monoprice 9927

90% of what I say is sarcasm.

Link to comment
https://linustechtips.com/topic/22926-linux-partitioning/#findComment-293444
Share on other sites

Link to post
Share on other sites

Well if you're rendering something that's actually that big the killing off it won't be very successful... So just put a swap in case. 

Ok, I'll add an 8GB swap to the HDD. Thanks!

 

Kinda off topic: You spelled *Murica wrong.

Oops :X lol

 

 

My updated partition scheme:

 
120GB mSATA SSD:
/boot--512MB
/--everything else
/usr--16GB
/var--4GB
 
750GB HDD:
/home--everything else

swap--8GB

 

Can someone explain the reasoning behind the symlink that IdeaStormerJorge mentioned? Thank you!

[spoiler=My Current PC]AMD FX-8320 @ 4.2 Ghz | Xigmatek Dark Knight Night Hawk II | Gigabyte GA-990FXA-UD3 | 8GB Adata XPG V2 Silver 1600 Mhz RAM | Gigabyte 3X Windforce GTX 770 4GB @ 1.27 Ghz/7.25 Ghz | Rosewill Hive 550W Bronze PSU | Fractal Design Arc Midi R2 | Samsung Evo 250 GB SSD | Seagate Barracuda 1TB HDD | ASUS VS239H-P | Razer Deathadder 2013 Partlist

 

LTT Build-Off Thread: http://linustechtips.com/main/topic/35226-the-ltt-build-off-thread-no-building-required/

Link to comment
https://linustechtips.com/topic/22926-linux-partitioning/#findComment-294766
Share on other sites

Link to post
Share on other sites

Can someone explain the reasoning behind the symlink that IdeaStormerJorge mentioned? Thank you!

Here's how it works. Just one example how sym links can help you out:

You can install (initially) everything under the SSD then after your HDD is formatted you can move things to the HDD from the SSD but how will the OS find things?

Lets say you want to move just the files/directories that change a lot so your SSD isn't beat up.

Well first you copy those more dynamic items to the HDD, I would use rsync to copy them over so your timestamps remain the same not to mention if it stops for any reason you can start it up and it continues where you left off. Once your dynamic files directories are on the hard drive you can add sym links to them like:

(note after you copied over and then renamed or removed the original files/directories):

(note2, hdd can be whatever you want it to be I just used that name to make it obvious in the example):

sudo ln -s /home /hdd/home

sudo ln -s /var/log /hdd/var/log

You would then see the following on the SSD

ls -l /home

lrwxrwxrwx 1 root root 15 Jan 9 19:44 home -> /hdd/home/

ls -al /var/log

lrwxrwxrwx 1 root root 15 Jan 9 19:44 log -> /hdd/var/log/

Those are sym links to those files, one other directory you want to have on the HDD is /tmp, that's where the OS/WindowManager places a lot of temp files.

I roll with sigs off so I have no idea what you're advertising.

 

This is NOT the signature you are looking for.

Link to comment
https://linustechtips.com/topic/22926-linux-partitioning/#findComment-295796
Share on other sites

Link to post
Share on other sites

Here's how it works. Just one example how sym links can help you out:

You can install (initially) everything under the SSD then after your HDD is formatted you can move things to the HDD from the SSD but how will the OS find things?

Lets say you want to move just the files/directories that change a lot so your SSD isn't beat up.

Well first you copy those more dynamic items to the HDD, I would use rsync to copy them over so your timestamps remain the same not to mention if it stops for any reason you can start it up and it continues where you left off. Once your dynamic files directories are on the hard drive you can add sym links to them like:

sudo ln -s /home /hdd/home

sudo ln -s /var/log /hdd/var/log

You would then see the following on the SSD

ls -l /home

lrwxrwxrwx 1 root root 15 Jan 9 19:44 home -> /hdd/home/

ls -al /var/log

lrwxrwxrwx 1 root root 15 Jan 9 19:44 log -> /hdd/var/log/

Those are sym links to those files, one other directory you want to have on the HDD is /tmp, that's where the OS/WindowManager places a lot of temp files.

So instead of mounting a partition as a directory, i'm "forwarding" everything to a different directory? That makes sense. I'll look up rsync in a bit (i've heard of it, but i'll need a refresher--I won't bother you with that though.

 

Roughly how big should my /tmp partition be? Also, my root partition is about 100GB. Is that way too much allotted space?

 

Sorry for so many questions--I just want to be sure I'm doing this right :)

[spoiler=My Current PC]AMD FX-8320 @ 4.2 Ghz | Xigmatek Dark Knight Night Hawk II | Gigabyte GA-990FXA-UD3 | 8GB Adata XPG V2 Silver 1600 Mhz RAM | Gigabyte 3X Windforce GTX 770 4GB @ 1.27 Ghz/7.25 Ghz | Rosewill Hive 550W Bronze PSU | Fractal Design Arc Midi R2 | Samsung Evo 250 GB SSD | Seagate Barracuda 1TB HDD | ASUS VS239H-P | Razer Deathadder 2013 Partlist

 

LTT Build-Off Thread: http://linustechtips.com/main/topic/35226-the-ltt-build-off-thread-no-building-required/

Link to comment
https://linustechtips.com/topic/22926-linux-partitioning/#findComment-295839
Share on other sites

Link to post
Share on other sites

So instead of mounting a partition as a directory, i'm "forwarding" everything to a different directory? That makes sense. I'll look up rsync in a bit (i've heard of it, but i'll need a refresher--I won't bother you with that though.

 

Roughly how big should my /tmp partition be? Also, my root partition is about 100GB. Is that way too much allotted space?

 

Sorry for so many questions--I just want to be sure I'm doing this right :)

 

Getting it right, well I know I've re-re-re-installed many times just to get things perfectly layed out as you always forget something or an app decides to install somewhere you didn't expect. Which reminds me also consider moving /opt to the HDD, see asking Q's reminds one of other things :D

 

/tmp really depends on the apps you use and how much cruft they build up. I've done 10 or 20 Gigs and it filled up :( if you formatted your HDD as on big partition and then the swap then it can just be another directory under that. I have found that formatting one big drive and then chopping it up with directories for each tree to be easier to deal with in the long run than hard formatting each (setting up separate partitions for /usr, /tmp, etc.) because with the one big formatted drive you have more wiggle room than if you hard format things. Sure there are time you also want to hard format directories so they don't cause system issues like /home should be in its own partition so if you fill it up with what ever you are doing you don't kill the OS partitions. Things you learn along the way, sure you never want to fill it up but sometimes you forget that data file might grow to many many gigs :D

I roll with sigs off so I have no idea what you're advertising.

 

This is NOT the signature you are looking for.

Link to comment
https://linustechtips.com/topic/22926-linux-partitioning/#findComment-296012
Share on other sites

Link to post
Share on other sites

/tmp really depends on the apps you use and how much cruft they build up. I've done 10 or 20 Gigs and it filled up :( if you formatted your HDD as on big partition and then the swap then it can just be another directory under that. I have found that formatting one big drive and then chopping it up with directories for each tree to be easier to deal with in the long run than hard formatting each (setting up separate partitions for /usr, /tmp, etc.) because with the one big formatted drive you have more wiggle room than if you hard format things. Sure there are time you also want to hard format directories so they don't cause system issues like /home should be in its own partition so if you fill it up with what ever you are doing you don't kill the OS partitions.

So do you recommend having one big partition on the HDD as /home, and within that symlinking /tmp, /opt, etc. (not /etc :))? 

So I would run (where /home is on the hdd):

ln -s /tmp home/tmp

 

I read that /opt contains program files. Wouldn't I want that on the SSD for a speed boost to the programs?

[spoiler=My Current PC]AMD FX-8320 @ 4.2 Ghz | Xigmatek Dark Knight Night Hawk II | Gigabyte GA-990FXA-UD3 | 8GB Adata XPG V2 Silver 1600 Mhz RAM | Gigabyte 3X Windforce GTX 770 4GB @ 1.27 Ghz/7.25 Ghz | Rosewill Hive 550W Bronze PSU | Fractal Design Arc Midi R2 | Samsung Evo 250 GB SSD | Seagate Barracuda 1TB HDD | ASUS VS239H-P | Razer Deathadder 2013 Partlist

 

LTT Build-Off Thread: http://linustechtips.com/main/topic/35226-the-ltt-build-off-thread-no-building-required/

Link to comment
https://linustechtips.com/topic/22926-linux-partitioning/#findComment-296089
Share on other sites

Link to post
Share on other sites

So do you recommend having one big partition on the HDD as /home, and within that symlinking /tmp, /opt, etc. (not /etc :))? 

So I would run (where /home is on the hdd):

ln -s /tmp home/tmp

 

I read that /opt contains program files. Wouldn't I want that on the SSD for a speed boost to the programs?

 

Well the HDD layout really can be played with, I can't say all my systems are identically partitioned especially the servers. In the end its really what you decide on and ends up working for your setup. I do recommend that the HDD be one big partition to avoid having to later decide your /tmp, /opt or whatever is too small and needs to be re-formatted. That being said you also have to make sure not to fill up your drive, again something that we forget when we're in the middle of something and the drive fills up.

 

/opt, yes mainly programs and if you use them all the time place them on the SSD, for me the programs in /opt are just way too big and fill up so I would use the HDD but that's just me. If you think they are small enough for the SSD then put them their, I wish my apps that install under /opt were smaller so I could do that as well.

 

As for the links yes you can just link directly there as you listed but you can also just place temp under / of the HDD, I would avoid cross linking different known partitions into others, like home/tmp, confusion will arise later on when you can't find it if the sym link is removed for any reason.

 

So actaully make a /tmp on the HDD and then link it over on the SSD

 

ln -s /hdd/tmp /ssd/tmp

 

again hdd and ssd just to distinguish.

I roll with sigs off so I have no idea what you're advertising.

 

This is NOT the signature you are looking for.

Link to comment
https://linustechtips.com/topic/22926-linux-partitioning/#findComment-296167
Share on other sites

Link to post
Share on other sites

What I'd do is this:

 

120GB mSATA:

  • 10GB : swap
  • everything else: /

750GB HDD: /home

 

As simple as that. I'm only mentioning the swap, because you're afraid of running out of memory. If you really actively use that much memory, make sure the swap is on the SSD so everything stays nice and snappy!

Link to comment
https://linustechtips.com/topic/22926-linux-partitioning/#findComment-296178
Share on other sites

Link to post
Share on other sites

As for the links yes you can just link directly there as you listed but you can also just place temp under / of the HDD, I would avoid cross linking different known partitions into others, like home/tmp, confusion will arise later on when you can't find it if the sym link is removed for any reason.

 

So actaully make a /tmp on the HDD and then link it over on the SSD

 

ln -s /hdd/tmp /ssd/tmp

 

again hdd and ssd just to distinguish.

But since I am mounting the huge HDD partition as /home, wouldn't a tmp directory on the drive actually be /home/tmp? there wouldn't be a / on the HDD, because the whole thing (minus swap) would be /home.

[spoiler=My Current PC]AMD FX-8320 @ 4.2 Ghz | Xigmatek Dark Knight Night Hawk II | Gigabyte GA-990FXA-UD3 | 8GB Adata XPG V2 Silver 1600 Mhz RAM | Gigabyte 3X Windforce GTX 770 4GB @ 1.27 Ghz/7.25 Ghz | Rosewill Hive 550W Bronze PSU | Fractal Design Arc Midi R2 | Samsung Evo 250 GB SSD | Seagate Barracuda 1TB HDD | ASUS VS239H-P | Razer Deathadder 2013 Partlist

 

LTT Build-Off Thread: http://linustechtips.com/main/topic/35226-the-ltt-build-off-thread-no-building-required/

Link to comment
https://linustechtips.com/topic/22926-linux-partitioning/#findComment-296259
Share on other sites

Link to post
Share on other sites

This is what I'm going to use:

 

120GB mSATA SSD:
/boot--128MB
/--everything else
swap--8,192MB
 
750GB HDD:
/home--everything else
/tmp & /var sym-linked

 

Thank you for all your help IdeaStormerJorge!

[spoiler=My Current PC]AMD FX-8320 @ 4.2 Ghz | Xigmatek Dark Knight Night Hawk II | Gigabyte GA-990FXA-UD3 | 8GB Adata XPG V2 Silver 1600 Mhz RAM | Gigabyte 3X Windforce GTX 770 4GB @ 1.27 Ghz/7.25 Ghz | Rosewill Hive 550W Bronze PSU | Fractal Design Arc Midi R2 | Samsung Evo 250 GB SSD | Seagate Barracuda 1TB HDD | ASUS VS239H-P | Razer Deathadder 2013 Partlist

 

LTT Build-Off Thread: http://linustechtips.com/main/topic/35226-the-ltt-build-off-thread-no-building-required/

Link to comment
https://linustechtips.com/topic/22926-linux-partitioning/#findComment-315976
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×