# partitioning and slice



## polhen (Aug 15, 2013)

I would like to install FreeBSD for my principal O.S (workstation), not server. Here is my hardware with which I will install


 RAM 8092 MB 1866 Gskill.(4x2 GB)
 CPU Intel 2500k@4,2 GHz
 motherboard  P8z68 GEN 3  670 zotac AMP
 HD 512 GB Caviar Black'' entire disk for FreeBSD

I would like for partitions and slices:
name size type label

```
Partition 00
boot          [4 MB]       freebsd-boot   
swap        8192 MB]       freebsd-swap  exswap

Partition 01
/          [4096 MB]       freebsd-zfs  exroot

Partition 02
/var       [8192 MB]       freebsd-zfs  exrootfs
/tmp       [8192 MB]       freebsd-zfs  extmpfs
/usr     [102400 MB]       freebsd-zfs exusrfs
/home    [102400 MB]       freebsd-zfs exhomefs

Partition 03
/share   [204800 MB]       freebsd-zfs exsharefs
/viru-os [102400 MB]       freebsd-zfs exvosfs
```
Is it silly to do so? Another suggestion? Your opinion on the subject?

Thanks.


----------



## SirDice (Aug 15, 2013)

Don't use a separate boot partition. Either go full ZFS or stick with UFS for the system and only use ZFS for data.


----------



## polhen (Aug 15, 2013)

thanks to opening my eyes !

ok i understand and i change my philosophy, all slices onto same partition and all are on zfs filesystem!

If i want change rule for example (read only for root and boot) is-it possible ? without effect for another slices ?

And after post install is it possible to change/modify file system ? for example switching zfs to ntfs or extfat for "/share" slice ? because i must share maquettes with (Revit and autoCAD) ?
There are problem to switch to ? or another way to do so ?

Last question if you please ! before i walking stair, if a part of harddrive  crash, is it ridiculous to separate my ''share partion'' on other partion (not slice)?

Thanks for opening my eyes. I understand, and I changed my philosophy. All slices on the same partition, and all are on ZFS. If I want to change permissions, for example read-only for root and /boot, would that be possible? Without affecting other slices?

Is it possible post install to change or modify the file system? For example switching from ZFS to NTFS or EXTFAT for the /share slice? I ask because I have to share maquettes/models with Revit and AutoCAD. Are there problems with switching, or is there another way to do it?

Last question: if part of my HDD crashes, is it possible to separate my 'share partition' to another partition (not slice)?


----------



## SirDice (Aug 15, 2013)

polhen said:
			
		

> All slices on the same partition, and all are on ZFS. If I want to change permissions, for example read-only for root and /boot, would that be possible? Without affecting other slices?


Yes, that's possible. You may also want to read security(7), especially the part about security levels.



> Is it possible post install to change or modify the file system? For example switching from ZFS to NTFS or EXTFAT for the /share slice?


No, you cannot convert one filesystem to another. You will have to back up the data, repartition and restore. 



> I ask because I have to share maquettes/models with Revit and AutoCAD. Are there problems with switching, or is there another way to do it?


If you share files with Samba or NFS the underlying filesystem type will be irrelevant from the client's view. 



> Last question: if part of my HDD crashes, is it possible to separate my 'share partition' to another partition (not slice)?


It depends on the crash, if you get read errors on one partition the others might be OK. But if the drive crashes entirely you lose everything. You can use mirroring or RAID to minimize the impact but they're not a replacement for good backups.


----------



## wblock@ (Aug 15, 2013)

freebsd-boot should not be larger than 512K.

As far as GPT labels, I quote from the Handbook:


> Use a unique label on every filesystem to avoid conflicts from identical labels. A few letters from the computer's name, use, or location can be added to the label. "labroot" or "rootfs-lab" for the UFS root partition on the lab's computer, for example.
> ...
> Labels shown here are prefixed with ex for "example", but readers should use other unique label values as described above.


----------



## J65nko (Aug 15, 2013)

On this forum, there are two popular FreeBSD ZFS setups:


FreeBSD ZFS Madness
Root On ZFS @ FreeBSD 9

Both installation methods use only two to three GPT partitions, a small freebsd-boot and a large freebsd-zfs and optionally a freebsd-swap partition.

From my current ZFS madness setup:

```
[cmd=#]gpart show /dev/ada1[/cmd]
=>        34  3907029101  ada1  GPT  (1.8T)
          34           6        - free -  (3.0k)
          40         256     1  freebsd-boot  (128k)
         296  3907028832     2  freebsd-zfs  (1.8T)
  3907029128           7        - free -  (3.5k)
```

If you prefer multiple file systems you could follow the Root On ZFS @ FreeBSD 9 guide, without having to use multiple labelled GPT partitions.


----------



## jem (Aug 15, 2013)

The original post seems to show an overly convoluted partition layout, with some possible confusion about partitioning concepts.  It looks almost like the OP wants to use multiple MBR slices each containing multiple BSD partitions, yet still use the ZFS in them.

The simplest single disk layout would be as follows (using GPT partitioning):


```
Part no.    Type              Size
1           freebsd-boot      512KB
2           freebsd-swap      1-2x RAM size
3           freebsd-zfs       remainder of disk
```


You then create a ZFS pool from the freebsd-zfs partition and set up all the datasets you want in that pool.  All datasets share the entire capacity of the pool.  There are no fixed sized filesystems.


----------



## polhen (Aug 17, 2013)

Here is the new scheme with some comment: 


```
GPT - PART
- Partition 00
boot   512ko 
root   4096mo  freebsd-ufs  / 
swap 8192mo

Partition 01 
/var 8192mo freebsd-ufs
/tmp 8192mo freebsd-ufs
/swap 12288 mo  freebsd-swap

partition 02
/usr 153 600 000mo  freebsd-ufs
/home 204 800 000mo  freebsd-ufs

Partition03 (a rest)
/share 61.440 000 000 freebsd-ufs
```

[size=-1]
And after may be zfs ! with help ... ;-)
step by step, and with neccessary I to realign with exact  partition ?

Or only one GPT ? zfs steack do more ? (for workstation) ! i must do have ntfs or exfat/ fat to share! 
please confirm ? or suggest all in zfs or all ufs ?  dud is break ?[/size]

And after that there may be ZFS, if someone can help me step by step. With which exact partition do I have to align? Or do I need only one GPT? Does the ZFS stack do more (for a workstation)? I must be able to share NTFS or exFAT/FAT! 

Please confirm this, or suggest that I put everything in ZFS or everything in UFS.

Dud is break? [size=-1][Not translated because I really don't know what it means. -- Mod.][/size]


----------



## devildetail (Aug 21, 2013)

Hi @polhen,

Do you want to use the whole disk to install FreeBSD? With a disk of 512 GB capacity, I usually advise to partition it with homogeneous values of, say, 32 GB or 64 GB.

I suggest you reading this http://devil-detail.blogspot.com.es/2013/07/install-grub2-on-gpt-disk-dedicated-partition.html. In this post I describe my approach to setting up a system to host multiple operating systems, including FreeBSD.

I advise you install a ZFS-only system with support for beadm.


----------

