Bought myself a Ugreen NAS: DXP4800 Plus
Earlier i installed FreeBSD which was hazzle free, unfortunately the 10GB nic was not recognized. Tried to use 15.0-BETA3 and appling patch from bug. No go.
Went back to 13.5-RELEASE. I wanted to start using my new NAS.
Might play more in a jail later, once i have my files secured :)
Turned of the nas. Inserted the discs, no tools needed. Nice!
Create GPT data for the discs, then add label and type to the partitions
We then create the zraid (3 discs used, 1 parity ie one can stop functioning without us loosing any data)
$ doas gpart create -s gpt ada0
ada0 created
$ doas gpart create -s gpt ada1
ada1 created
$ doas gpart create -s gpt ada2
ada2 created
$ doas gpart create -s gpt ada3
ada3 created
$ doas gpart add -t freebsd-zfs ada0
ada0p1 added
$ doas gpart add -t freebsd-zfs ada1
ada1p1 added
$ doas gpart add -t freebsd-zfs ada2
ada2p1 added
$ doas gpart add -t freebsd-zfs ada3
ada3p1 added
Then we create a filesystem to use the pool. Enable compression and snapshots.
$ doas zpool create island raidz /dev/ada0p1 /dev/ada1p1 /dev/ada2p1 /dev/ada3p1
$ doas zpool status island
pool: island
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
island ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
ada0p1 ONLINE 0 0 0
ada1p1 ONLINE 0 0 0
ada2p1 ONLINE 0 0 0
ada3p1 ONLINE 0 0 0
errors: No known data errors # NOT a fan of this line, you see 'errors' and you shit yourself
We then move the mountpoint to /zstorage and set access for wheel group. Then copy our first file there.
$ doas zfs create island/scumm
$ doas zfs set compression=lz4 island/scumm
$ doas zfs set snapdir=visible island/scumm
Create a snapshot, then scrub
$ doas zfs set mountpoint=/zstorage/scumm island/scumm
$ doas chmod -R 775 /zstorage/
$ echo "smurfs are fun" > /zstorage/scumm/smurfs.txt && ls /zstorage/scumm/smurfs.txt
/zstorage/scumm/smurfs.txt
Read the freebsd book
$ doas zfs snapshot island/scumm@251029-2222
$ ls -l /zstorage/scumm/.zfs/snapshot/251029-2222/
...
$ doas zpool scrub island
Also these posts siberoloji, bastian.rieck and eradman
Not sure if i will do more, i'm more than happy to use scp for backup (oh yes, i have ssh running on the nas, forgot to mention that the last post)
Let's see