LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-14-2006, 11:38 AM   #1
d00bid00b
Member
 
Registered: Aug 2005
Location: London, UK
Distribution: Debian Testing
Posts: 157

Rep: Reputation: 30
Optimal partitioning schemes


Hey Linux Lovers

I have bought a 200GB hard drive to replace my old 20GB drive. Given this amount of space that I now have, I want to establish an optimal partitioning scheme, given my intentions described below:

I want to load up a couple of distros to play around with (e.g. Ubuntu, Debian, and FreeBSD) although my primary is and will be Slackware. I will be having a separate /, swap, and /home partitioning scheme, and was thinking of partitioning for /var, /opt, and /etc.

What are people's thoughts, and rough appproximations of size. I am running 500MB of RAM, so the SWAP space will be about 600MB I was thinking (unless there are other suggestions?), but any thoughts about this scheme?

Many thanks
 
Old 08-14-2006, 03:58 PM   #2
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 1,981

Rep: Reputation: 290Reputation: 290Reputation: 290
I would recommend looking into LVM ("Logical Volume Management") so you DON'T have to guess all your partition sizes correctly up front (which is an impossible task in my experience). Simply adjust them later as needed.

You didn't say what your intentions were either. "I'll be installing Slackware, Debian, Ubuntu, FreeBSD..." are not intentions. What do you plan to use these distros for? A multi-user system? A webserver? A code development environment? A GUI desktop for web surfing and email? These types of things are closer to "intentions" whereby somebody might make a partitioning scheme recommendation.

But I'd still opt for the LVM setup myself. More flexibility to define or change your intentions at a later date.

Read up on LVM at http://www.tldp.org/HOWTO/LVM-HOWTO/ Be sure and read the section 2 part that covers "benefits". I think it will match your needs. And since you are asking these partitioning questions up front BEFORE you run yourself into trouble, that indicates to me that you have the knowledge and mindset so that LVM will not place any undo administrative burdens on you.
 
Old 08-15-2006, 01:40 AM   #3
d00bid00b
Member
 
Registered: Aug 2005
Location: London, UK
Distribution: Debian Testing
Posts: 157

Original Poster
Rep: Reputation: 30
Thanks for the reply haertig. My intentions are to run a single user, networked to a LAN desktop-cum-workstation. The usage of all those distros is to experiment with them for fun and experience.

I think that my question was to ascertain (a) what partition usage would be wise to allow me to load these different distros' (for example - does FreeBSD and Debian all use /etc or do they need entirely different partitions because they are different distros) and (b) given the amount of space, most of which will be going to /home, are there any other factors I should takew into account when dividing up the drive. I will look at the reference you suggest, and maybe the answers to my queries will be there. But, if in the interim someone wants to take a stab at replying that would also be useful: more info is better than less.

Thanks
 
Old 08-15-2006, 02:01 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,138

Rep: Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987
Separate partitions (including /home) - maybe share swap if you aren't planning on using suspend2.
10 Gig each, and don't allocate the whole disk - then you can add what you need.

Poor mans LVM - I don't use LVM as I build too many kernels, and I can't see the sense. There have certainly been times when I wish I had used LVM ...
 
Old 08-15-2006, 05:13 AM   #5
d00bid00b
Member
 
Registered: Aug 2005
Location: London, UK
Distribution: Debian Testing
Posts: 157

Original Poster
Rep: Reputation: 30
Hi syg00. Thanks for replying. I don't know what suspend2 is, nor how to use it? Is it something that is recommended for drives this size or for having multiple distros loaded?
I can't really see too many problems sharing swap. I presume that if I lay out the partition scheme like this, then I should be okay?
Code:
/, swap, /home, /etc, /var, /opt, /tmp
I take your point about not allocating all of the drive so that I can use it in the future. In truth though, I will probably allocate the balance to /home with about 30GB to / and 20GB to /opt and 1 or 2 GB to /etc, /tmp, and /var

My question still remains though: if these partitions are allocated as described, can/will other distros use these or will each distro require its own partition scheme. I am pretty certain that they won't, but am unsure about FreeBSD's requirements. Does anyone have any experience dual booting a Linux distro and FreeBSD?

Thanks again.
 
Old 08-15-2006, 04:27 PM   #6
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 1,981

Rep: Reputation: 290Reputation: 290Reputation: 290
You could have different distro's share /home, /tmp and swap. Anything more than that could get downright dangerous. You might be able to share /boot as well, but you might have to do some manual work/repair if different distro's stomped on each other (grub config files come to mind as a possible conflict).

[edit]
p.s. - any non-standard filesystem could be shared between distros as well. Say /music or /photos or something like that.
[/edit]

Last edited by haertig; 08-15-2006 at 04:28 PM.
 
Old 08-15-2006, 04:42 PM   #7
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86; Gentoo PPC; Gentoo Sparc64; FreeBSD; OS X; Solaris
Posts: 3,731
Blog Entries: 4

Rep: Reputation: 66
Dude! Do *NOT* put /etc on a seperate partition. Think about it: where is your fstab file that tells the kernel where to mount your other partitions? In /etc. So how is the kernel going to read this file when only '/' is mounted? It's not, and you will have a borked system...

Now, as to your orig. question, my setup is almost exactly what you want to do: FreeBSD will need a seperate partition from which you can create BSD 'slices' in. I used 20GB for this, and it is plenty of room to play around with FreeBSD, even with Ports installed.

As for different Linux installs, you can safely share swap between them, and /home is possible too, as long as you ensure your user's UID is the same on all installs (some default to 500, some to 1000 for first available user UID). I recommend sharing /boot as well. Make it /dev/hda1 and put all your kernels from all distros there (ie: vmlinuz-slack, vmlinuz-ubuntu etc etc...

Only install a bootloader (I strongly recommend grub) during your first 'main' install. When you install another distro simply add a menu item to grub.conf to boot the new install...
 
Old 08-16-2006, 01:46 AM   #8
d00bid00b
Member
 
Registered: Aug 2005
Location: London, UK
Distribution: Debian Testing
Posts: 157

Original Poster
Rep: Reputation: 30
Thanks for the heads' up guys re: a separate /etc partition!!! That hadn't even occurred to me. You saved my proverbial bacon I don't have to load FreeBSD onto the same drive so if that becomes too problematic then that would be the one I'd drop, and I can always look at loading that onto a spare machine once I have successfully installed the new HDD and transferred the data over from my old, smaller HDD.

The idea of having a mount point for /music is actually a good idea and was one that I considered but then discarded thinking that it wasn't feasible. But Bulliver, you are suggesting that not only is it feasible, but even desirable. I'll give that some thought then. Thanks for the tip re: UID - I have fallen foul of that before when trying to get NFS to work!!!

Well, looks like the next step then is to just do it, so that is part of the project I'll be doing at the end of the month when I have a four day weekend.

Thanks for all your help folks.

All the best
 
Old 08-16-2006, 11:44 AM   #9
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 1,981

Rep: Reputation: 290Reputation: 290Reputation: 290
Quote:
Originally Posted by d00bid00b
The idea of having a mount point for /music is actually a good idea...
When I mentioned /music earlier, that was just an example. If you really want to do this, you might consider putting things like this under a different mountpoint more in line with filesystem standards. For example, something you might be "serving up to other computers" would fit better under /srv, per the FHS ("Filesystem Hierarchy Standard"). Find some docs on FHS here -> http://www.pathname.com/fhs/

I have seperate mountpoints of /srv/music (ext3), /srv/photography (ext3), /srv/videos (xfs), /srv/backups (ext3), and /srv/shared_data (ext3) that I share with other computers. /srv/backups is not normally mounted ... only during backups or restores. Those other computers accessing this data are running Windows, so I share via Samba rather than NFS.
 
Old 08-16-2006, 01:00 PM   #10
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86; Gentoo PPC; Gentoo Sparc64; FreeBSD; OS X; Solaris
Posts: 3,731
Blog Entries: 4

Rep: Reputation: 66
Quote:
When I mentioned /music earlier, that was just an example. If you really want to do this, you might consider putting things like this under a different mountpoint more in line with filesystem standards.
Yeah, you could do that, or just put it wherever is easiest for you. I think a strict interpretation of the FHS would want music files in /srv but since this is a non-standard directory anyway all bets are off.

I have my media files mounted via NFS at /home/music on all my computers, including the computer they actually reside on. This way, path specific things such as playlists still work no matter what computer I am using them on.
 
  


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
Backup schemes deadlock Linux - Software 2 06-23-2006 06:59 AM
Colour schemes Law1213 Linux - General 2 08-31-2004 02:28 PM
Recommendations for partition schemes koyi Linux - General 4 05-24-2004 09:13 AM
Partitioning schemes snocked Linux - General 1 02-01-2004 05:20 AM
Advantages and Drawbacks of Different Partitioning Schemes BillRice Linux - Security 0 03-01-2002 01:39 PM


All times are GMT -5. The time now is 08:54 PM.

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