Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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.
/ - 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?
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.
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.
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.
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.
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?
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.
Originally Posted by tier
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 ... ?
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.