Jump to content

Best partitioning scheme [solved]


Phantom
 Share

Recommended Posts

I looked into partitioning to see what was better and what wasn't. I can't find the exact article I googled now, but the main idea was that ReiserFS and XFS are faster than ext3.

 

Whether ReiserFS is faster than XFS or vice-versa, I've no idea. I tend to use XFS, as the article I read mentioned that XFS had more features than ReiserFS, albeit that it might be a little slower (although another article I googled said XFS might be faster than Reiser).

 

At the end of the day, most of this is preference, and what you're wanting to achieve from the system.

 

Most of my systems are XFS, apart from one which is Reiser, as I wanted to get a comparison for speed.

Link to comment
Share on other sites

One caveat about swap space: If you have a laptop with Hibernate enabled, DO make a good-sized partition that's bigger than your RAM, because the RAM contents are suspended to swap-space. I originally had 512MB swap (=my RAM) and caused a horrible crash. Upped it to 800MB (over-cautious? perhaps...) and it worked fine.

 

Given how much space you have on the external drive, I wonder if it's worth making partitions at all. You will already have a copy of your /home in your backup, so if/when you need to reinstall the OS, just copy /home back into place after install. That way you retain maximum flexibility of space.

Link to comment
Share on other sites

Ok, thanks for the info guys, I'm done with the partitioning sheme.

 

/ has 58GB

SWAP has 1.5GB

 

on the external disk

 

/backup has 50GB (will keep sys backup + home backup)

/data has 200GB (will keep video, audio, docs, rpm's, etc...)

 

From all I've read here partitioning isn't needed at all, at most for a server where you would keep www, mail and user docs seperated.

 

Now I'm converting my wife's laptop, she just had a serious virus + worm so that gave me a reason to preach all the good things of Linux, installing right now :D

Link to comment
Share on other sites

I beg to differ with some others here. I think there are very good reasons to have at least /, /var, /usr and /home, and a good case made for splitting /local (similar thinking to splitting /home) or even /etc and others.

Here's how my drives are partitioned. The main system HD (hda) is the same 20G HD I was using when I first started using Linux (RH6 and MDK8.0). I'm still using it and I've never needed to re-partition it:

 

$ df -H

Filesystem Size Used Avail Use% Mounted on

/dev/hda5 818M 133M 644M 18% /

/dev/hdb1 99G 66G 29G 70% /data1

/dev/hdd1 61G 22G 36G 38% /data2

/dev/hda9 11G 7.7G 2.1G 80% /home

/dev/hda1 2.0G 811M 1.2G 41% /mnt/windows

/dev/hda7 4.2G 3.0G 1.1G 75% /usr

/dev/hda8 2.1G 1.3G 719M 64% /var

 

The hdb and hdd drives are just storage. You can see the hda drive is split into:

/mnt/windows

/usr

/var

/home

/mnt/windows is a now-unused old windows installation, now just a shared FAT32 space when connect to other Win boxes. Notice / has little in it. It's critical that / never gets full, or the system won't boot at all. That's why, IMHO, while it's handy to split /home, actually /var is the most critical to separate from /, as it can quickly become full (or fill up / if not separated) with fast-growing logs from something like an out-of control service, even if /var (or /) is fairly large. If that happens, the system is totally broken and the only hope is to boot from a CDROM distro and try to clear some space under /. Similar with /usr - if not a separate partition, it can fill / if you get a little carried away with installing space-hogging apps.

 

I would never load Linux on anything without a /var partition, and in my opinion at the minimum /, /var, and /home partitions should be the default setup for any distro. Separating /var has saved me a couple of times.

 

Anyway, why NOT split things up a bit? Causes no problems or performance penalty.

 

As for fragmentation, in Windoze NTFS does fragment, not nearly as badly as FAT32, but should still be cleaned up occasionally. In Linux, regardless of the file system, fragmentation can and does happen, but even if a disk is used heavily for years it's not a problem. The exception to this is when a partition becomes nearly full. Then fragmentation can happen and enough to become a problem. The closer to full the faster it increases. To be safe, I never let a partition get much over 90% full.

Link to comment
Share on other sites

You are free to beg to differ all you want.

If you need a separate /var because of so many logs then I seriously think you need to take note of what your login name implies and do some serious study and prevention of the causes.

My /var only has 150Mbs of data in it at the moment and since there is 2Gbs of spare space in the physical / partition then it is going to require a hell of a lot of logs etc to fill it up. If it did then then I would know I had a problem of mamoth proportions unbefitting a good and stable OS.

 

What with the tens of thousands of programmers over many long years I am sure that if your claim that /var should be a default real physical partition were valid, then that too would have happened years ago.

It didn´t and as far as I can see it won´t.

Of all the readings I have done here and elsewhere, and all the technical articles I have read, yours is among the few to claim linux fragments ¨but it doesn´t effect preformance¨ (...... er....until ....er... ¨when a partition becomes nearly full¨) .

Could you please guote me some technical sources that say this is so, so I can read it up further. Or is it really just personal opinions you are restating.

Your last paragraph reads like a soft rewrite of statements made by Windows users about Linux who haven´t a clue about how Linux works.

 

Like I have said in earlier times. If Linux had needed or needs defragmentation then programmes would been developed to take care of it. I wonder why there hasn´t been ???. Could it be because Linux programmers are incapable of developing such a programme or perhaps that no one is interested ??? Or could it just simply happen to be that there is NO fragmentation to fix in Linux.

 

Adams statement about /home is best recommended practice and has come from accumilated practical experience inummerable users over years.

 

John.

Link to comment
Share on other sites

Phantom, why do you have 1.5GB of swap? As you can see from the many posts here and elsewhere about partitioning you will never need that much swap space. Also, if you ever upgrade you will rue the day you did not have a separate /home partition. Also, as many people here have noted there is a very good case to be made for having a separate partition for your stored data files separate from /home. Disputes will go on and on about separate partitions for /var, /tmp, etc , but for most users the issues are moot.

Link to comment
Share on other sites

AussieJohn: Nice generalisation with the 5gb /, I had a 5gb / but it was getting too full so i had to split /usr off onto another partition. I'd personally say about 6,7 or 8 gb for / it gives plenty of room to play and install whatever software you want without space worries. In this day and age, space isnt so much of a limitation, so it's better to use more than less.

 

Window's NTFS can get nicely and badly fragmented too, my friend has to defrag *weekly*

 

No filesystem is immune to fragmentation, however via design, the filesystems used by linux are less affected by it.

 

I can see the point of a seperate /var on a server, where you would be constantly logging connections etc, but not on a desktop machine.

 

iphitus

Link to comment
Share on other sites

I'll play too!

 

This is the partition scheme I have used since I started using linux:

 

Filesystem             Size   Used  Avail Use% Mounted on
/dev/sda1              1.6G   251M   1.4G  16%       /
/dev/sda11              11G    86M    11G   1%        /emulated
/dev/sda8              5.3G   223M   5.1G   5%       /home
/dev/sda9               16G   226M    16G   2%      /opt
/dev/sda12              28G    22G   4.3G  84%      /stuff
/dev/sda10             1.1G   676k   1.1G   1%       /tmp
/dev/sda6              8.4G   3.3G   5.2G  39%      /usr
/dev/sda7              8.4G   324M   8.1G   4%       /var

 

'/' is as large as it is because I like to play with different kernels from time to time and want to ensure I have more than enough space for it.

 

'/emulated' holds my virtual machines for vmware.

 

'/home' is ONLY used for user configuration folders and files. As I'm the only user on my linux boxes it works great.

 

'/opt' gets programs that cant be installed via mandrake rpm, or different versions programs; for instance, I have firefox 1.0.4 housed there because the mandrake rpm keeps it listed as 1.0.2. It also has my fake c drive for cedega as well as all of my games.

 

'/stuff' is where I keep all my mp3, documents, movies, etc. All of my samba mount points are here as well (to clarify: the ones that I share are in /stuff, shares of other pc's I mount mount to /mnt).

 

I use reiserfs on all these partitions except for /stuff which uses xfs.

 

I do this because at least for me, I feel it gives me better control over where things are installed and managed. This way if I break the install of some program, it was installed to a place that I can remove it without being root. This way I can play with programs and such without the fear of destroying a root controlled area. (which I have been known to do.)

Link to comment
Share on other sites

Aussie John:

 

If you need a separate /var because of so many logs then...you need to...do some serious study and prevention of the causes.

My /var...has...2Gbs of spare space in the physical / partition then it is going to require a hell of a lot of logs etc to fill it up.

With all respect, I never said I *needed* a large separate /var because of so many logs - I said, basically, that I thought a separate /var was a good idea. Size is up to the user. My /var is fairly large mainly because I have 2 full Win4Lin installations - but never mind that...

Fortunately, I haven't personally had a non-separate /var directory fill up my / partition, but I *have* seen it happen.

 

If it did then then I would know I had a problem of mamoth proportions unbefitting a good and stable OS.

Or possibly a very small problem causing mammoth file generation. Either way, once / is full you would have a non-bootable system giving kernel-panic errors.

Keep in mind I'm not talking about what's absolutely necessary on a healthy system, but rather about good prevention practices and simplifying recovery should problems arise. Do a little Googling about Linux or Unix file system partitioning and you'll find some users making a very good case for even more partitions than I recommended.

 

Of all the readings I have done here and elsewhere, and all the technical articles I have read, yours is among the few to claim linux fragments ¨but it doesn´t effect preformance¨ (...... er....until ....er... ¨when a partition becomes nearly full¨).

Or could it just simply happen to be that there is NO fragmentation to fix in Linux.

Could you please guote me some technical sources that say this is so, so I can read it up further.

I would if I could remember where I read it, but I fried far too many brain cells in my younger days to remember where. Several places. Again, Google should help you out and you're as capable of using it as I am.

ALL file systems fragment, some just fragment less and/or in less destructive ways. As they reach nearly full, fragmentation occurs at a faster rate. I'm certainly not a file system expert, and that goes way off-topic for this thread anyway (we're far enough off now) but some basic study of file systems will make it clear why this is (must be) so, and why FAT32 is worse in this regard than NTFS, which is worse than ext3, etc. etc..

But if you doubt it, you don't have to take my word for it - go ahead and fill a test partition up and see what happens...

 

If Linux had needed or needs defragmentation then programmes would been developed to take care of it. I wonder why there hasn´t been ???

Oh, there has. One very old one for ext2 is defrag-0.70 and I'm sure there must be others. Nobody bothers with Linux/Unix defrag utilities 'cause there just ain't a real need under normal use. If the rare occurance happens that a defrag is needed, my understanding is most sys admins just copy files to a new partition rather than run a defrag utility. That's what I'd do.

 

Your last paragraph reads like a soft rewrite of statements made by Windows users about Linux who haven´t a clue about how Linux works.

Awww....'cmon, gimme a break A.J....

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...