|
FreeBSD Installation and Upgrading Installing and upgrading FreeBSD. |
|
Thread Tools | Display Modes |
|
|||
Is partitioning still important in installation?
This is somewhat of a general question though for me it relates most directly to my FreeBSD webserver at home.
Do people still partition their hard drives when setting up FreeBSD? When I used to manage several FreeBSD systems it was standard operating procedure to partition the drive upon installation; most of the space going to /usr, about 20% to /, and maybe 10% to /var. Do people still do this? I have noticed that Linux installs have gone to single partitions, but what about our BSD installs? Are partitions still important, or do people just give their entire hard drives to the OS in a single slice now? |
|
||||
My very simple machine:
Code:
Terry@vectra$ uname -a OpenBSD vectra.launchmodem.com 4.4 GENERIC#1021 i386 Terry@vectra$ df -h Filesystem Size Used Avail Capacity Mounted on /dev/wd0a 147M 43.5M 96.4M 31% / /dev/wd0h 393M 36.0M 337M 10% /home /dev/wd0d 98.3M 6.0K 93.4M 0% /tmp /dev/wd0g 6.7G 773M 5.6G 12% /usr /dev/wd0e 148M 39.4M 101M 28% /var /dev/wd1a 11.8G 109M 11.1G 1% /usr/local /dev/wd1d 44.3G 11.8G 30.3G 28% /srv Terry@vectra$ partitioning really yields a lot of possibilities, J65nko and others have made several good posts about what can be done.
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
|||
Quote:
The security advantages of partitioning I guess I had forgotten as well. Although my poor little web server really does so little serving (and has so little to serve) that I think I can survive with it setup as it is (currently just partitions for /, /usr, /var, and swap)? |
|
|||
Don't understand the purpose of partitioning to /usr, /home, /var etc... It makes a lot of trouble when you need to recover data from damaged disks or smth. It also makes trouble when you need to enlarge one of them. For example in my oppinion for mail server with 8 HDD it's better to use 2xHDD (hw RAID-1) and make just / and swap, and with other 6 HDD make hw RAID-5 and mount it somewhere to /data for example. It depends on what you will run on server (mail server, web, db etc...), but I never make more than "swap" and "/".
|
|
||||
You can tell who runs special-purpose servers, general-use servers, and desktops.
For desktops, there's not really any use to having more than / and swap, although I still use /, /usr, /usr/local, /home, /var, and swap. I like to keep the core OS (/) separate from the OS (/usr) separate from the ports (/usr/local) separate from user data (/home). For servers, you gain a lot of flexibility by partitioning things based on where disk usage is expected. Sure, you have to do some up-front planning, and may have to re-do things down the line, but the benefits greatly outweigh the risks. And now, with ZFS, things get even better, as you can have individual filesystems for just about everything, tailored to their specific uses. For example, you can make /usr/src separate, and enable compression since it's mostly text files. And make /usr/obj separate without compression. Same with /usr/ports and /usr/ports/packages. And then give each user their own filesystem, with different quotas and reservations. And so on. Very powerful, flexible, useful stuff. So, it all comes down to "how will your disk space be used". |
|
|||
I'll take a moment to throw my $0.02 in favor of partitions, no matter what the purpose of the machine is. I'll share with you this little story for an explination:
A while back I built a FreeBSD workstation. I did a single / partition (and a swap partition) on a 160GB drive, thinking I really shouldn't do it that way, but figured it would only be temporary. I should have stopped right there, as that was the first time I've done a single / partition... One long compile gone awry later (matter-of-fact, I was building openoffice.org-3), and the machine locked up somehow. Power-cycle, and upon boot-up the system complains that / was not unmounted properly, and advised me to run fsck manually. Long story short, fsck was never able to fully fix the corruption, and the system was never able to return to full operation. So, I booted with a fixit cd, tarred and copied my home directory, and both etc's (/etc and /usr/local/etc), and gathered a list of software I had installed (ls /var/db/pkg > softlist). Built the system with proper partitions, restored my home dir and the etc's, and started re-building all the ports I had installed. Since then I've managed to lock the system up a few times, and when I reboot I go to single user, and use "fsck -p" and everything is fixed and the system returns to normal. So, I'd say be very, very careful with using a single partition. I'm thinking most linux distros use a single partition by default now due to having journaling filesystems (where hopefully there won't be as many inconsistencies after a crash).
__________________
I just saved a bunch of money on my car insurance by fleeing the scene of the accident! |
|
|||
+1 partitions.
I think it's silly to dismiss the added benefits of separate partitions.. I understand a first time user creating a large / initially, but it shouldn't become a habit. |
|
|||
http://www.openbsd.org/faq/faq4.html#Partitioning mentions several things to consider in partioning your disk.
Another thing to keep in mind is the memory needed for a fsck. From the same OpenBSD faq: Quote:
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
A little bit offtopic. Is there any difference between such configuration:
1) In FDISK Partition editor create two slices with desc "freebsd" In disk label editor for the first slice create: / /home /usr /var etc... and for the second create swap. 2) In FDISK Partition editor create one slice with desc "freebsd" In disk label editor do everything as usual /, /home, /usr, /var, swap, etc... Is there really any necessity to go by first way? I've heard that some people are going this way and says it's more secure to keep swap in different slice. |
|
||||
I don't see much gain -- security or otherwise -- by having multiple MBR partitions for a BSD, as opposed to some other systems, such as Linux or Windows. That's because BSD manages disk partitioning through a single disklabel anyway. (As for performance, an I/O is an I/O: it points to a sector or a set of sectors on a drive by LBA number.)
Partitioning (either MBR or disklabel) is a logical way of separating contiguous chunks of sectors. The only benefit I can see to multiple MBR partitions for a BSD would be to help you to manage two discontiguous chunks of disk space that are used by the same BSD. However, you could still address discontigous chunks via the disklabel anyway, and ignore MBR tables. Not all BSDs allow multiple MBR partitions -- OpenBSD, for example, allows only one A6 (OBSD) MBR partition at a time. If you need to manage discontigous areas, you either reconfigure the drive so the data resides in a single MBR partition, or you manage them via disklabel(8). When I first began to build test OpenBSD systems on a single workstation, I didn't have much experience with OpenBSD, so I managed multiple systems with fdisk. Within a very short period of time, I switched to managing things with disklabel, where partitioning was considerably more flexible. I still use disklabel today, when I need to multiboot different OBSDs. MBR partitioning is still important: for the boot sequence, or for mounting foreign file systems. |
|
|||
OpenBSD allows partitions a-p ( 16 for the whole disk). FreeBSD disklabel allows 8 labels (a-h) for a slice (MBR partition).
For a fine grained partition scheme, needing more then the 8 labels of which 3 (a, b and c), already have been taken, your only resort is too use a second slice (MBR partition). For one of my favorite partition schemes on FreeBSD I have to use a second slice:
Of course with the new FBSD gpt partition scheme this limit will be things of the past
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
Carpetsmoker, that is what I thought too, but IIRC a 7.1BETA install didn't allow me to create more partitions than 8
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
||||
You're right, I looked at:
http://www.freebsd.org/cgi/cvsweb.cg...bel/bsdlabel.c Version 1.113 has 26 label limit, but 6.4 and 7.1 are versions 1.110.2.2.6.1 and 1.112.6.1, I mislooked earlier. Guess we'll have to wait until FreeBSD 8 ... |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
partitioning scheme for a firewall? | Timmy66 | OpenBSD Security | 1 | 19th September 2009 01:28 PM |
AMD64 - Hard Drive Partitioning | Turquoise88 | General software and network | 8 | 11th September 2009 05:58 AM |
Important Announcement from International Earth Advisory Board | robbak | Off-Topic | 3 | 11th September 2008 05:01 PM |
freebsd 7 64 bit installation | ijk | FreeBSD Installation and Upgrading | 9 | 1st September 2008 03:16 AM |
Remote Installation of *BSD | JMJ_coder | Other BSD and UNIX/UNIX-like | 3 | 21st August 2008 02:19 PM |