LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-08-2004, 11:37 AM   #1
r3dhatter
Member
 
Registered: Dec 2003
Distribution: Debian (testing)
Posts: 210

Rep: Reputation: 30
linux partitioning (sizes of partitions)


1 pri 100 mb /boot
2 pri 5gb /var
3 pri 1gb swap
5 log 25gb /home
6 log 10 gb /

all are ext 3

Is this a good setup or is some of it too big and not efficient?

I think var and / might be too big, but I am not sure.

Thanks
 
Old 05-08-2004, 12:42 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
It really depends on what you are doing with your system - if you intend to store mail on your /var partition then you may need it to be that size. If you son't have that many applictions installed then /usr is likely to be smaller and you won't need / to be so big. Than again if you don't store any files on this pc the chances are that your home partition doesn't need to be so big.

It really depends on what you are using the system for and what sort of data you are storing.
 
Old 05-08-2004, 01:00 PM   #3
r3dhatter
Member
 
Registered: Dec 2003
Distribution: Debian (testing)
Posts: 210

Original Poster
Rep: Reputation: 30
I will be using it for desktop/programming. This includes games, email, apps, music, etc..

I am still not sure if I should put linux on the 80GB hd and windows on the 40 GB. I know I will be using linux a lot more, but windows still has some uses like games, printing etc... I probably will, but I wish I could just switch them instead of formatting both.
 
Old 05-08-2004, 01:00 PM   #4
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
like david_ross said, it all depends on what you're doing... home pc, business server, development workstation, etc...

the average home user (with 80 gigs) could have a 1gb swap partition and the rest of the disk for root (one huge partition) without a problem...

you don't really need to have all those partitions, they're all optional...

Last edited by win32sux; 05-09-2004 at 01:16 PM.
 
Old 05-08-2004, 01:08 PM   #5
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
If you have 2 disks then you may wish to consider another option - use one for data and one for applictions (including OSs). So you could have an 80GB disk just for data and a 20GB each for linux and windows.

If you don't think you will use the whole 80GB for data then you could consider another option which is to use the first 40GB of the 80GB disk for applictions and the second 40GB for data. Then as a backup routine you can copy all the data to the second disk. This will also go some way to protecting you from data loss in the case of a disk failure or accidental deletion.

The best way to decide is probably to see what you current usage is by running:
df -h
 
Old 05-08-2004, 01:31 PM   #6
r3dhatter
Member
 
Registered: Dec 2003
Distribution: Debian (testing)
Posts: 210

Original Poster
Rep: Reputation: 30
Filesystem Size Used Avail Use% Mounted on
/dev/hdc6 9.3G 946M 7.9G 11% /
tmpfs 253M 0 253M 0% /dev/shm
/dev/hdc1 90M 11M 75M 13% /boot
/dev/hdc2 4.6G 118M 4.3G 3% /var
/dev/hdc5 23G 113M 22G 1% /home


I just installed linux though, I will also be using it for programming (workstation), email, dvds,cds, maybe games...etc. Basically a workstation and desktop.

I will only be using windows for games, so 40 GB should do just fine.

I am not sure what you mean about the data and apps part though, well as far as how to partition it.
 
Old 05-08-2004, 03:11 PM   #7
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally posted by r3dhatter
I am not sure what you mean about the data and apps part though, well as far as how to partition it.
i think what he meant was like creating a shared partition that both windows and linux can use to store documents and stuff...

like, for example, you have a 40gb and a 80gb.... you could install linux and windows on the 40gb, and then create fat32 partitions on the 80gb (or vice-versa) that would be accessible from both windows and linux...



Quote:
tmpfs 253M 0 253M 0% /dev/shm
this looks like a ramdisk... are you doing this deliberatley??? if not, i think you might wanna comment that entry in /etc/fstab to save ram...

from looking at your df and your description of what you want to do with your machine i'd say there's really no reason why you shouldn't just use one root partition... what's the main reason why you want to have all those partitions? looks like you're wasting lots of valuable space in /var, for example... just a thought anyways...



Last edited by win32sux; 05-08-2004 at 03:24 PM.
 
Old 05-08-2004, 05:56 PM   #8
r3dhatter
Member
 
Registered: Dec 2003
Distribution: Debian (testing)
Posts: 210

Original Poster
Rep: Reputation: 30
Nope, didn't do that on purpose. I'll comment that out. I didn't know what that was, so I just left it.

I did the different partitions because I was following a debian guide (install guide actually), so when I got to the partitioning part they did that. They said it adds security and it is easy to restore if linux crashed. (home would be on its own partition so you wouldn't lose everything) Would I lose everything if I just put a root partition on if the system were to crash? I will be doing some development. Maybe I could just make a root, home, swap, boot, and no var? I am still a big time linux newb, so I have no idea how to partition correctly. I think I will be switching to an 80GB drive for linux too.

So:
100MB /boot
1GB Swap
40GB /home
38GB /

I am not sure where the programs and stuff are stored so not sure which /home or / to make bigger...

I put a lot of stuff in home though too. my downloads, music, programming, documents, etc...
 
Old 05-08-2004, 07:35 PM   #9
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally posted by r3dhatter

100MB /boot
1GB Swap
40GB /home
38GB /
two things: that's way more "/" than you need, and that "/boot" partition isn't really gonna do anything for you except eat 100mb... i'd only use a special partition for "/boot" if i had like a zillion custom kernels that i needed to test or if it was some kinda requirement for something, like a windows-based bootloader (to boot linux), for example...


Quote:

I am not sure where the programs and stuff are stored so not sure which /home or / to make bigger...

I put a lot of stuff in home though too. my downloads, music, programming, documents, etc...
if you really want to spread your desktop system over different partitions, then you probably want a huge "/home" and an average-sized "/"...

the system and software is installed in "/", while the user's documents and configurations are stored in "/home"...

i use slackware, installed using the "full install" option, which pretty much throws in everything but the kitchen sink... i'm talking LOTS of software (office, games, window managers, multimedia, security, servers, the works...)... the total install size is like 2.x gigs...

my point is that if you wanna make a partition on your desktop for "/" and one for "/home", then "/home" should be WAY bigger than "/"... "/home" is where your videos, development projects, music, documents, etc. will be stored...

"/" should only be big enough to hold the software you want to use plus some space to install more software in the future...

something like this might be better:


1GB Swap
70GB /home
10GB /


that would give you room to store all your stuff and install a decent amount of software...

however, you could also use a much simpler setup:


1GB Swap
79GB /


when you do it like this, the "/home" directory resides in the "/" partition, so you'll have all that space available for whatever you want... if you wanna install (for example) 60gb worth of games, no problem... if you wanna store (for example) 60gb of music videos, no problem either...

if, for example, you'd use the partition scheme you posted, then to install 60gb of software, well, you'd have to jump through hoops... and if you'd need to store 60gb of documents, then you'd have to start using part of "/" anyway and that would defeat the entire purpose...


here's what my "df" looks like right now... i use one partition for root and one for swap...

~$ df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/hda1 reiserfs 37G 7.0G 30G 20% /


simple. effective. flexible. i have absolutely no reason to make any more partitions on my pc...

of course my server's a different story...

=)



Last edited by win32sux; 05-09-2004 at 02:53 PM.
 
Old 05-08-2004, 09:38 PM   #10
r3dhatter
Member
 
Registered: Dec 2003
Distribution: Debian (testing)
Posts: 210

Original Poster
Rep: Reputation: 30
So, if linux were to crash, would I still be able to retrieve everything that's in the /home directory? I heard seperate partitions makes a better backup plan. I could be wrong though (actually I am almost sure I am now).

Also, what would take more room:

Windows with lots of games.

Or

Linux with games/development progs,apps,entertainment,music,docs, etc etc?

I am not sure whether it is worth it to switch the linux to the 80GB and windows to the 40 GB. As windows will just be games (maybe a few other little things). Linux, everything else. I have never used linux long enough to know how much room I would take up with it.

I could just use drive image and make an image, then stick it on. (if that program really does work)

I really appriciate the guidance given. Thanks.
 
Old 05-09-2004, 08:07 AM   #11
r3dhatter
Member
 
Registered: Dec 2003
Distribution: Debian (testing)
Posts: 210

Original Poster
Rep: Reputation: 30
bump, still concerned about question above.

Oh, and also with reinstalling another distro, I heard it is good to have a /home partition because you can just install and keep that as is.

Last edited by r3dhatter; 05-09-2004 at 08:15 AM.
 
Old 05-09-2004, 01:43 PM   #12
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Quote:
Originally posted by r3dhatter
Also, what would take more room:

Windows with lots of games.

Or

Linux with games/development progs,apps,entertainment,music,docs, etc etc?
There is no way for us to know this - do you have 5 games of 5000? Are they 5MB or 500Mb each? I'm afraid that it's a question you'll need to answer yourself.

I usually keep /home on a seperate partition so it can be shared between distros. I'm not sure it will be any better in terms of backup unless you take my suggestion from before and use the 40GB drive as a mirror for a data partition and have them on sepertate drives.
 
Old 05-09-2004, 02:04 PM   #13
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally posted by r3dhatter
So, if linux were to crash, would I still be able to retrieve everything that's in the /home directory? I heard seperate partitions makes a better backup plan. I could be wrong though (actually I am almost sure I am now).
depends on what you mean by "crash"...

generally speaking, for data rescue operations it really doesn't matter wheather it's a "/home" directory or a "/home" partition... you'd be accessing the entire disk anyway, usually from a live rescue cd...

it's not a good idea to go the "/home partition" way because of backup reasons... a true backup shouldn't be on the same medium in the first place... it should be on another machine, or at least on another disk...

of course many times it's a really good idea to make separate partitions for "/home", or "/var", or any of the other main directories... it's very recommended for servers, for example... not for security reasons, but to achieve more control and sometimes even better performance (under heavy-load)... an example would be "/var" which (on a server) contains data that is constantly changing and moving (mailboxes, system logs, databases, etc..)... so when you have (for example) several servers/daemons constantly reading and writing to "/var", under heavy-load conditions, then it makes a lot of sense to have the data reside on a different partition, or even on a different disk if possible...

if you're reading debian guides, remember that debian is primarily designed for mission-critical servers, hence you're bound to get info that's more in sync with that mentality...



Quote:

Also, what would take more room:

Windows with lots of games.

Or

Linux with games/development progs,apps,entertainment,music,docs, etc etc?
i'm using slackware 9.1, which comes with everything you mentioned, and the full installation was less than 2.5gb...

of course it doesn't come with 3d first-person shooters or anyting like that (yet)...

=)



Quote:

I am not sure whether it is worth it to switch the linux to the 80GB and windows to the 40 GB. As windows will just be games (maybe a few other little things). Linux, everything else. I have never used linux long enough to know how much room I would take up with it.
sounds to me like full windows on the 40gb and full linux on the 80gb would be a good idea if you don't care about having a "shared partition(s)"... specially if you plan on doing most of your work on linux... also, remember that ntfs write support on linux sucks, so if you want to have normal, reliable, and complete read/write access to your windows drive from linux, use fat32 for windows...


Last edited by win32sux; 05-09-2004 at 03:23 PM.
 
Old 05-09-2004, 03:21 PM   #14
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally posted by r3dhatter
I heard it is good to have a /home partition because you can just install and keep that as is.
indeed this is true. but it does have it's drawbacks (as does anything in this world)...

"/home" directories contain not only the users's documents, but also their settings... since software (and software versions) can vary between distros, you might run into some freaky stuff if you install another distro...

of course if you're just re-installing the same distro, then it would be okay (and sometimes very practical), but even so: consider that any user-level configuration errors will remain just as before the re-install...

my point is that sometimes, when re-installing, it's actually better to restore only your user('s) documents, and start with fresh default user settings...




if you make a tarball (tar.gz) of your home directory and then copy it to your other disk or machine, then you could re-partition however you wanted during re-installation, you could do some re-sizing, you could even remove the "/home" partition entirely and it would all be fine...

when you finish the install, you simply download your backup and extract it to your "/home" and everything is back to the way it was as far as "/home"s content is concerned...



Last edited by win32sux; 05-09-2004 at 03:27 PM.
 
Old 05-09-2004, 03:37 PM   #15
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
I agree that it can cause problems using differnet distros in terms of settings but you can get round it. Consider the fact that you your user is called "user". Create a user called "user" in both distros but name the home directories after the distro:
/home/user/mdk
/home/user/rh9
/home/user/slk

and so on... then store all your documents in /home/user/docs - This way all your documents are available in all systems and the settings are kept seperate.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
installation partitions and sizes in 9.1 jessj SUSE / openSUSE 5 06-01-2005 06:33 AM
partitions sizes? rontopia Linux - Newbie 10 12-10-2004 12:28 PM
Which sizes on hard-disk partitions? andersh3 Linux - Newbie 1 05-28-2004 10:22 AM
clone partitions different sizes edman007 Linux - Software 8 01-12-2004 06:53 PM
Partitions sizes eweborg Linux - Software 1 03-09-2002 10:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:48 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
Open Source Consulting | Domain Registration