# FreeBSD 9.0 installer - using ZFS on a partitioned disk



## ikevinjp (Feb 4, 2012)

Previously, with FreeBSD 8.2, I would perform an installation by leaving a large portion of the disk unused. For example:

With a 500 GB drive:

```
Disk: ad4    Partition name: ad4s1    Free: 0 blocks (0 MB)
Disk: ad4    Partition name: ad4s2     Free: 829973088 blocks (395GB)
```


ad4s1a / 
ad4s1b swap
ad4s1c /var
ad4s1d /tmp
ad4s1e /usr

Notice that the partition by name of ad4s2 is unused and has an sized of 395 GB.

Then, after installation, I would execute the following command to use it as ZFS:

`# zpool create zfs /dev/ad4s2`

However, with FreeBSD 9.0, the installer is different and the ad4s2 no longer exists under /dev. Could anyone help me with how to find the missing partition, and possibly use it as ZFS? What commands should I use to search for the missing device, disk or partition?


----------



## wblock@ (Feb 4, 2012)

The equivalent with FreeBSD 9 and the default GPT partitions would be /dev/ada0p4.  But the partition number depends on how many partitions were created.


----------



## gkontos (Feb 4, 2012)

Please read the Release Notes:

Link: http://www.freebsd.org/releases/9.0R/relnotes-detailed.html#AEN1308


----------



## ikevinjp (Feb 5, 2012)

wblock@ said:
			
		

> The equivalent with FreeBSD 9 and the default GPT partitions would be /dev/ada0p4.  But the partition number depends on how many partitions were created.



Looks like it is not the case for my situation. 
ada0p2 is used for /
ada0p4 is used for /var
ada0p5 is used for /tmp
ada0p6 is used for /usr

Though not displayed, I think ada0p2 is use for boot while ada0p3 is the swap partition.

There is no ada0p7 listed.

So where is my missing partition? 

Would anyone point out for a simpler way to get the missing partition?

Thanks!


----------



## ikevinjp (Feb 5, 2012)

gkontos said:
			
		

> Please read the Release Notes:
> 
> Link: http://www.freebsd.org/releases/9.0R/relnotes-detailed.html#AEN1308



I read the release notes but still cannot figure it out. I suspect that the missing partition is not even loaded or linked. What disk tool I can use to edit or add the missing partition? (a safe way as I don't not want to destroy my drive schema ending up I have reformat and reinstall the OS.)

Thanks!


----------



## wblock@ (Feb 5, 2012)

ikevinjp said:
			
		

> Looks like it is not the case for my situation.
> ada0p2 is used for /
> ada0p4 is used for /var
> ada0p5 is used for /tmp
> ...



Yes, p1 is normally a freebsd-boot partition.  The default auto install of FreeBSD 9 only creates a single freebsd-ufs partition as p2, followed by the swap partition.  What you show here is a custom setup.

gpart(8) is used to show or edit the partition table:
`% gpart show ada0`

If there is unused space at the end of the drive, add a partition to use it, for ZFS in this case:
`# gpart add -t freebsd-zfs -l myzfspart ada0`


----------

