Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I upgraded (add) my RH8 box with new 160GB hard drive.
My question is how should I partition big drive? Should I make more small partitions or should I create just one big partition? What type of partition do you recomend?
I'm concerned about lost of space (slack) on big partitions?
Another question is, could I mount two different partitions on same dir? Lets say i have two partitions on two drives, and I want to mount both in /home directory.
I'd go with fewer partitions because its harder to plan for sizes. Here's what I have been doing (until my drive crapped and had to use a tiny one - $$$).
My drive was 40G. I use Mandrake the most and I play with the rest. I did have Widows XP installed in it for a while, but I wiped it and put it on my wife's machine instead. What I did:
8G for "/" - EXT3
500mb for swap
10G for "/home" - reiserfs
I split the remaining 21G in 1/2 and formatted one (at first, anyways)
Now, I am not a big gamer and any large media files I may have on the drive go to cd if I wish to keep them (because its not 160G after all), so YMMV. The reason I did that with the two extra partitions is so I could play.
At forst, I put the formatted(reiserfs) partition in /etc/fstab as /home/corey/extra (after creating the directory in my /home). That way, I could just surf to the directory at will. I didn't use it much for that, as I had enough space otherwise. So, I put other distros on these partitions to play with. They got "/" and I shared the swap for all of them. This worked well, but I could have used more playing space
For you, I'd suggest that you do somethng like that - 5-15G for "/", a swap partition, and "/home" for what you're working with. Be generous with your /home(10-40G) but leave most of the rest of the drive as a big partition to play with. Format it so you can use it and mount it as an extra. That way if you have plans for it pater, you'll be able to do something without changing the ones you already use.
This has worked for me. The bottom line: Fewer is better for keeping track. More subdivided is better for security (running a webserver might prompt you to have /var seperate, so a DDoS will fill only that partition with log files and you can still boot and fix that, for example)
Big partitions are more efficient uses of space, but more likely to corrupt and take longer to recover if they do get corrupted. Small partitions are more secure, but you risk running out of space (e.g. I recently had to reinstall from scratch because I make the / partition too small).
As a minimum, have / and /home so your data is separate from the OS. Nothing wrong with leaving part of your disk empty until you need it either.
For your second question, you can't mount two partitions on the same mount point (well, technically you can, but you'll only be able to access one of them). The solution is to mount the second on a subdirectory. For example, you might have a /home partition and a /home/brumela partition, or multiple partitions under /home for different users or different purposes.
You could even have multiple partitions within your home dir, so /home/brumela/mp3, /home/brumela/britney_pics etc. as separate partitions.
What is the best filesystem type you could create your partitions with?
I'm thinking of creating 4 partitions:
/, /opt, /usr and /home.
Is it a good idea to create all of them in reiserfs? Is ext3 or any other fs better in some cases?
ext3 is ext2 with a journal. Its faster, as a rule, and better at recovery if the power is pulled accidentally. Reiserfs is a pure journalled system. They say ext3 is better for large files and reiser is better for smaller files (as far as speed is concerned). I prefer Reiserfs. I have used it since Debian Woody came out, 2 years ago. I like the fact that it keeps its journal well and never really stops to fsck. There's als JFS(IBMs) and XFS(agressive - not good for power outage prone areas), but they are more experimental.
Its the tried and true method. The oldest and the most "tested". Without the journal, it will do a check every 20 or so bootups, though and you'll have to wait until it makes sure you're ok.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.