We divide the hard disk for FreeBSD 9.0 RC-1 (have any questions)

Hi all,

Tell me please, how best to partition my HDD?

When I install Linux Gentoo, I know what me need create speed /boot partition (for speed loading system), speed /var partition (for speed compile software) and speed /tmp - I create it partition and format to ext2 file system. For /home (when I have many movies and music) I use XFS - so too must also be a partition. Portage (ebuild) in Gentoo is a little file - I use ReiserFs for it.

But FreeBSD works with two file system UFSx and ZXF (if I understand). FreeBSD 8.x proposed me: /, swap, /var, /tmp, /usr partition. But FreeBSD 9 proposed to use GUID Partition Table : /boot-sector, / and swap.

Which one to choose?

In future I be use FreeBSD in WebServer, I think, me need /var (FreeBSD also compiles the program here?) /tmp - create how partitions (if something goes wrong - it will protect your other partition, etc.). and create /home partition - for security of personal data (ie, a power failure will be easier to restore a single partition than the whole disk).

1. How do you divide your hard disk? (Why?).
2. How you use the file system UFS or ZFS?
- I liked the theory ZFS, but why not make it de facto in FreeBSD.
3. Do I understand, now, UFS logging is magazine - so no longer need to use fsck?
 
There's no reason to not try ZFS, at least. There's a couple of nicely written guides in HOWTO section that could start you off in right direction.
 
doorways said:
But FreeBSD works with two file system UFSx and ZXF (if I understand).
FreeBSD 8.x proposed me: / , swap, /var, /tmp, /usr partition. But FreeBSD 9 proposed use GUID Partition Table : /boot-sector, / and swap.

While the default FreeBSD-9 install only creates a / filesystem, all the normal directories are on it. So /, /var, /tmp, and /usr are still there, they just aren't separate filesystems. The advantage is that free space is shared. There are some disadvantages, too. Partitions can be manually created for a traditional setup.

1. How do you divide your hard disk? (Why?).
There are lots of variations. Mostly I use a traditional separate-filesystem setup. On small disks (under 6G or so), a combined setup is nice to keep free space available.

2. How you use the file system UFS or ZFS?
- I liked the theory ZXF, but why not make it de facto in FreeBSD.

Just UFS so far. ZFS is a tradeoff. It has more features, but wants a lot of memory. It is far newer than UFS and is still maturing. UFS is faster for some things, and more appropriate for some hardware. ZFS isn't meant to be a replacement, it's an alternative.

3. Do I understand, now, UFS logging is magazine - so no longer need to use fsck?

UFS in FreeBSD 9 is journalled, so when startup fscks are needed, they are much faster.
 
Originally Posted by wblock@.
While the default FreeBSD-9 install only creates a / filesystem, all the normal directories are on it. So /, /var, /tmp, and /usr are still there, they just aren't separate filesystems.
Yes, I understand it. It is architect UNIX OS. (or Linux and BSD OS). But thanks for the details ...

Originally Posted by wblock@.
The advantages is that free space is shared. There are some disadvantages, too.
I see some disadvantages:
1. If not properly shutdown your PC:
(if you use only /) Will have long restores a large section.
(if you use /, /var, /tmp ... etc.) Maybe not have to rebuild everything. (saving of time).

2. If the system fails to run due to problems with the HDD.
(if you use /, /var, /tmp ... etc.) The problem in the /boot or / partition. You can enter from a LiveDVD FreeBSD, connect to /home and pick up your work. In another case, this would amount to problems.

My opinion: better create partition /boot, /, swap, /var, /tmp, /usr. Better to have a small but reliable section, rather than large and dangerous.

File system ZFS, If I understand correctly, not yet stable on FreeBSD and requires a lot of system resources. Since UFS received the magazine, the file system is beginning to attract my attention.

Originally Posted by wblock@.
Partitions can be manually created for a traditional setup.
Yes it is. Now finish the study of "fdisk".
I used to think that "fdisk" in Linux system has a better view (usability).
But when I realized that the principles of partitioning in Linux and FreeBSD different - not so over the devil as he is painted. �e


And so, I think to do so:
I have HDD ~ 320 Gb size and 3G Operational memory:
Code:
      Device:     |  Mount point:  |   Size:   |    FS:
------------------|----------------|-----------|-----------
/dev/ad0s1a          /boot               64K      UFS+J
/dev/ad0s1b          /                    2G      UFS+J
/dev/ad0s1c          swap                 4G      SWAP
/dev/ad0s1d          /var                 4G      UFS+J
/dev/ad0s1e          /tmp                 2G      UFS+J
/dev/ad0s1f          /usr                16G      UFS+J
/dev/ad0s1g          /home             OTHER      UFS+J
What do you think - is it good?

But I have a new questins:
1. In linux OS folder "home" has full path /home, in FreeBSD OS - /usr/home: Can I make /home a separate partition. Or, I should point out:
Code:
...
/dev/ad0s1g    /usr/home         OTHER    UFS+J

2. I'm going to install GUI on my system and tool LibreOffice - Do I have enough space to compile it - or set the size of /var in 8G?

3. Compiling the port is in /var?
 
doorways said:
Yes it is. Now finish the study of "fdisk".
I used to think that "fdisk" in Linux system has a better view (usability).
But when I realized that the principles of partitioning in Linux and FreeBSD different - not so over the devil as he is painted.

Use gpart(8) and a GPT partition scheme for new installs. Unless you want multi-booting, I suppose, but some GPT loaders can do that. With GPT, there's no need to use fdisk and bsdlabel, just create a partition for each filesystem.

I have HDD ~ 320 Gb size and 3G Operational memory:
Code:
      Device:     |  Mount point:  |   Size:   |    FS:
------------------|----------------|-----------|-----------
/dev/ad0s1a          /boot               64K      UFS+J
/dev/ad0s1b          /                    2G      UFS+J
/dev/ad0s1c          swap                 4G      SWAP
/dev/ad0s1d          /var                 4G      UFS+J
/dev/ad0s1e          /tmp                 2G      UFS+J
/dev/ad0s1f          /usr                16G      UFS+J
/dev/ad0s1g          /home             OTHER      UFS+J

With GPT, those would be ad0p1, ad0p2, and so on.

The boot partition is just for bootcode, no filesystem or mountpoint, and don't make it larger than 512K. There's an example of creating these with gpart(8) in Disk Setup On FreeBSD. Also note how the first filesystem partition starts at 1M for alignment.

But I have a new questins:
1. In linux OS folder "home" has full puth /home, in FreeBSD OS - /usr/home: Can I make /home a separate partition. Or, I should point out:
Code:
...
/dev/ad0s1g    /usr/home         OTHER    UFS+J

In FreeBSD, /home is a link to /usr/home. Some people use a separate /home. I've never bothered. If they are combined, the space is one big pool, no problems with having not enough space in one or the other.

2. I'm going to install GUI on my system and tool LibreOffice - Do I have enough space to compile it - or set the size of /var in 8G?

3. Compiling the port is in /var?

4G is usually more than enough for /var unless (nonstandard) additional large databases are stored there.

Ports are compiled in a temporary work directory inside the port subdirectory. For example, Firefox builds in /usr/ports/www/firefox/work.
 
O! Thanks!
"gpart" is very interesting software!
And I understand now, what if I do not use "clean" command in time Install software
[CMD="make && make install clean"]...[/CMD] - me need has big slice for /usr/ports! Thanks for it too.
 
Code:
/dev/ad0s1b          /                    2G      UFS+J
[color=red]/dev/ad0s1c[/color]          swap                 4G      SWAP
/dev/ad0s1d          /var                 4G      UFS+J
As far as I know, you cannot use label "c" as this is reserved to describe the complete FreeBSD slice.
 
Originally Posted by J65nko.
As far as I know, you cannot use label "c" as this is reserved to describe the complete FreeBSD slice.
Thank you for the correct observation!
Yes, you are right! I read this article and realized my mistake!


Questions about the breakdown of HDD smoothly moved into this post.

The final breakdown of the implementation described here (use gpart).
Use fdisk and bsdlabel applied here.
 
Well, I think that when physical disks where much smaller than the space needed, there was not just a point but a necessity in mounting several disks in a file system hierarchy. Nowadays the problem is opposite: you have plenty of space in a disk and there is no need in splitting the space in more than the strictly needed for your system, hence the abandoning of the old multiple partitioning scheme, and that is something patent in its change to just / in 9.0.

Just smart thinking ,though.
 
Back
Top