# Freebsd11.1 New Install no SRC and SSD partitoning



## lawg (Nov 14, 2017)

Did not check the src - system source tree box during installation. Now unable to do freebsd-update fetch. 

How to install the src or should I just do a re-installation?

Using Guided on ZFS on a 120 GB SSD harddisk. As I understand it SSD requires some unformatted space/partition, about 10%, for writing due to its architecture or so I've read about SSD.

How to leave a partition? During installation there was no option on partitioning.

Note:
Why don't the installer just auto install the src to avoid update problems.


----------



## gkontos (Nov 14, 2017)

The installer gives you the option to choose what you want to install. 
What is the exact output of : `freebsd-update fetch` ?


----------



## lawg (Nov 14, 2017)

`src component not installed. skipped
freebsd-updater: Directory does not exist or is not writable: /var/db/freebsd-update.`


----------



## SirDice (Nov 14, 2017)

It's not failing because of the missing source, that's simply skipped. It's failing because you don't have a /var/db/freebsd-update directory or you're not allowed to write there. Are you running freebsd-update(8) as root?


----------



## lawg (Nov 14, 2017)

ahh.....no. Shouldn't it prompt to run as root, e.g. permission denied.
Re-logged in as root and now it is updating...


----------



## Phishfry (Nov 14, 2017)

So just for completeness `freebsd-update` does not require source to be installed right?
I couldn't find anything definitively saying that but I swore I used it without source.
It is a binary update so no compiling required but I wasn't sure about the source code requirement.
I did learn that freebsd-update will update your source code (if installed) with the security patches.


----------



## SirDice (Nov 14, 2017)

Phishfry said:


> So just for completeness  freebsd-update does not require source to be installed right?


No, it's not required. It will update it if it's there and skip it when it's missing.


----------



## gpw928 (Nov 17, 2017)

lawg said:


> Using Guided on ZFS on a 120 GB SSD harddisk. As I understand it SSD requires some unformatted space/partition, about 10%, for writing due to its architecture or so I've read about SSD.
> 
> How to leave a partition? During installation there was no option on partitioning.



Hi,

You would probably have to use manual partitioning to reserve disk space in a spare partition during initial installation.

However disk space reservation was generally used on SSDs prior to TRIM being available.   Even then, it was only really required on SSDs that had inadequate over-provisioning, or that were used in extremely heavy duty cycle (with corresponding high wear rates).

FreeBSD ZFS has TRIM enabled by default.

It's important to understand that the TRIM protocol is just "early notice" to the SSD controller that a disk block is not being used (i.e. in the free list).  Any block in the free list will eventually get TRIM'd by the SSD controller if it ever leaves the free list -- when the controller sees a write to the block, it will be TRIM'd at that point, prior to doing the write.  [It actually puts the dirty block on the to-do TRIM list, gets a new clean block, fiddles the virtual block addresses, and writes to the clean block.]

A TRIM'd free list effectively augments the manufacturer's over-provisioning pool with the contents of the free list.

Conversely, in the worst case, without TRIM, the entire free list will not participate in the over-provisioning.  That's not a problem if there is sufficient over-provisioning.

I have a Samsung 840 PRO (a "consumer grade" SSD) rated at 256 GB, and an Intel DC S3500 (a "data centre" grade SSD) rated at 240 GB.  I reckon the missing 16 GB on the S3500 probably goes to over-provisioning. 

So to return to your question, 16/256 = 6.25% might be a good starting point on a consumer grade SSD.

But wisdom has it that ZFS does funny things once it gets more than 80% full, so I would not bother reserving space on the disk.  Just keep ZFS usage under 80%, leaving 20% in the TRIM'd free list.

Warren Block has a good write-upon FreeBSD SSD use here.

Cheers,


----------



## rigoletto@ (Nov 18, 2017)

Phishfry said:


> So just for completeness `freebsd-update` does not require source to be installed right?
> I couldn't find anything definitively saying that but I swore I used it without source.
> It is a binary update so no compiling required but I wasn't sure about the source code requirement.
> I did learn that freebsd-update will update your source code (if installed) with the security patches.



Just for the record you can select what you want it to update:

/etc/freebsd-update.conf

```
Components src world kernel
```

I indeed was using `freebsd-update` to update src exclusively when I started using FreeBSD, instead of svn, what end up being a bit of nonsense. 

Cheers!


----------

