# [Request] FreeBSD+ZFS Step-By-Step Installation Tutorial



## PirangPirang (Mar 14, 2011)

Hello everyone,

I'm new in here, also in FreeBSD.

I have a plan to install FreeBSD+ZFS on my computer as proxy server.

Here is the topology :







Does anyone could teach me how to install FreeBSD+ZFS with specification preferred above? Please teach me step by step, because I don't understand FreeBSD yet.

Thank you for any help from all of you.


----------



## SirDice (Mar 14, 2011)

http://wiki.freebsd.org/ZFS

But you might want to start here: Handbook.
At least until you have more experience.


----------



## Beeblebrox (Mar 14, 2011)

Sorry to dash your hopes a little bit, but I think you are aiming way too high if you are just starting out.  Since you are completely new to FreeBSD, you should not try to do this if your project is time sensitive (ie has deadline) - in this case you will have to get outside professional help.

If you have the time to learn, I suggest you start first with getting a copy of PC-BSD, installing it on an old pc you have lying around and start inspecting / playing with that.  PC-BSD is completely graphical install and with many gui's as you probably expect.  After some time you can start to undertand the unix mentality.

As for ZFS, it has nothing to do with what the server's purpose is it is just a file system (albeit a great one).  This also will take some time learning and you could start with:
http://en.wikipedia.org/wiki/ZFS,  and then of course,
http://blogs.freebsdish.org/pjd/2010/08/06/from-sysinstall-to-zfs-only-configuration/
But as I said, if you don't understand the second link, don't even try.  You need to give yourself some time with this.


----------



## PirangPirang (Mar 14, 2011)

Thank you guys !

I think it's hard to learn FreeBSD but I'll try.

@Beeblebrox

I don't have deadline in here, just want to complete my network with FreeBSD+ZFS proxy server - since I have done with my router (mikrotik) settings - so I could load dynamic and video contents, such as facebook's games and youtube more faster.


----------



## Beeblebrox (Mar 15, 2011)

Start with PC-BSD on a seaprate partition or separate disk.  PC-BSD  can also install the system on zfs from the install menu - this is your best bet.  But first, read a little about zfs to understand the pool or tank + file mentality.

A separate disk is better because if you completeley bork something on the disk, you are still functioning with your other o/s.


----------



## zennybsd (Mar 15, 2011)

@PirangPirang: I am also pretty new to FreeBSD if not for the *nix like world. The difference that I observed it that though the information is complete, but very much scattered to create a certain niche, I guess. The latter part is very discouraging if you are coming from GNU/linux. Just to figure out one small information which you could easily get in the GNU/Linux world, I spent like about two weeks. However, I persist ;-) Therefore, I still encourage you to continue the adventure to the BSD world. Even PCBSD had a lot to fix and too many bugs.

In the meantime, I saw two ways to accomplish what you are trying to achieve (BSD+ZFS).

1) Go to http://zfsguru.com/ and download the iso from torrent, burn it, proceed ahead. The user submesa in this forum or zfsguru has crated a nice GUI.

2) A bit hard way to learn is to get a barebone ISO from http://mfsbsd.vx.sk/. I suggest http://mfsbsd.vx.sk/iso/mfsbsd-se-8.2-zfsv28-amd64.iso and burn it on a CD or usbflash and you are ready to go. All instructions are there. But for you, I suggest to do the following:

2a. Just login as root:mfsroot at the login prompt.
2b. Mount the bootable component to a mnt poing with 

```
mount_cd9660 /mnt/acd0 /cdrom
```
2c. 
	
	



```
zfsinstall -d /dev/ad0 -t /cdrom/8.2-RELEASE-amd64.tar.xz -s 4G
```
where ad0 is your harddrive, -s is for creating a swap space. It create two ufs slices (extended partitions inside the physical partition), a swap space and the rest for the zfs share.

And you are ready to go ahead, man zfs and man zfspool and zvol may help I think.

3) The hardest way is the NanoBSD way which I have tried and do not suggest you to go though it reportedly sounds easy (but you find half-baked information scattered all over the net. ;-)

Hope this helps. Don't rely on me as I am also a novice ;-)


----------



## disi (Mar 16, 2011)

I have a Linux background and zfs is a great filesystem. For me it was actual the BSD kernel, that I wanted to test on my hardware... the userland is pretty much the same.

There are tons of guides on how to install BSD on ZFS root. What I did was to download the FreeBSD bootstick image (the box has no CDRom), prepare the root filesystem (follow guides here), extract the base system, tell the bootloader to load zfs and boot from it then reboot.

You end up in a base BSD system and from here on all options are open to become a desktop, fileserver, router, proxy or a combination of that.

ZFS is so much easier than Linux RAID5 + LVM (that's it's purpose to provide redundancy and volume management).

In your case, I don't know what you want to use those 600GB disks for, maybe mirror the system drive? I would use SSDs for the system drive, those memory disks can run forever and would not easily break down like a harddrive (they are also much faster than HD).

This is just to encourage you not to give up


----------



## PirangPirang (Mar 18, 2011)

@zennybsd
Your experience is very interesting to me. I should try that!
For the beginning, I think I will use VMWare to install FreeBSD+ZFS.
Once again, thanks a lot!

@disi
I love to hear music and watch videos from streaming sites (such as Youtube), my sisters too. I will use my computer to install FreeBSD+ZFS as proxy server to cache any music (such as MP3 files) and any videos (such as Youtube videos). So the music and videos streaming load faster than from original sites load when I open the same links for the 2nd, 3rd, .... 1000th times. And when the cache is full, it could clean up the cache files automatically, sorted by the oldest and the most rarely opened cache.

That's all, disi.


----------



## zennybsd (Mar 18, 2011)

@PirangPirang: Maybe this link (http://www.vioan.ro/wp/2010/01/19/my-zfs-home-nashtpc-box-build/) could be of interest to you. ;-) Enjoy!


----------



## softweyr (May 18, 2012)

zennybsd said:
			
		

> @PirangPirang: I am also pretty new to FreeBSD if not for the *nix like world. The difference that I observed it that though the information is complete, but very much scattered to create a certain niche, I guess. The latter part is very discouraging if you are coming from GNU/linux. Just to figure out one small information which you could easily get in the GNU/Linux world, I spent like about two weeks. However, I persist ;-)



Funny, I usually have exactly the opposite experience.  Whenever I'm looking to solve a common problem, I find 47,000 "answers" with a google search, and spend hours to days filtering to the 90 different mailing list archives of the same unanswered question, or worse yet 390 pages of some useless doofus wandering in the wilderness and creating more problems than he solves.  If, on the other hand, the question is technical, all you find is people on LKML flaming at each other over how stupid the current implementation is (generally true), how awful it is for end-users (also generally true) and how it's unusable because there is no documentation (nearly always true).



			
				zennybsd said:
			
		

> Therefore, I still encourage you to continue the adventure to the BSD world. Even PCBSD had a lot to fix and too many bugs.



I certainly hope you're reporting them.  I keep coming back to FreeBSD in my personal life because I don't have to spend time working around the bugs and mis-features I encounter daily in the linux world.  YMMV.


----------

