# Specify new fs block size during installation



## ph0enix (Feb 3, 2016)

8K is the optimal sector size for the hyper-converge platform our VMWare cluster uses. I want to set-up a new FreeBSD 10.2 VM on it.  What's the best way to configure sector size while installing the OS?

Thanks!


----------



## wblock@ (Feb 4, 2016)

I'm not convinced that's a good idea and would want to benchmark it with the defaults, too.  Setting the filesystem block size depends on the filesystem being used.  Is this for UFS or ZFS?


----------



## ph0enix (Feb 4, 2016)

Good question.  I was planning to set it up on UFS but now I'm thinking that ZFS is the way to go.


----------



## ph0enix (Feb 5, 2016)

In any case, I would like to know how to specify sector size when installing FreeBSD.  What's the magic to do that?

Thanks!


----------



## wblock@ (Feb 5, 2016)

It will require using the command line to run newfs(8) for UFS or specifying the ashift value for ZFS.


----------



## ph0enix (Feb 19, 2016)

I decided to go with ZFS afterall. Is there a way to change the block size after the system is up and running.  If needed, I could add a second/mirror drive to the ZFS pool, then take one off the drives offline and do what needs to be done to it.

Thanks!


----------



## wblock@ (Feb 19, 2016)

With ZFS, I think you'll have to create a new pool with the desired size, then copy the data to it.


----------



## ph0enix (Feb 19, 2016)

It looks like my current zpool is on /dev/da0p3:

```
# zpool status
  pool: zroot
state: ONLINE
  scan: none requested
config:

  NAME  STATE  READ WRITE CKSUM
  zroot  ONLINE  0  0  0
  da0p3  ONLINE  0  0  0
```


Swap is on /dev/da0p2.  I'm not sure what /dev/da0p1 is used for.
I any case, I added /dev/da1 (same size as da0) to the system.  What's the best way to set-up partitions, new zpool and copy data from /dev/da to /da1?

Thanks!

J.


----------



## wblock@ (Feb 19, 2016)

I should have been more specific.  You will have to create a pool with the desired _block_ size (ashift), then copy the data to it.  Partitioning and copying is a different matter, and probably should be a new thread.


----------

