The Network and Home Servers
Key Servers
Cube
TrueNAS
TrueNAS provides a rather comprehensive Network Attached Storage solution. I prefer it to Qnap.
TrueNAS Qwerks
Any time the system is rebooted, a number of system directories and files are reverted to the originals as installed. These include /etc/fstab and /etc/sudoers.d. It isn't really recommended that they be modified, but this isn't a production shop and some things are easier a non-standard way.
Create
The following script is setup to run during the boot after the init stage:
One that took some time to figure out was getting a storage pool set up on the USB array. It has 4 disks and I use it for things that I don't need too quickly. The interface is reliable but slow. TrueNAS doesn't recommend doing this and the GUI in recent releases is broken when you try to create a pool using those drives. It can be done through the command line though. This is filed under, I hope that I rarely, if ever, need to do this.
The first step is to get and store the drive identification from the system:
Do this as root.
mkdir /mnt/coldstorage chmod 777 /mnt/coldstorage ls /dev/disk/by-id |grep usb>drives
This will create a mount location and provide a list of the USB drives that will be needed to create the pool. Edit the drives file that was created in the previous step and insert "/dev/disk/" at the beginning of each one. Then use the join command to put them on one line. Then put the following at the beginning of the single line:
zpool create -R /mnt coldstorage raidz -o failmode=continue -o ashift=12
to get something like this:
zpool create -R /mnt coldstorage raidz -o failmode=continue -o ashift=12 <drive1> <drive2> <drive3> <drive4>
Save and execute:
sh drives zpool export coldstorage
The pool is created but needs to be imported through the GUI to be available. Go to the Storage Dashboard and import it.
PVE
Proxmox
Qnap
Return to: Main Page