53 lines
1.1 KiB
Markdown
53 lines
1.1 KiB
Markdown
# Storage
|
|
|
|
First we need to know what drives we have:
|
|
|
|
```sh
|
|
geom disk list
|
|
```
|
|
|
|
Show the partitions:
|
|
|
|
```sh
|
|
gpart show
|
|
```
|
|
|
|
In FreeBSD the partitions are named with suffix `pX`, for example `p1`, `p2`, etc.
|
|
|
|
To mount the first partition of the external harddrive:
|
|
|
|
```sh
|
|
# directory needs to exist
|
|
mkdir /mnt/usb
|
|
|
|
# mount the first partition p1
|
|
mount -t /dev/da0p1 /mnt/usb
|
|
```
|
|
|
|
# ZFS
|
|
|
|
The handbook is actually quite comprehensive:
|
|
|
|
* https://docs.freebsd.org/en/books/handbook/zfs/
|
|
|
|
In order for ZFS to work, we need to enable it. On the Raspberry PI it is not enabled by default.
|
|
|
|
```sh
|
|
service zfs enable
|
|
service zfs start
|
|
```
|
|
|
|
You need empty space, either an empty partition or drive.
|
|
|
|
# Mounting different filesystems (for example, a USB SDD)
|
|
|
|
For ext4, see: https://docs.freebsd.org/en/books/handbook/filesystems/index.html#filesystems-linux
|
|
|
|
For NTFS, see: https://docs.freebsd.org/en/books/handbook/disks/#using-ntfs
|
|
|
|
Take into account that NTFS uses "Slices", not "Partitions" so mounting the external NTFS harddrive on the Raspberry PI looks like this:
|
|
|
|
```sh
|
|
ntfs-3g /dev/da0s1 /mnt/usb
|
|
```
|
|
|