Posts Tagged FreeNAS
gpart create -s gpt adaX
gpart add -t freebsd-ufs adaX
Also reference this post for more info:
If FreeNAS 8 encounters an error (which is usually related to out-of-memory conditions) it will enter debugging mode, which is indicated by the following debugger prompt:
To disable this, and enable automatic reboot on panic, add the following tunable in System > Tunables > Add Tunable:
Make sure enabled is checked and hit Ok.
Questions and comments are welcome in the comments section below. Thank you!
FreeNAS 8 does not, by default, allow anyone to use the su command. One practice is to allow members of the wheel group access to su any command. This can be accomplished easily by editing the /usr/local/etc/sudoers file and adding the following line:
%wheel ALL=(ALL) ALL
However, this will be lost on reboot. You can write an sh script to update this file with the following two lines:
echo >> /usr/local/etc/sudoers echo "%wheel ALL=(ALL) ALL" >> /usr/local/etc/sudoers
You can run this sh script from the web shell and it will update the sudoers file.
It can be cumbersome (and problematic) to lose this on every reboot. So here’s how you can edit the base sudoers file so it’s ready when the system reboots:
First, remount the root filesystem read-write:
mount -wu /
Note that if you’re running FreeNAS from a USB stick, filesystem commits can take several moments to commit while the system is mounted read-write. That’s normal, though annoying.
Next, edit the /conf/base/etc/local/sudoers file (you can use the two statements above) to add:
%wheel ALL=(ALL) ALL
lastly, remount the root filesystem read-only again:
mount -ru /
That’s it. However, if you upgrade FreeNAS in the future, this change will be lost. Re-edit the file again.
If you have questions or suggestion, please feel free to leave them in the comments below. Thank you!
If you want to mount a FAT32-formatted (or presumably FAT as well) USB drive in your FreeNAS server, here’s how you do it in FreeNAS 8.
First, view your console either using the servers display, or the web interface (Settings > Advanced > Show Console Message in the footer).
Plugging in your device should display messages similar to the following:
Feb 27 20:56:34 freenas kernel: ugen1.2: <JMicron> at usbus1 Feb 27 20:56:34 freenas kernel: umass1: <MSC Bulk-Only Transfer> on usbus1 Feb 27 20:56:34 freenas kernel: da1 at umass-sim1 bus 1 scbus7 target 0 lun 0 Feb 27 20:56:34 freenas kernel: da1: <Hitachi HTS547550A9E384 A50A> Fixed Direct Access SCSI-2 device Feb 27 20:56:34 freenas kernel: da1: 40.000MB/s transfers Feb 27 20:56:34 freenas kernel: da1: 476940MB (976773168 512 byte sectors: 255H 63S/T 60801C)
From this, we know the device is /dev/da1.
Next, either open the web console or SSH, so we can see what the partitions are and mount it
Now, we’ll see what the partition listings are
ls -l /dev/da1*
crw-r—– 1 root operator 0, 133 Feb 27 20:56 /dev/da1
crw-r—– 1 root operator 0, 134 Feb 27 20:56 /dev/da1s1
Now you know the disk is
/dev/da1, and the partition is
Now, lets mount it.
You only need sudo if you’re not already root (you may need to edit the /etc/sudoers file)
cd /mnt sudo su mkdir usb mount_msdosfs /dev/da1s1 usb1
If you receive this message:
mount_msdosfs: /dev/da1s1: Disk too big, try '-o large' mount option: Invalid argument
Then listen, and do instead:
mount_msdosfs -o large /dev/da1s1 usb1
Now, verify that it has mounted correctly:
You should see a line in the output which lists /dev/da1s1:
/dev/da1s1 on /mnt/usb1 (msdosfs, local)
And you’re all set. Don’t forget to umount when you’re done!
I recently bought an HP ProLiant MicroServer for my new home NAS. My previous NAS was a Synology DS211j, and it performed very well, up until recently. My two biggest reasons for replacing it were:
1) It would randomly drop off the network. The LAN led would flash rapidly, but there was no activity on the switch port. It was also unpingable. This means the NIC was probably failing, and the unit would need to be replaced.
2) Synology had the idea to force MyDS registration in DSM 4.2 BETA. This meant I wasn’t getting another Synology if I could help it.
Now, as my luck would have it, the first time I removed the motherboard from the chassis, I knocked a jumper cap off the board, which resulted in the unit not POSTing. A little intuition helped me find the right spot to replace it to. Here’s photos of the jumper locations in case anyone else shares my bad luck:
I installed a 4GB USB stick in the motherboard’s USB header with FreeNAS installed on it, and am using 2TB drives in slots 1-3 in RAID-Z1, and a 250GB 7200RPM drive in slot 4 for ZIL. In case you want to argue why I should be using an SSD instead of a conventional hard drive, you’re welcome to buy me one, but you might want to read this post first.
So that’s that. I’m sure you’ll be seeing more posts on FreeNAS and my NAS setup in general in the future.
Have any questions or comments about the above? Please share them in the comments section below. Thank you!