FreeBSD ZFS NAS Web-GUI

Status
Not open for further replies.
Interesting! I may just break down and setup my SS4200 to get ZFSGuru installed tonight. NUT seems to be the standard for FreeBSD UPS monitoring http://www.freebsd.org/cgi/ports.cgi?query=^nut-&stype=name
at least thats what I've seen used in pfSense and FreeNAS. Keep up the great work!
 
Sub...
I can't seem to enable samba on my created shares ie: /tank or /tank/media. I'm testing the official 1.6. Bootzfs installed on pool= Bootpool
you have access if you wish.

wf
 
Last edited:
@black6spdz
Thanks! That was just what i was looking for i guess. I'll add it to my to-do list. :)

@wingfat
I think i know why you can't share with Samba; you did not reboot after performing the ZFS-on-root. At least that is how i can reproduce your problem. After rebooting and booting from your ZFS disks instead of the LiveCD, you can perform samba shares again.

Tell me if it works?
 
I've had no success restoring the zfsGuru USB live image to USB. Jetfly 4gb
Used WinImage and Win32 Disk Imager.
Both write image successfully but system freezes in bios when attempting to boot from it.

I have verified my system can boot usb fine by downloading FreeBFreeBSD-8.1-RELEASE-amd64-memstick.img
This works fine and boots.
I've also downloaded a live OpenSolaris CD and it too boots fine.

I've tried both 0.1.6 and 0.1.5

The LiveCD boots fine. The reason I was using the USB was I assumed it persisted settings over reboot.

Any clues?
 
Last edited:
Did you extract the .img.gz file and got a .img file only? Writing the .img.gz file directly to USB stick will not work; you have to extract it first.

Could you get me the MD5 checksum of the file you downloaded, so i can check if you downloaded it correctly?
 
Did you extract the .img.gz file and got a .img file only? Writing the .img.gz file directly to USB stick will not work; you have to extract it first.

Could you get me the MD5 checksum of the file you downloaded, so i can check if you downloaded it correctly?

Yes the gz was extracted and .img was written to usb.

Here are the MD5 checksums:

20fa8059dd3a58adb69464d94182fbfa *ZFSguru-0.1.6-binary.img.gz
c7b605dd5e9a6b432a89e7a82c836340 *guruusb.img
 
@grufzilla

Could you test this on other systems as well? The checksums are valid. Assuming it is written correctly, the GPT partitions and other boot code might cause issues that i'm not yet aware of. If indeed only some systems are affected and your USB stick works great on other systems, then i would have something to go on.

The systems you were trying to boot from were 64-bit, right?
 
sub.. would I in theory be able to install this onto my existing v13 ZFS RaidZ created from FreeNAS? I'm guessing I would need to upgrade the array to v14 first then install to the pool?
 
@grufzilla

Could you test this on other systems as well?

The systems you were trying to boot from were 64-bit, right?

@Sub.Mesa -- Yes system is 64bit Gigabyte motherboard, i5-650 cpu.

I'll try and get access to another system to test. In the mean time I have used the FreeBSD 8.1 usb image and this has worked fine to install BSD. Has anyone else had problems with the USB? or is everyone running from LiveCD or ZFS on root?
 
Having written the 0.1.6 binary image using winimage to a 4gb ocz usb stick I encounter the same issue as nexxium noted in his post on pg13 here: http://hardforum.com/showpost.php?p=1036101195&postcount=248

The console pauses at:
"Enter full pathname of shell or RETURN for /rescue/sh:"
and regardless what I input I receive approximately:
"init: can't exec /rescue/sh for single user: No such file or directory
init: can't exec /rescue/sh for /etc/rc: No such file or directory"

I have disabled the motherboards ide cdrom and this makes things worse. I will try a different usb stick.

EDIT/UPDATE:
Using an older 512mb lexar thumb drive the system successfully boots and everything functions correctly thus far.

@sub.mesa: very nice work!
 
Last edited:
Sub..
I solved the problem with the samba shares.. Samba sharing must be enabled prior to enabling NFS sharing. Having NFS sharing enabled first will not allow the samba share to show up.

WF
 
sub.. would I in theory be able to install this onto my existing v13 ZFS RaidZ created from FreeNAS? I'm guessing I would need to upgrade the array to v14 first then install to the pool?
The pool does not need to be of any particular version, i think. At least version 13 should be fine. ZFS booting does not work beyond level 19 for the moment; hope ZFS v28 gets full boot support as well; though this would be a challenge by fitting all those changes into 512 bytes. ;-)

But you can't really do this on existing pools (install ZFS-on-root) since you need boot support and that support is added when formatting disks as GPT under my interface. Without that; the disks won't be bootable. Only one disk would need the GPT partition, technically. So if you could just have one disk formatted with that GPT partition and add it to the pool, it should work.

Having written the 0.1.6 binary image using winimage to a 4gb ocz usb stick I encounter the same issue as nexxium noted in his post on pg13 here: http://hardforum.com/showpost.php?p=1036101195&postcount=248
Your problem appears different, as nexxium's problem should got fixed in 0.1.6. The problem nexxium described was that the USB stick was detected a fraction of a second later than when the script checks for the USB GPT label. Since it now uses 3 second sleep before detecting, the problem in nexxium's post should be gone. If you see any problems with messages like [ZFSGURU] then please send me the output!

Sub..
I solved the problem with the samba shares.. Samba sharing must be enabled prior to enabling NFS sharing. Having NFS sharing enabled first will not allow the samba share to show up.
That is very odd! Samba and NFS should have nothing to do with eachother; no relation between them at all. Could you describe your problem in more detail? Exactly what does not work, any details would be helpful.


General News:

Been playing a bit with benchmaking pools using dd. It works now, and is quite useful to benchmark your pool quickly, doing some sequential I/O on it. You can set the file size very big as well for a long test.
0.1.7 is still a long way to go, and will focus mostly on extending the web-interface features.
 
0.1.6 USB img no longer causes me any problems, and just to make sure I have tried several keys from 3 different workstations, so I guess your 3 sec delay did the trick sub!

Do you see 0.1.7 (and beyond) updates being detrimental to any zpools created under 0.1.6? Would love to setup my fathers server so he will stop pestering me bout it, but if you see any future updates requiring setting up new pools then I will wait.
 
Hey nexxium. Yes i thought that would solve your specific issue. Other people who still have problems booting USB likely have a USB-stick with different geometry. My advice would be to try using a different USB stick instead. I still need to investigate this more thoroughly; these USB boot problems are kinda nasty. ;-)

But alright, one problem down, 999 to go. :D

About your question regarding the configuration used when creating the pool... well i see no special attention needed here:
- my interface uses ZFS pool version 14; stable version which has most basic features
- you can choose whether you add disks as GPT-formatted or DD-formatted with a geom label. I suggest using the GPT partitions. These have been added in 0.1.6.
- if you upgrade my web-interface, your pool should be usable; i see no reason why not.

The only consideration is if you use DD-formatted disks, you will NOT have the opportunity to boot from the pool (at least not from those disks). You need at least one GPT-formatted disk to boot from ZFS pool. Also formatting under GPT is recommended to avoid some issues. You may want to reserve more space than the default 1 megabyte; change the 1 to 100 for example. Long story short u don't need the space, its the slowest space anyway on the disk and it can help prevent some problems. Such as:
- different sized disks (ur replacement disk is smaller than the original and now ZFS doesn't accept your command to use it to replace the failed original)
- gigabyte motherboards kills the last 2000+ sectors on your HDD due to crappy BIOS feature with shadow BIOS backups on HDD. It does this without asking. See OCAU forum for details.
- silicon image and other fakeraid controller which expose their metadata sector, need at least 512 byte reservation (1MB will be enough here)

So GPT + 100MB reserved space would be optimal setup. These are things you can't change later. I think that was your question?
 
Hi svar, no not yet; you cannot yet manage ZVOLs via the web-interface which is the first step. I do have iSCSI support planned pretty soon; perhaps in next 0.1.7; so stay tuned!

You could go ahead and do this your own, though. But the iSCSI configuration is a bit tricky so web-interface would greatly ease its configuration.
 
I guess I stick to the FreeNAS for now then, but I keep an eye or two here too :)

One more thing: In FreeNAS, an iscsi extent needs to be an file on the ZFS pool (ZFS pool is an option, but no pool can be selected.)
Is this an bug in FreeNAS or ZFS V13?
 
Last edited:
Hi,!

I've finally go ahead building my little server and installed FreeBSD with Mesa interface on it :D.

Code:
Status

Name	Value
Product name	ZFSguru
Product version	0.1.6
Product build date	2010-Oct-15 @ 04:07 UTC
FreeBSD version	8.1-RELEASE
Processor	 AMD Phenom(tm) II X4 B55 Processor (3616.08-MHz K8-class CPU)
Processor architecture	amd64 (64-bit)
Memory size	8704MiB, of which 2555MiB kernel memory (314573MiB max.)
ZFS version	This system is currently running ZFS pool version 14.
System time	Fri Oct 15 12:30:57 UTC 2010
Uptime	 7:40
Load averages	0.07, 0.03, 0.01
Current CPU usage	7 %
Number of physical disks	 6 physical disks

I followed the manual installation guide and installed FreeBSD 8.1 didn't get trouble except some difference between my install and what the guide expected but I guess it's that 8.1 have some change over 8.0.

Anyway the mesa interface was working ok.
I formated and applied label to all my 5 drives. And then I created my ZFS raid5 tank.

At this point the command chown -R nfs:nfs /tank failed but I go ahead following the ZFS guide and created the nfs user and setup all other permission.

After that I updated to 0.1.6 using the Web UI but since that I have little more trouble ;)
Web UI refused to install samba so I installed it like on the ZFS guide but without any share, only global setting.
When I try to add a SMB share in Filesystems tab nothing happen

I can't seam to make nfs to work, It say it's running but I don't have any access.
When I do showmount -e localhost on CLI I get the follwing error:

RPC: Program not registered
showmount: can't do mountdump rpc

Also in the Filesystems page when I click on one of them I get the following php error:
Notice: Undefined offset: 1 in /usr/local/www/data/guru.php on line 964

Notice: Undefined offset: 2 in /usr/local/www/data/guru.php on line 972

Notice: Undefined offset: 2 in /usr/local/www/data/guru.php on line 973

Notice: Undefined variable: config in /usr/local/www/data/guru.php on line 993

I guess this is caused because I followed the manual instruction instead of the livecd, but I find it more educational that way.
 
I guess I stick to the FreeNAS for now then, but I keep an eye or two here too :)
Sticking with something known to work for the functionality that you require is a wise thing.
I recommend waiting at least for 0.2.0 before using my project for real data. Not only due to possible bugs, but also things like 'idiot-proofing'; inserting strange characters as pool name should be handled gracefully.

One more thing: In FreeNAS, an iscsi extent needs to be an file on the ZFS pool (ZFS pool is an option, but no pool can be selected.)
Is this an bug in FreeNAS or ZFS V13?
iSCSI expects a block-device as backend; filesystems are character-devices.

To transform a part of the filesystem into block-level storage, you can use:
- a simple sparse file of a certain size; use md with vnode backend on the file to make it a block device
- a ZVOL; a native block-level device that is stored on ZFS pool

The first method will work for anything, including UFS. This may be what FreeNAS uses. The ZFS ZVOL is more sexy i think, cause it also allows compression, snapshotting and provides protection against server-side corruption and BER as well; but a ZVOL is not using the ZFS filesystem itself to store files inside it.

To create ZVOL:
zfs create -V 10g tank/MYVOL

now check the diskinfo statistics for your new ZVOL:
diskinfo -v /dev/zvol/tank/MYVOL

Now pass the /dev/zvol/tank/MYVOL to iSCSI configuration. Set the size accordingly.

ZVOLs are of specific size; they cannot grow automatically. But you can grow them manually. To use the extra space your client (with filesystem NTFS/Ext4/XFS/whatever) would need to support this as well. This you need to do on the client side, after growing the ZVOL on the server. You do need to shutdown the client during this.

All this will be integrated in the web-interface. For now, the web-interface lacks functionality to manage or create ZVOLs and to configure iSCSI. The iSCSI-target daemon is installed, however. So all you need to do is create zvol and edit the iSCSI configuration, which remains untouched defaults which you need to adjust in order to get it working.
 
Hi,!

I've finally go ahead building my little server and installed FreeBSD with Mesa interface on it :D.
Hey there! Thanks for testing this. :cool:

I followed the manual installation guide and installed FreeBSD 8.1 didn't get trouble except some difference between my install and what the guide expected but I guess it's that 8.1 have some change over 8.0.
Indeed; some users reported some trouble with the guide; they are getting very dated at this moment. Generally i recommend using the liveCD to perform a ZFS-on-root install; which installs FreeBSD onto a ZFS pool (spanning one or more disks in whatever RAID configuration you want), allowing you to boot directly from the pool, after which you don't need the LiveCD anymore. That would get you a pretty normal FreeBSD install with just some packages preinstalled and preconfigured.

I do commend you for trying the manual method though; it sure does allow you to learn more things. I often take that route as well, though i feel the documentation is falling short for this route.

At this point the command chown -R nfs:nfs /tank failed but I go ahead following the ZFS guide and created the nfs user and setup all other permission.
This must be because you had no nfs user; i create nfs user as uid=1000; which may be important if you are going to use NFS protocol. The name here doesn't mean anything; only the number means something. Ubuntu has its normal users as uid=1000 so they would want this UID when storing files via NFS.

After that I updated to 0.1.6 using the Web UI but since that I have little more trouble ;)
Web UI refused to install samba so I installed it like on the ZFS guide but without any share, only global setting.
The 'install' buttons on the services page are non-functional. In fact, all buttons there have no functionality at all. The services page will be rewritten before 0.2.0.

When I try to add a SMB share in Filesystems tab nothing happen
Did you reboot after updating? Is Samba service running?

I can't seam to make nfs to work, It say it's running but I don't have any access.
When I do showmount -e localhost on CLI I get the follwing error:

RPC: Program not registered
showmount: can't do mountdump rpc
Make sure the following is in your /etc/rc.conf and reboot the server:

Code:
# NFS
nfs_server_enable="YES"
mountd_enable="YES"
mountd_flag="-r"
rpcbind_enable="YES"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"

Also in the Filesystems page when I click on one of them I get the following php error:
Notice: Undefined offset: 1 in /usr/local/www/data/guru.php on line 964

Notice: Undefined offset: 2 in /usr/local/www/data/guru.php on line 972

Notice: Undefined offset: 2 in /usr/local/www/data/guru.php on line 973

Notice: Undefined variable: config in /usr/local/www/data/guru.php on line 993

I guess this is caused because I followed the manual instruction instead of the livecd, but I find it more educational that way.
I traced these notices to the Samba configuration file smb.conf not conforming to expected format. Try this:

Code:
#======================= Global Settings =====================================

[global]
workgroup = WORKGROUP
server string = ZFSguru
security = share
passdb backend = tdbsam
load printers = no
log file = /var/log/samba/log.%m
max log size = 50
guest account = nfs

;   hosts allow = 192.168.1. 192.168.2. 127.
;   socket options = SO_RCVBUF=8192 SO_SNDBUF=8192
;   interfaces = 192.168.12.2/24 192.168.13.2/24
;   display charset = koi8-r
;   unix charset = koi8-r
;   dos charset = cp866

# Use extended attributes to store file modes
;    store dos attributes = yes
;    map hidden = no
;    map system = no
;    map archive = no

# Use inherited ACLs for directories
;    nt acl support = yes
;    inherit acls = yes
;    map acl inherit = yes

#============================ Share Definitions ==============================

[zfsguru]
path = /usr/local/www/zfsguru/share
comment = ZFSguru System share
browseable = yes
writeable = no
public = yes

[tmpfs]
path = /tmpfs
comment = Memory Filesystem share
browseable = yes
writeable = yes
public = yes
create mask = 0666
directory mask = 0777


# end #

Note: the lines beginning with #==== are very important; do not alter these! These are used as markers to split the document in two.

These errors you wouldn't have gotten with one of the precompiled releases. Nonetheless this feedback is valuable; i'll see if i can make more checks so you get a clear error message that the smb.conf is not conforming to expected format; giving a clear indication of where the curlpit may be.

Cheers!
 
sub.mesa: Thanks for youre reply :)
I see, I guess then that you make in the FreeNAS GUI under managment (after making an Zpool) is not an ZVOL, because it never show up under iSCSI-->Targets-->Make new Extent-->Type-->ZFS volume.
(ZFS Volume dropdown is blanc)
 
Last edited:
Hi again :)
I now tried in an virtual machine, 5*512MB disks.

I tried this:

1: zpool create tank raidz ad6 ad8 ad10 ad12 ad14
2: zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
tank 2.47G 132K 2.47G 0% ONLINE -

ok so far so good :)
3: zfs create -V 1900m tank/iscsi
Somehow, if I tried to make the zvol bigger than 1.9GB, I got an out of space error.

4: None disks, virtual devises or pools are showing in the webGUi, I dident expect any too ether.

5: But I could make the iscsi extent and target, and it saw the Zvol as an ZFS volum, YAY :D

6: Connentet to my mac, formatet the iscsi vol, OSX show 1.71GB freespace, and moved some files, after ran zpool list:

NAME SIZE USED AVAIL CAP HEALTH ALTROOT
tank 2.47G 1.32G 1.15G 53% ONLINE -

OSX show used space as 1,05GB, so so far so good again :)

7: I removed all the files from the iscsi vol in osx, osx then show 1.71GB free.
Ran zpool list again:

NAME SIZE USED AVAIL CAP HEALTH ALTROOT
tank 2.47G 1.39G 1.08G 56% ONLINE -

Oookaaay, here I droped off.
If I from here keep adding files, the number keep growing, well it stoped at 88%, and from here it dont go up or down if I delete data and add new:

NAME SIZE USED AVAIL CAP HEALTH ALTROOT
tank 2.47G 2.19G 287M 88% ONLINE -

:confused:
 
Thanks for help sub.mesa thing improved a little bit, but at the end I just end up installing the img of 0.1.6 on my HDD.

But what I'm wondering now is how to make a permanent install of this?

At each reboot all my change on FreeBSD are lost, I guess the img load everything in memory?

How do I make it install on the HDD just like any other FreeBSD?
 
@darthcloud
Perform the ZFS-on-root install if you want a REAL permanent install. The Livecd/USB image use memory filesystem. The USB image does save a few things however, like /boot/loader.conf, webgui and samba configuration file.

But if you want to play with FreeBSD; use the ZFS-on-root install. This can be done using either LiveCD or USB image (though when using USB image you cannot install on the same USB stick). Doing this is rather simple:
1. boot livecd/USB image
2. Format system disk(s) as GPT (DD mode will not be bootable)
3. Create a pool (use any redundancy you like)
4. Go to Pool->Booting page and follow instructions there
5. Reboot when done; make sure to set BIOS to boot from your GPT-formatted disks

The ZFS-on-root install is preferred, since you have a permanent installation and you save 0.5GB of memory by not using the memory filesystem that LiveCD/USB image uses. However, drawbacks are that you can screw up your freebsd install; while with LiveCD/USB you can reboot and it'll be working again.

@svar
The zpool space calculation is not file-based but block-level based. That means it tells you the raw allocated space that ZFS has in use. This includes any redundancy; so a mirror would show twice the used space.

Also, I assume that when you delete files, zpool doesn't know about it; the zfs filesystem updates its metadata to reflect certain data is no longer in use. So assuming this is correct the zpool used space would show you the percentage of data that was ever written to ZFS.

Normally you would want to know the filesystem used/free space; for that check the data under the Files page instead of the Pools page. On the Files page the used space should be what OSX tells you. It does not include redundancy; so used space on RAID0 and mirror is the same.

Since this may be confusing i'll likely add a 'hint' on the Pools page to inform users how space calculation works.

4: None disks, virtual devises or pools are showing in the webGUi, I dident expect any too ether.
Why didn't you expect so? You should always see pools if they exist, meaning zfs kernel module is loaded and zfs pool is imported.

You won't see any disks though because you have not formatted them. That's okay you can use all the pool management without doing that; though it will never be bootable, and generally it is preferred to use the GPT formatting on your disks, giving them a unique name you assign and also being able to reserve space; which is useful because disks can vary in space slightly; making replacing disks with different brands problematic. GPT partitions created by my interface are fully aligned; meaning the data partition starts at sector 2048 or 1MiB offset; the best default setting.

However, you should see the bare disks listed under the Physical Disks page; do you not see the ad4 ad6 ad8 entries you can click?
 
Last edited:
@darthcloud
Perform the ZFS-on-root install if you want a REAL permanent install. The Livecd/USB image use memory filesystem. The USB image does save a few things however, like /boot/loader.conf, webgui and samba configuration file.

But if you want to play with FreeBSD; use the ZFS-on-root install. This can be done using either LiveCD or USB image (though when using USB image you cannot install on the same USB stick). Doing this is rather simple:
1. boot livecd/USB image
2. Format system disk(s) as GPT (DD mode will not be bootable)
3. Create a pool (use any redundancy you like)
4. Go to Pool->Booting page and follow instructions there
5. Reboot when done; make sure to set BIOS to boot from your GPT-formatted disks

The ZFS-on-root install is preferred, since you have a permanent installation and you save 0.5GB of memory by not using the memory filesystem that LiveCD/USB image uses. However, drawbacks are that you can screw up your freebsd install; while with LiveCD/USB you can reboot and it'll be working again.

Great!! thanks Now everything is up and running.

Is it normal that in the filesystems menu I can't create samba share? NFS is ok, but when enter a SMB share name and clic on share nothing happen. I added my share manualy in smb.conf and it work. But I guess I should use the web UI for that normaly.

Any suggestion of benchmark to see if everything is working well?

Thanks :D
 
So with one of my Hitachi drives out for RMA, I decided to try ZFSguru on real hardware. (I've run it on VMs to test before.) Man, talk about easy setup; great job with that. I installed to the ZFS pool, and it worked fine without having to screw around with anything.

I do have some questions about the performance that I'm seeing. I've not run ZFS on bare hardware before, so I don't really have a frame of reference.

Here's my setup:

Intel Celeron E1400 (2.0GHz dual-core)
2GB DDR2-800
4x 2TB Hitachi 7200rpm (RAID-Z)
Intel CT PCI-E Gigabit Ethernet

Right now I'm seeing transfers to the samba shares of about 40-50MBps. Obviously, this is a lot slower than transferring to a single 2TB Hitachi, and slower than I was seeing with the same drives in WHSv1 (80-90MBps typically). Is this simply a case of ZFS needing more power than my current hardware can provide, or is there something else that I could be looking at?

Other thoughts:
  1. I did get a kernel panic when transferring stuff to one of my samba shares. It only occurred once, but I haven't seen it again, and transfers have been ok (performance notwithstanding).
  2. Is it possible to use samba share names with other characters in the names? I tried using a couple like "Anime (Current)" and "TV Shows (New)". It didn't give me any errors, but it didn't seem to take quite right.
 
So with one of my Hitachi drives out for RMA, I decided to try ZFSguru on real hardware. (I've run it on VMs to test before.) Man, talk about easy setup; great job with that. I installed to the ZFS pool, and it worked fine without having to screw around with anything.

I do have some questions about the performance that I'm seeing. I've not run ZFS on bare hardware before, so I don't really have a frame of reference.

Here's my setup:

Intel Celeron E1400 (2.0GHz dual-core)
2GB DDR2-800
4x 2TB Hitachi 7200rpm (RAID-Z)
Intel CT PCI-E Gigabit Ethernet

Right now I'm seeing transfers to the samba shares of about 40-50MBps. Obviously, this is a lot slower than transferring to a single 2TB Hitachi, and slower than I was seeing with the same drives in WHSv1 (80-90MBps typically). Is this simply a case of ZFS needing more power than my current hardware can provide, or is there something else that I could be looking at?

Other thoughts:
  1. I did get a kernel panic when transferring stuff to one of my samba shares. It only occurred once, but I haven't seen it again, and transfers have been ok (performance notwithstanding).
  2. Is it possible to use samba share names with other characters in the names? I tried using a couple like "Anime (Current)" and "TV Shows (New)". It didn't give me any errors, but it didn't seem to take quite right.

I just get the same result as you do.

I was transfering at once like 350GB of data over samba and I got a kernel panic.

My transfert rate are around 52MB/sec with SMB

My system spec:
AMD Phenom II X3 @ 3.6GHz (formely X2 @ 3.2GHz ;) )
8GB DDR3-1333
1x100GB RAID0 pool for OS
5x2TB Caviar Green RAID5 pool for Data

Everything is gigabit on my network.
 
@darthcloud
If you want to benchmark you may want to wait for 0.1.7 preview .iso release. It has a very sleek benchmark tab under the Disks page that allows you to do very accurate testing and produces visual graphs, like this one:

Bench-LIPE-1.png


Currently finishing this functionality; it's very sleek and i'm quite excited about it!

About Samba sharing; works fine for me. Did you alter the smb.conf in any way; you are using ZFS-on-root now right? Is the pool/filesystem you're sharing mounted? Can you change the Samba configuration in Services->Samba page? Try changing a comment for example.
 
So with one of my Hitachi drives out for RMA, I decided to try ZFSguru on real hardware. (I've run it on VMs to test before.) Man, talk about easy setup; great job with that. I installed to the ZFS pool, and it worked fine without having to screw around with anything.
That's the idea. :D

I would love this interface to be so easy just about anyone can use it.

I do have some questions about the performance that I'm seeing. I've not run ZFS on bare hardware before, so I don't really have a frame of reference.

Here's my setup:

Intel Celeron E1400 (2.0GHz dual-core)
2GB DDR2-800
4x 2TB Hitachi 7200rpm (RAID-Z)
Intel CT PCI-E Gigabit Ethernet
Your RAM will be your weakest link; you will have to do kmem tuning. Setting kmem_size to "1.5g" (1.5GiB) would work well for ZFS-on-root install. Then try adjusting the arc_min and _max variables; don't exceed 80% of kmem however! Try 1.0g for arc_min and 1.2g for arc_max.

Right now I'm seeing transfers to the samba shares of about 40-50MBps.
Test local disk performance to know if your low speeds are network or disk related.

Simple testing on command line:

dd if=/dev/zero of=/tank/zero.000 bs=1m count=10000

This command will write zeroes to the file /tank/zero.000; adjust tank to your pool name. It will write 10GB. If those speeds are well above 100MB/s, then you should suspect weak Samba or network performance.

Very likely you have low ZFS speeds though; if you want performance 4GiB should be considered as a minimum, with 8GiB recommended and 16GiB being great. Those systems may still need tuning to allow ZFS to actually use that memory, though. This should all be improved on FreeBSD 9-CURRENT; but we're not there yet.

I did get a kernel panic when transferring stuff to one of my samba shares.
Try to write down the type of panic, for example the text directly after "panic: ". A common ZFS-related panic is:

Code:
kmem_malloc(4096): kmem_map too small: 699756544 total allocated

If you see these kind of panics; then you need to do memory tuning (try lower arc values and disk cache values).

If you see any other kind of panics; please tell me about it. They likely are not related to my interface, though. The kernel and 'userland' are quite tightly separated.

Is it possible to use samba share names with other characters in the names? I tried using a couple like "Anime (Current)" and "TV Shows (New)". It didn't give me any errors, but it didn't seem to take quite right.
You really shouldn't do that. You should only use lower case space-less alphanumerical characters. You can use spaces in the comment section, but not in the share name.

This is one of the rough edges; user input is not 'sanitized'. This is one of the more boring jobs and i'll save it for 0.2.0 bughunt. :)

If any of you guys have problems with Samba, try:
- rewriting your smb.conf with the file i posted above; exactly how you got it! Note that some windows text editors attach carriage return characters; this could lead to problems.
- check if samba is actually running (on the services page); try:
/usr/local/etc/rc.d/samba stop
/usr/local/etc/rc.d/samba start

If the stop command says that it is not running then you have a problem with your smb.conf or for some reason it wasn't already running.
- check if you have "samba_enable="YES" " in your /etc/rc.conf (should be the case for LiveCD/USB/ZFS-on-ROOT installs)
 
Thanks for the tips.

Simple testing on command line:

dd if=/dev/zero of=/tank/zero.000 bs=1m count=10000

I tried this out, and am getting a result of 142075169 bytes/sec. Obviously this is a lot higher than smb, but is it still low for what a RAIDZ with 4 Hitachi 2TB should be at?

One other thing that I thought of. Is there some way to set a hostname for the server on the workgroup? Right now I'm just accessing it by IP address, but it would be nicer to go by name. Obviously I could add it to the hosts file on my client PCs, but that's not the cleanest either.

As for the kernel panic, is there any way to check what it was? logs or anything? It rebooted quite fast, and I wouldn't have even caught it if I hadn't had the display open on a separate monitor.
 
Just got another kernel panic :( didn't take it in note, but was like the first one:

Code:
panic: kmem_malloc (131072) : kmem_map too small 2674429952 total allocated
cpuid=0
Uptime: 8h21m17s
Cannot dump. Device not defined or unavailable

I don't get why samba dont' work, I can edit the data in the samba tab under service. It work otherwise if you forget the kernel panic. It show has running and both deamon are running.

I added the share manualy in the same fomat you used for tmpfs. It even show up correctly in the filesystems tab (case is check and say "Shared with Samba" with my share name in the box. But if I do it with the interface nothing happen the page reload with the box empty and uncheck

Btw I followed your advise like you suggested in other thread, to have 5x 4K sector HDD so I don't get performance issue in Raid5. But is their anything a need to set for 4K HDD or I'm ok?

I'm now running with ZFS-on-root but I put it on a HDD alone with a Raid0 pool. I don't like to mix OS and Data. So I have one raid 0 pool for OS and one Raid5 pool for Data.
 
Last edited:
@ZetaEpyon
Yes that is too low; you would want to tune your system. Best to wait for 0.1.7 so you can run nice benchmarks and compare results between the settings in /boot/loader.conf. Tuning loader.conf only works on USB installs (USB/binary distribution) or ZFS-on-root installs; so not the LiveCD.

NetBIOS is used to give computers a name on the windows network (CIFS/SMB). You should be able to find the ZFSguru server by browsing the 'workgroup' workgroup and accessing it there. perhaps \\zfsguru also works im not sure. Can you try this?

For the kernel panic; you can see if its in /var/log/messages but otherwise just write it down if you get it next time; if it indeed is the kmem_malloc panic then you know it's the memory tuning for ZFS.

@darthcloud
Could you try booting the 0.1.6 livecd (you can't / shouldn't use older!) and performing a clean install of ZFS-on-root without adjusting any samba settings. Then immediately reboot and see if samba is working in the fresh ZFS-on-root.

If you used a 0.1.4 livecd and then upgraded the web-gui and performed ZFS-on-root; then this will not work! You need a 0.1.6 livecd; it uses this to create the ZFS-on-root.

5-disks should perform better out of the box; the benchmarking in 0.1.7 should show you this, especially after you done tuning. You can add additional performance by adding geom_nop; but this is unrelated to the issue with number of disks in a raidz or raidz2/3 configuration.

Regarding OS/data separation, some considerations:
- you do not really need the OS; if you screw it up boot a livecd and perform a new zfs-on-root install; overwriting the existing system.
- the OS does not get any disk I/O like on windows; so no performance issues exist by having the OS on your pool; except if you install other stuff that is disk intensive like a database.
- for achieving low-power, having no system disks except your data disks would be most beneficial
- using low-power USB-stick for OS disk is possible; but a ZFS-on-root installation on USB/CF could wear it out more quickly; though not very quickly due to ZFS' copy-on-write design it doesn't write to the same place over and over. The USB binary distribution is memory filesystem based so doesn't write to USB; but uses 0.5GB from your RAM just for the OS.
- on ZFS-on-root, the system takes just over 220MB of space thanks to compression
 
Last edited:
@ZetaEpyon
Yes that is too low; you would want to tune your system. Best to wait for 0.1.7 so you can run nice benchmarks and compare results between the settings in /boot/loader.conf. Tuning loader.conf only works on USB installs (USB/binary distribution) or ZFS-on-root installs; so not the LiveCD.

NetBIOS is used to give computers a name on the windows network (CIFS/SMB). You should be able to find the ZFSguru server by browsing the 'workgroup' workgroup and accessing it there. perhaps \\zfsguru also works im not sure. Can you try this?

For the kernel panic; you can see if its in /var/log/messages but otherwise just write it down if you get it next time; if it indeed is the kmem_malloc panic then you know it's the memory tuning for ZFS.

Yep, \\zfsguru\ works, thanks!
Will that be something that's configurable at some point?

The panic wasn't in the log, but I think you're right that it's the memory tuning. I tried modifying the parameters for dd to use larger chunks, and it didn't panic, but it started killing processes saying it was running out of swap space. This seems to go along with the fact that the files I was copying when the panic occurred were quite large (1-2GB each).

I'll keep playing with it and see what I can learn. :)
 
@darthcloud
Could you try booting the 0.1.6 livecd (you can't / shouldn't use older!) and performing a clean install of ZFS-on-root without adjusting any samba settings. Then immediately reboot and see if samba is working in the fresh ZFS-on-root.

It's ok now, what I needed to do was to destroy the Raid5 pool and create it again. I can do samba share on it now.

Now need to tweak to get ride of those kernel panic!

Thanks!
 
@zeta

the samba configuration options that are interesting are in beginning of the smb.conf file; edit it manually to adapt:

Code:
[global]
workgroup = WORKGROUP
server string = ZFSguru
So you would want to change ZFSguru to something else.

about dd; do not change the bs= value above 1 megabyte; this eats directly from your RAM and more than 1MiB blocksize isn't needed; it's split into 128KiB chunks (max_phys) anyway. Instead, increase the count= value; 50000 for 50GB, 100000 for 100GB.

@darthcloud
did you take a look at the /boot/loader.conf file? i adapted it to have many options, just commented out. Remove the # prefix that marks it as comment to activate that option. Try increasing kmem size to your RAM - 0.5GB and lowering arc_min and _max to something well below kmem; like 50% kmem.
 
Cool, thanks.
Regarding dd, yeah, that's a little different than I thought it worked, but makes sense.

On a whim, I pulled 4GB from my main desktop and put it in the ZFS box, pushing it up to 6GB. It seemed to help the dd test somewhat (up around 200MBps now), but the SMB performance is largely unchanged.

I'll definitely be interested to see the benchmarking stuff in 0.1.7 when it's ready.
 
@darthcloud
did you take a look at the /boot/loader.conf file? i adapted it to have many options, just commented out. Remove the # prefix that marks it as comment to activate that option. Try increasing kmem size to your RAM - 0.5GB and lowering arc_min and _max to something well below kmem; like 50% kmem.

Thanks!, this seam to solve the kernel panic problem, transfered over 400GB to my pool without problem.

I saw that geom_nop create a "duplicate" drive with nop extension. Does using those drive require destroying the pool and building it again? or their a way to keep the current pool and use the nop drive?
 
sub.mesa said:
@svar
The zpool space calculation is not file-based but block-level based. That means it tells you the raw allocated space that ZFS has in use. This includes any redundancy; so a mirror would show twice the used space.

Also, I assume that when you delete files, zpool doesn't know about it; the zfs filesystem updates its metadata to reflect certain data is no longer in use. So assuming this is correct the zpool used space would show you the percentage of data that was ever written to ZFS.

Normally you would want to know the filesystem used/free space; for that check the data under the Files page instead of the Pools page. On the Files page the used space should be what OSX tells you. It does not include redundancy; so used space on RAID0 and mirror is the same.

Since this may be confusing i'll likely add a 'hint' on the Pools page to inform users how space calculation works.
I tougt it was sonething like that.
For this testing Im using FreeNAS on Suns VirtualBox, and another funny thing is if I remove an disk in the config (to see if the raidz works) the whole pool is gone then I boot, but I guess thats an virtual box thing, and would not happen on an real box.

sub.mesa said:
Why didn't you expect so? You should always see pools if they exist, meaning zfs kernel module is loaded and zfs pool is imported.

You won't see any disks though because you have not formatted them. That's okay you can use all the pool management without doing that; though it will never be bootable, and generally it is preferred to use the GPT formatting on your disks, giving them a unique name you assign and also being able to reserve space; which is useful because disks can vary in space slightly; making replacing disks with different brands problematic. GPT partitions created by my interface are fully aligned; meaning the data partition starts at sector 2048 or 1MiB offset; the best default setting.

However, you should see the bare disks listed under the Physical Disks page; do you not see the ad4 ad6 ad8 entries you can click?
In FreeNAS, I dont see any disks if I do all the zfs work from commandline
As far as I see, I have no tools in FreeNAS to see the used/free space on a file.level, it only show the block-level, and that I guess is normal because FreeNAS never made an filesystem on the block, OSX did over iSCSI.

Next now, I think I wil try youre build on an virtual machine.

Edit:
Ok I yust found out that if I in FreeNAS use this comand direct (not using the webGUI)
"zpool create tank raidz ad6 ad8 ad10 ad12 ad14"
and remove an disk, the whole pool disapair.
It looks to me that this is just an pool of many disks (like an jbot system) and not an raid.

If I use the webgui, add an virtual disk, and then an pool (using the Disks-->ZFS--->Pools-->Virtual Device and Disks-->ZFS--->Pools-->Managment tools) I can remove an disk, and the pool show up as Degraded then I use the "zpool status" command.

So, I guess Im missing an command then Im trying on this in terminal.


:)
 
Last edited:
I'm currently testing your 0.1.6 release on my test system..

Intel s5000pslsata motherboard
2 x Xeon 5148 processors @ 2.33Ghz ( 40w each )
4Gb FBDIMM
2 x Dell Perc 6i/r HBA ( lsi 1068e based )

So far everything looks good, I havent attached any disks yet, but I've got 5 of the 1Tb WD RE3 drives and 4 of the 2Tb Samsung F4 drives.

I plan on doing a ZFS on root (raidz2) on the 5 RE3 drives..

I've got a 40GB intel x25-v SSD that I got as a promotion from Intel, would I bennefit any by adding that to the pool?
 
Status
Not open for further replies.
Back
Top