LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-06-2006, 09:03 PM   #1
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
Question Sizing filesystem?


Yo,

I have been looking around but I haven't found anything I could understand about how to size the filesystem for a new Slackware installation for a desktop.

I want to run a dual-boot with the dreaded XP. I have a 40GB drive and I plan to repartition it to give XP the first 24GB. I'll use LILO in the MBR.

This leaves me approx 13GB for Slackware. From looking around, I've settled on a partitioning strategy that looks like this:

hda1 NTFS (WIN XP) 24G
hda2 SWAP 512M
hda3 /
hda5 /home
hda6 /usr/local

What is the best way to allocate the remaining 12+- GB across these directories? I would like a relatively lean Slackware installation, but since I don't know enough to say which packages I can live without, I'll probably have to install more and start pruning.

Also, I'm considering using reiserfs for /home and /usr/local and ext2 for / What is the thinking on this?

Thanks,
Rand
 
Old 02-06-2006, 09:19 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Is this a PC for general home use? If so, keep it as simple as you can:

Code:
hda1 NTFS (WIN XP) 24G
hda2 SWAP 512M
hda3 /home 5GB
hda5 / the rest
If you're using it for business (running mail servers, web servers, etc.) you might want:

Code:
hda1 NTFS (WIN XP) 24G
hda2 on /boot 100MB
hda5 on /home 5GB
hda6 on /tmp  1GB
hda7 on /var  2GB
hda8 swap 512M
hda9 on / the rest
There are a lot of different ways to do it. Most of my stuff generates more activity in var than tmp for example...

If your backup tool is ghost, use ext2/ext3 for the file systems. If you use something else for backups, look into reiserfs or xfs. I tend to stick with reiserfs and ext3, that's just my preference.
 
Old 02-07-2006, 12:39 AM   #3
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Original Poster
Rep: Reputation: 55
I'm not clear on the details, but I read somewhere that somebody recommended having /home and /usr/local separate from / so that the system could be reinstalled without affecting the user accounts and files. Given that strategy, I don't know how to allocate the space. I'll use this machine as a test mule so I can get familiar with Linux. It's been a lot of years since I used a Unix-like machine, so I am basically starting at zero again- at any rate, I never administered a Unix system. It's for my own experimentation and won't be any kind of big server.

You mentioned backup-tool, I have no idea. I haven't thought that far ahead. My reasoning was to use reiserfs on /home and /usr local since they'll be changing more than / if I understand what's going on. This will provide speed and recoverability and space-efficiency. And ext2 for / should be fast for booting the system and executing code that's relatively static. In other words, I don't think I'll need much journaling on that stuff.

I am reading all I can and I hope I understood correctly. Any advice and comments will be appreciated.

P.S. I just got done resizing my NTFS partition to 24GB as I mentioned. I may be imagining it, but Winbloze is now running like a scalded cat! It feels like a new machine. I wonder how screwed up the disk must have been! I have 60% or more of the so-callled Windows "services" disabled anyway, so this machine always ran better than average.

Thanks again,
Rand
 
Old 02-07-2006, 01:05 AM   #4
jayakrishnan
Member
 
Registered: Feb 2002
Location: India
Distribution: Slacky 12.1, XP
Posts: 992

Rep: Reputation: 30
This is what i have

15 GB distributed as

/ - 6 GB
/boot - 150 MB
Swap - twice the physical RAM
/home - rest
 
Old 02-07-2006, 01:41 AM   #5
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 47
Rather than duplicating my thoughts on this, you might want to read Linux Partitioning Myths which I've written two months ago.
 
Old 02-07-2006, 02:00 AM   #6
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
FWIW, for a 13G target, I'd suggest a partitioning scheme very much like the ones gilead already described. Create a modest swap space, then split the remaining space more or less evenly between your personal data (ie, /home) and your system data.

As a general comment, partitioning is highly subjective topic, and there really is no true right or wrong way to do it (unless of course you give so little space to the root parition that the installation itself fails) If you give a total of 6G to 7G of space to Linux, and leave the remainder for /home, you should be fine.

As for the file system, I'd recommend either reiserfs or ext3. The ext2 file system is OK, but it's relatively old at this point, plus it's not journaled and thus carries a higher risk of data loss should there be any unexpected power failures, etc. Besides, reiser is the default choice in Slack, and I don't see any particular reason to change it - heck, if it's good enough for Patrick it's good enough for me. Personally, I've been running Slackware and SuSE on my machines for the last few years, and reiser is the only filesystem I use. So far I haven't had any issues with it, and would not hesitate to recommend it to others. Good luck with it
 
Old 02-07-2006, 10:17 AM   #7
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Original Poster
Rep: Reputation: 55
Hi guys, thanks for all the comments. Based on Azmeen's comments (and others to the same effect, that is that swap on desktop machines is virtually never used) I suppose I should reduce the size of the swap partition. I have 512M of ram on the machine.

I am still confused about some things here:

a) Can I use a logical partition for swap since it's so small? It seems like a waste to allocate a physical partition for 256M, let's say.

b) Stupid question: If I do like gilead and jayakrishnan suggest and make partitions for swap home and / then I can reinstall endlessly without toasting the user's accounts and files if I have /home /usr local on the same partition, right? The ability to do this is important for me.

Now J.W. and jayakrishnan both seem to be saying to allocate 6-7G for / and the rest for /home. But Azmeen points out that maybe it would be better to allocate everything to /.

c) What besides the 2G of possible Slackware stuff goes into root? If I install other programs in the future, where do they go? Does it matter what kind of program they are (system/application, etc) or does everything go in the same place? If everything on the Slackware disk is 2G, that's a %^&! pile of extra stuff to be thinking about installing. Like 200% more.

d) I mentioned earlier that I was considering ext2 for / because those files are relatively non-volatile and I wasn't concerned about journaling. Is this any faster than reiserfs? (I don't have to worry about power failures, this is a laptop installation.) If I understand correctly that / doesn't change much, then which is the fastest file system that is appropriate?

If I can distill what everyone's said (not exactly a consensus!) then it would be something like:

/dev/hda1 NTFS 24G (Winbloze- die, infidel!)
/dev/hda2 / 6G
/dev/hda3 /home 7G (and /usr/local???)
/dev/hda5 256M at the end since unlikely to be used

Thanks guys,
Rand

P.S. Is it also worth creating a /boot partition?

Last edited by Randux; 02-07-2006 at 12:31 PM.
 
Old 02-07-2006, 12:48 PM   #8
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
A quick reply before I get on the bike and head to work...

(a) Yep, it doesn't matter whether it's a primary or logical partition for swap. It can even be a file but I'm not familiar with how to do that or whether there are performance issues;

(b) With /, /home and swap on separate partitions you can reinstall without losing your users files. Just tell the installer to leave /home alone. Whatever partitioning scheme you choose now will probably change later depending on how you actually use your setup;

(c) The most common locations for extra software I've seen are /opt and /usr/local (although Oracle uses /u01 /u02 and so on). This means they'll end up on your root partition with the scheme above. Trying to preserve these between installs on their own partition is possible, just be sure when installing that they put their config files on the same partition as the binaries (/usr/local/etc for example) or you'll lose them on a reinstall. Just be consistent with the scheme that you choose;

(d) I run a variety of file systems under a variety of conditions but I don't see a lot of difference between them (my systems aren't running under huge loads). I prefer journalling for reliability so I haven't used ext2 for a while however. Reinstall periodically and try a variety of them - the scheme you have listed will let you do that easily so what the heck
 
Old 02-07-2006, 12:57 PM   #9
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
I normally partition off /usr, /var, /home, and /
 
Old 02-07-2006, 01:06 PM   #10
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
I run over 100 distros. One common swap for all of them.

Every Linux in a single logical partition. Each of my Slackware 10. and 10.2 is in a 5Gb partition.

I think users runing a single Linux can benefit from a separate /home partition but it is equally easy to make your own devoted data partition in Fat32 usable by all systems.
 
Old 02-07-2006, 01:15 PM   #11
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
I always recommend setting up /home in its own partition. As you indicate, Yes, by doing that, you can re-install as many times as you want, and you won't lose your personal files (just make sure that you do not reformat the /home partition). Note that this approach also lets you install other distros as well - you can just as easily reinstall any other distro "around" your existing /home partition as you could reinstall Slack.

In terms of what Slack puts in the various directories I'd suggest checking out this page from the Slackbook If you haven't read the Slack book yet, it would be very worthwhile to do so.

Lastly, as I mentioned before the actual partitioning scheme and the choice of file system basically comes down to a matter of personal preference. I would make sure to go with a journaled file system though, such as ext3 or reiser. Good luck with it
 
Old 02-08-2006, 02:07 PM   #12
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Original Poster
Rep: Reputation: 55
Thanks again to everyone. You guys are great.

Yes, I did find a couple of slackbooks and especially that page you linked, I had already copied it to a text file. Since you guys have been around, you know what that stuff means. But to me it's still a little vaugue because I don't know what a linux system is actually comprised of and I usually like to understand things in great detail. When you change worlds, it takes a long time to get the comfort factor back.

I'm a little concerned because I don't have a lot of real estate on that drive and I probably can't get another one, and I don't want to paint myself into a corner.

Some things (at least) that I'm still unclear on:

a) is /usr/local storage for programs that only the user can access?

b) Can /home and /usr/local go on the same partition? Should they?

c) How much of that 6-7G that people are recommending is actually used on your systems? I guess I don't understand what the dividing line is on stuff that gets installed in user directories and system directories. I think of all the code as belonging to the system when I work on PCs...maybe that is because all the PCs I have worked on were single-user systems. How do you decide on what code goes in home as opposed to what goes in /usr? (Maybe I would be better off with 1G for /home and all the rest for root?)

 
Old 02-08-2006, 02:29 PM   #13
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
Quote:
Originally Posted by Randux
Thanks again to everyone. You guys are great.
Some things (at least) that I'm still unclear on:

a) is /usr/local storage for programs that only the user can access?

b) Can /home and /usr/local go on the same partition? Should they?

c) How much of that 6-7G that people are recommending is actually used on your systems? I guess I don't understand what the dividing line is on stuff that gets installed in user directories and system directories. I think of all the code as belonging to the system when I work on PCs...maybe that is because all the PCs I have worked on were single-user systems. How do you decide on what code goes in home as opposed to what goes in /usr? (Maybe I would be better off with 1G for /home and all the rest for root?)

1. Typically /bin and /usr/local/bin are for normal users
2. I'd recommend /home and /usr being on different partitions, but they can coexist just the same.
3. My current production file server at my office (50 users) is as such:
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             1.9G   86M  1.8G   5% /
/dev/sda1              46M  7.1M   37M  17% /boot
/dev/sda3             1.4G   91M  1.4G   7% /var
/dev/sda5             1.4G  764M  664M  54% /usr
/dev/sdb1              35G   13G   22G  37% /home

Last edited by mdarby; 02-08-2006 at 02:30 PM.
 
Old 02-09-2006, 06:09 AM   #14
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Original Poster
Rep: Reputation: 55
I guess there are some major differences since you're showing the example of a server system and my installation will be for a single-user development/test machine. And you obviously have a lot of experience and I have none

I can see here that you've used almost nothing of root, so you obviously have tuned your server pretty well to offer exactly what your users need, and not more. And /usr is also very skinny, reinforcing the previous notion. It's pretty clear that a lot of thought and a lot of experience went into this

Now that I have thought about it more I think I can state my goals for this setup clearly:

a) being able to reinstall distros readily without having to reconfigure user accounts (which will anyways be very few in number). In fact, I may wind up not doing this very much but I would like to be able to do it. And I'm willing to pay for it a little bit by trading off other conveniences if necessary.

b) being able to reinstall distributions without affecting additional software I've installed and customizations I've made to it

c) spreading the available 13G I have in the most effective way so that I don't create any unnecessary constraints.

What about :

/dev/hda1 NTFS 24G

/dev/hda2 SWAP 256M
/dev/hda3 /usr 7G
/dev/hda5 /home 1G
/dev/hda6 / 5G

I think this is roughly equivalent to what Gilead and J.W. have been saying (except that /home is a lot smaller) and saikee mentions that he runs each of his distros in 5G (of course he has a ton of them) so that should mean my planned root allocation is sufficient; but I split off /usr from root just so that I can avoid having to reinstall other stuff with new distros, and still having enough space in root for a healthy distro of the future along with other growth to root.

Why did some of you guys advocate such a large /home allocation? Is it because you are supporting development environments where you want the programmers to have their executables separate from system stuff?

In my setup, I'm not sure if it's relevant to make a distinction between system and user stuff - I'll be the only user.

Last edited by Randux; 02-09-2006 at 06:17 AM.
 
Old 02-09-2006, 10:12 AM   #15
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
Welcome to LQ, Randux!

In the first instance I would like to put forward the notion that "it doesn't matter!". My advice would be to partition it as / and /home and the mess around with it. Tinker a bit. Break it. Reinstall it. Try a different distro. Break that. Come back to Slack with the new knowledge you've gained and try again!

You currently have nothing to loose by ditching *everything* linux based on your laptop. In 6 months time when you've set it up *just so* and then try to do something and realise your partition setup isn't gonna work quite right ... you'll have a lot to loose.

Let me have a go at answering some of your questions more directly ...

Quote:
a) being able to reinstall distros readily without having to reconfigure user accounts (which will anyways be very few in number). In fact, I may wind up not doing this very much but I would like to be able to do it. And I'm willing to pay for it a little bit by trading off other conveniences if necessary.
Putting /home on a different partition and leaving that alone will mean you keep user-data. Think of /home as "Documents & Settings". Below it you'll find a list of users and in those directories (directory names are the usernames) will be the users data stuff and anything else they've put into it. By default (correct me if I'm wrong) the only place a user can store stuff is in their /home/<user> directory.

Many people advocate (me included) large home partitions because this is our data storage area. The OS goes in one place (I do this with doze PCs, too ... c: for programs, d: for data) and all the data goes in another ... when you reinstall the OS, the data doesn't get lost.

Unlike doze, however, all the user-config files are *also* kept in /home/<user> ... this is good and bad. Good because if you use the same/similar versions of programs over distros then you'll keep your setup. Bad because you may find different distros use different versions of programs that modify config files in different ways ... I'm sure Woodsman will tell you how much of a pain it is to constantly delete the .kde directory to fix a minor glitch!

The exception to this rule is root's home directory. It's at /root, not /home/root. Although because it's your system, feel free to move it if you like =D

Quote:
b) being able to reinstall distributions without affecting additional software I've installed and customizations I've made to it
This may be difficult ...much in the same way as it's not a good idea to have Program Files on a different partition, reinstall the OS, then expect all the things installed on the previous run to work. Granted, we don't have that curse of installation "The Registry", but the same sort of thing applies. Programs depend on libraries. If you install non-standard (that is to say: it's not on the CD) libraries and then install programs that are dependant on those libraries ... you can't necessarily expect the libraries to stay working (since they might depend on, and link against - hook themselves onto - system libraries at compile time) if you pull out those system libraries.

I know it must sound a bit odd, but think of it as building things on a table, and then trying to take the tablecloth out from under your construction. Some of it will stay standing, some of it will fall over. In theory you can work out what's going to work, but, in practice ... it's faster just to try it.

So how does \Program Files\ work in Linux, I hear you cry. Well, basically core programs (ls, cd, mv, rm, etc) go in /bin, distro-specific applications are built by Patrick into /usr/bin (kde ends up in /opt, and OpenOffice will probably prompt you to put it in /opt, too) and by default anything you configure from source will go into /usr/local/bin.

It doesn't mean that things in /usr/local are automatically self-sufficient ... it just means they're separated from things in /usr and /. A quick search found this link http://www.tuxfiles.org/linuxhelp/linuxdir.html which reads quite nicely and might help you decide how best to set things up.

I personally avoid putting anything in /usr/local that I am not absolutely sure is not self-sufficient, everything else gets compiled into /usr ... but this is talk for another day when you've got past partitioning

As I've already mentioned above, /home stores user config data. Anything that a user sets up for themselves will be stored in their /home/<user> directory. Likewise, any global settings are (usually) stored in /etc. You would be wise to take backups of the config files in /etc. Most specifically things like /etc/X11/xorg.conf (this runs your graphical environment), /etc/samba/smb.conf (this stores settings for running a Samba server on a doze network) and /etc/rc.d/rc.local (local startup commands that aren't covered by anything else go in here).

I'd like to say that because of the nature of /etc/, it is very unwise to make this a separate partition (although I can tell the desire to do so is high!) because each distro (typically) uses /etc slightly differently. And those differences will confuse the issue. In slack, for example, smb.conf is found in /etc/samba/ ... you probably won't find it there in RedHat.

Quote:
c) spreading the available 13G I have in the most effective way so that I don't create any unnecessary constraints.
At this stage of the game you have no constraints and nothing to loose by getting it wrong. I have a laptop with a 6GB harddrive partitioned as follows:

Code:
/      4gb
/home  2gb
Because i knew I wanted to install a lot of stuff, but it's not a storage server for my data - that comes from my other boxes ... just allow it to run a lot of things natively.

Finally, I have a few little scripts that might help you moving distro and resetting things when they break ... have a look on www.kaear.co.uk (specifically: http://www.kaear.co.uk/default.asp?pageID=33) for the System file backup.

Give me an email (kaear at kaear dot co dot uk) if you need any other scripts, I can't always guarentee the ones on the site are the latest i have (I'm just so lazy!).

Good luck with everything,
- Piete.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen Re-sizing xorg.conf. Hekdiesel Linux - Newbie 4 06-04-2006 01:40 PM
Concurrent Users Sizing gerrard8 Linux - General 1 01-13-2006 08:51 AM
Why Is KDE not sizing menus right? Krimson714 Slackware 3 10-17-2005 07:57 PM
sizing a form in vb.net mrobertson Programming 3 07-13-2005 07:04 AM
Partition sizing dummy Linux - Newbie 4 11-04-2002 08:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:29 PM.

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