Find the answer to your Linux question:
Results 1 to 9 of 9
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Suggested partition layout and filesystem choice


    Dear everyone,

    I'm (probably) going to switch from Windows to Linux and am in need of advice regarding the best way to partition my HD. At the moment I have two drives sized 640GB and 160GB, the first being my "main" drive that I'm looking to repartition. The current partition layout is this:
    • System (C:) - 50GB: For the default Windows file hierarchy (System, Users, Boot, Program Files etc.)
    • Programs (D:) - 50GB: For programs, other than those that force-install into C:\Program Files
    • Personals (E:) - 350GB: Documents, pictures, music, downloads and the contents of the desktop. appdata and the registry hives are unfortunately still in C:\Users\<username>
    • Games (F:) - 150GB

    The rational was that the system partition (C:) must contain only what's absolutely necessary, so reinstalltions and formatting do not affect everything else. Unfortunately it was impossible to prevent some side effects (eg. programs not working without reinstallation), as you cannot easily seperate many programs' settings from a specific Windows installation due to the use of the Registry system.

    The typical Linux installation has at least three partitions: swap, / and /home . My questions are these:
    1. / correspondes to my System partition combined with the Programs partition. I want to be able to easily reacreate my work setup following an OS installation; should I set /usr on its own partition? Or do packaging systems make this redundant?
    2. If not, should I set /etc on its own partition, so I have my program and system configuration seperate? Or is it simply a matter of copy&paste backup in case of a system reinstallation?
    3. What are the general size ranges I should expect the system to take? ie. How big should / be with a basic installation? The Windows folder easily gets to around 15GB with Windows Updates and several versions of .NET, and the pagefile and hiberfil files take an additional 14GB. Add a couple of programs, and along with appdata and the Program Files and ProgramData folders you're well on your way to a >30GB installation.
    4. Is transferring the files from my Personals partition to /home simply a matter of copy&paste, or are there any catches to that?
    5. And last but not least: Filesystems: Most distros use swap/ext4/ext4 for swap/root/home; OpenSuse opts for swap/Btrfs/XFS. What's your opinion on that?


    Best regards.

  2. #2
    Well



    Good luck with it and Happy Trailz, Rok

    Edit: No Windows involved in this post in any way or on my gear.
    So if not what you need. Sorry.
    Last edited by rokytnji; 04-11-2015 at 02:38 PM.

  3. #3
    So if not what you need. Sorry.
    Indeed not what I'm looking for, and I'm left with most of my questions unanswered. Thanks for the attempt.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux User
    Join Date
    Jun 2012
    Location
    SF Bay area
    Posts
    312
    IMO for a general purpose system, meaning you're not a QA person that needs to re-install the OS and/or packages regularly, separating data/files by category onto dedicated partitions isn't worth the hassle. And since it winds up being less efficient too, with the available space scattered across the partitions, there's also a penalty as well.

    So I tend to setup partitions based on whether or not I want to use RAID to protect the data from disk failures or not. Aside from allocating a partition for swap (which is general 2 times the amount of RAM rounded up to whatever looks reasonable), and ~500MB for a "/boot" partition, here's how I think about it...

    partition for "/" - collection of partitions assembled into a RAID array
    partition for "/bulk" - collection of partitions assembled into one filesystem with LVM

    That's it. Pretty much everything goes on "/", meaning "/usr", "/etc", "/home", etc... and it's all protected from hardware failure since it's on RAID arrays spread across multiple devices. And I mount "/bulk" for use as storage for data I don't feel like I need to protect.

    But that approach assumes the system has multiple, large disks. So, if I was going to install Linux on a system with just the drives you mentioned, I would just make three partitions, swap (using the 2x RAM model), "/boot" as ~500MB, and "/" with everything else using LVM. So basically, I'd recommend collecting all the space you have into one partition and using it for everything. The only parts that are worth carving out are swap and "/boot".

    As for what filesystem to use, I'd just go with ext4 personally.

  6. #5
    The scheme you're suggesting means any installation will involve backing up /home to a different partition, so why not do it in advance?

    There are two problems I was trying to solve by separating the programs and games from the system:
    1. Not needing to download and reinstall tens of GBs worth of programs with any system upgrade or change; this takes several days, and even if you only do it rarely it's a hassle that is well worth preventing if you can. This is less of an issue with Linuxs' packaging systems, but is still an issue with Windows-oriented games ran through Wine.
    2. Not needing to reconfigure every single program I'm installing. Again a hassle that takes several days, and might be avoidable with some planning.

    Will the partition scheme you're suggesting solve these issues?

    Why a separate /boot partition?

    What's your use of LVM?

  7. #6
    Linux User
    Join Date
    Jun 2012
    Location
    SF Bay area
    Posts
    312
    Quote Originally Posted by Docom View Post
    The scheme you're suggesting means any installation will involve backing up /home to a different partition, so why not do it in advance?

    There are two problems I was trying to solve by separating the programs and games from the system:
    1. Not needing to download and reinstall tens of GBs worth of programs with any system upgrade or change; this takes several days, and even if you only do it rarely it's a hassle that is well worth preventing if you can. This is less of an issue with Linuxs' packaging systems, but is still an issue with Windows-oriented games ran through Wine.
    2. Not needing to reconfigure every single program I'm installing. Again a hassle that takes several days, and might be avoidable with some planning.

    Will the partition scheme you're suggesting solve these issues?

    Why a separate /boot partition?

    What's your use of LVM?
    Here's a bit more information about how I use Linux as a general purpose home system, which is what I think we're talking about here, that will help answer the questions you've posed.

    In my experience, there's a big difference in the way I approach applying patches to my current OS and the way I plan for an upgrade to a new OS release. I apply patches to the OS and packages installed on top of the system regularly and don't bother to explicitly do "just before the upgrade" backups first.

    On the other hand, upgrading the version of the OS is something I very rarely do and I plan for it to be a pain in the ass. And in my experience it can be a very long, drawn out and tedious process. So I pick a time when I'm able to spend several days upgrading the system, most definitely include a pre-upgrade backups to external disk of everything, and then dive in. And on Linux, doing an upgrade like going from Ubuntu 12 to Ubuntu 14 WILL include re-installing every package on the system. Packages are build for specific OS dependencies in addition to other package dependencies. So changing the OS means getting new versions of all the packages as well.

    The good news is that as long as you have a decent Internet connection, the process of downloading and installing the OS and all the packages itself doesn't take days. That part typically isn't the problem. The reason I plan for a very long period of time to complete a major upgrade is in case there are packages which are no longer available for the new OS, in case some old hardware I'm using isn't supported by a graphics card, etc... Also, I've had problems where running an "upgrade the OS in place" script bombed leaving the system in a non-working state. After that I had to do a from scratch install and restore personal files from backups.

    I backup the internal disks to external ones on a regular basis 2-3 times a month to make sure I have a reasonably current disaster recovery source. Source code I work on is checked into GitHub and some documents/spreadsheets/etc... are in Google documents. So I can recover that stuff without even having to use my backups.

    The bottom line for me is separate partitions don't offer much value when it comes to upgrades. My normal patching process doesn't require special backups, since they are lower risk and I have regular backups available just in case. And OS upgrades are going to be a PITA no matter what, and I only do them once every couple of years anyway. For me, the simplicity of one "/" partition with everything in it is preferable.

    I don't understand your second question, about reconfiguring all your software. Where does the partition level info show up in your software configs, meaning aside from the OS itself?

    As for "/boot" on a separate partition, here's why I do it. First of all the amount of space needed is small so I don't mind carving it out. Second, I believe the idea is to keep the files you need to boot the system on a separate partition, that's essentially is ignored once the system is running, to minimize the probability that damage to the "/" filesystem will prevent the system from booting. But in the end, it's something install documents recommended eons ago and I've been doing it that way ever since. Maybe it doesn't matter anymore, but it certainly doesn't hurt and I haven't used a system with so little disk space that reserving 500MB was a noticeable sacrifice.

    And finally regarding LVM... There are lots of things you can do with LVM, but for my home use purposes it's all about combining separate chunks of disk into one filesystem. It's what let's me treat pieces of disk as one unit aggregated into one filesystem. In my case, that means it's the "extra space" that I didn't allocate to a RAID based filesystem.

  8. #7
    Configuration - settings for different programs, eg. default views for a PDF reader, notification settings for Skype, plugins for GIMP and Firefox, and even things like the structure of the Start menu, environment variables and various behaviors within Windows itself. In other words: The way you like your system and programs to work following an installation. It amounts to hundreds of different settings that you have to go through following the - as you state - already PITA installation, So I'm trying to minimize that. So, for example, if I have my programs in a separate partition, then any portable program (that is, one that does not depend on the Registry) will work "out of the box" the way I like it. So the more you move stuff out of the C: partition, the easier it becomes to get back to a working system following an OS installation.

  9. #8
    Linux User
    Join Date
    Jun 2012
    Location
    SF Bay area
    Posts
    312
    OK, got it... Unfortunately those sorts of things are scattered all over the place in Linux and not centralized. Some packages put configuration files in "/etc/default", some put them in a package specific directory, maybe where the code lives, maybe not. And some packages create config files in the users home directory when they are run, and changes are stored there. Finally some packages use a combination of those ideas with a hierarchy defining which settings override the others.

    Essentially every package designer is free to come up with his/her own model for storing configuration files and while there are some conventions, you'll undoubtedly wind up with a combination of models. So I don't think the partitioning setup you pick will help make major upgrades much less of a PITA when it comes to configuration options for packages, especially if you want them to apply globally (as opposed to per-user configs). The per-user configuration settings are most likely going to be in "/home". The global defaults are the ones that are going to be scattered.

  10. #9
    -->
    Okay. Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •