Mounting Windows Partitions in FreeNAS 9.x

Recently I built a FreeNAS box so I could backup my computers to it. I figure with the redundancy of the disks, and the ability to have 2 hot spares in a ZRAID2 ZFS Volume would make it more stable than having Terabytes of data just sitting on a disk in my computer.

Long story short I needed to move about 4 Terabytes of data off my local workstation onto the FreeNAS box. I didn’t want to transfer it over the LAN just does to speed so I hooked the drive up to the FreeNAS box with an External Drive Enclosure that had an eSATA port on it.

After some quick research, I found that you need to load a module for FreeNAS to understand NTFS partitions. Here’s what I did:

mkdir /mnt/usb
kldload fuse
ntfs-3g /dev/da1s1 /mnt/usb

If that doesn’t work, you may need to call the fuse module by direct path, like this.

mkdir /mnt/usb
kldload /usr/local/modules/fuse.ko
ntfs-3g /dev/da1s1 /mnt/usb

Those three commands was all it took and the drive was connected. From there some “cp” and “mv” commands was all it took to backup my data from these drives.

Hope this helps anyone having the same issues.

VN:F [1.9.22_1171]
Rating: 4.5/5 (2 votes cast)
VN:D [1.9.22_1171]
Rating: +3 (from 3 votes)

SAMBA 4 Released! Let’s get installing!

So, as many of you have heard, SAMBA 4 was finally released… and holy crap, it’s the closest LDAP service I’ve ever seen to the real Active Directory. As well it should be too, I mean, Microsoft actually helped work on it! This release of SAMBA is huge. It’s really going to change the game of LDAP, file sharing between Linux/Unix and Windows, and authentication. You can read the news release from the SAMBA team HERE or visit their website HERE

What is really huge about it all is that you can setup a SAMBA 4 server to take over, literally, all functions of a Windows AD Domain Controller. It can process authentication requests, hand out Group Policies, process MSRPC communications and more. Think about if you could replace most of your Windows AD DCs with free software. How much will that save you in cost?

So naturally, I’m in the process of getting it up and running. I figure I just got my home systems to authenticate to Active Directory, why not replace one of the Domain Controllers with a SAMBA Domain Controller? So, I’m basing this on a Debian 6 machine. I figure that’s the best place I can put it since I plan on it being around for a while. Why do I plan on it being around for a while? Because rebuilding AD from scratch sucks! And with Debian being a rolling-release operating system, I’ll never have to reinstall the OS on the next release! Pretty damn convenient if you ask me.

So I downloaded the small .iso installer file from Debian , provisioned a new VM, and installed Debian 6. It really doens’t take too long, and when it’s done, you dont have to update it, it’s totally patched and ready to go from the start, it’s so easy to work with!

After getting the OS up and running, I had some house keeping to do:

sudo apt-get install gcc make python-dev linux-headers-2.6.32-5-all

Then I was able to install VMware Tools. You’d have to do the same thing on a VirtualBox system, and you’ll need that stuff for installing SAMBA anyways, so you might as well just install this stuff now and get it over with.

So now we need to actually get the SAMBA4 code, which we can do two separate ways. I’m sure in the future that SAMBA 4 is going to start becoming available in repositories so how you do this is up to you. The two options I recommend are GIT and WGET, which are outlined here:

My Debian 6 machine didn’t have GIT installed so a simple “sudo apt-get install git” solved the issue.

cd ~
mkdir samba4
cd samba4
git clone git:// samba-master


cd ~
mkdir samba4
cd samba4

From here it’s simple. If you downloaded the tarball, just extract it like this:

tar -zxvf samba-4.0.0.tar.gz

Now, whether you have performed either the GIT or the TAR method, you’re in the same place.
Just enter your “samba-master” or “samba-4.0.0” directory to continue.

From here we’re going to compile everything, starting with





sudo make install clean

Durring the configure, make and install you’ll see a ton of scrollback. I set my scrollback to “Unlimited” in my terminal so that I can go back through it if there are issues. I forgot that the “make install clean” needs to be run as root or you can sudo that command:

steve@ncis-samba:~/samba/samba-master$ sudo !!
sudo make install clean
[sudo] password for steve:
WAF_MAKE=1 python ./buildtools/bin/waf install
./buildtools/wafsamba/ DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
Waf: Entering directory `/home/steve/samba/samba-master/bin'
* creating /usr/local/samba/etc
* creating /usr/local/samba/private
* creating /usr/local/samba/var
* creating /usr/local/samba/private
* creating /usr/local/samba/var/lib
* creating /usr/local/samba/var/locks
* creating /usr/local/samba/var/cache
* creating /usr/local/samba/var/lock
* creating /usr/local/samba/var/run
* creating /usr/local/samba/var/run
    Selected embedded Heimdal build
Checking project rules ...
Project rules pass
(scrollback omitted)
Waf: Leaving directory `/home/steve/samba/samba-master/bin'
'install' finished successfully (1m42.653s)
WAF_MAKE=1 python ./buildtools/bin/waf clean
./buildtools/wafsamba/ DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
    Selected embedded Heimdal build
'clean' finished successfully (0.765s)

And we’re done! Well, at least for installing this software.

You now have SAMBA 4 installed on a Debian 6 System! 🙂

steve@ncis-samba:~/samba/samba-master$ ls -alh /usr/local/samba/
total 40K
drwxr-sr-x 10 root staff 4.0K Dec 15 13:18 .
drwxrwsr-x 11 root staff 4.0K Dec 15 13:18 ..
drwxr-sr-x  2 root staff 4.0K Dec 15 13:20 bin
drwxr-sr-x  2 root staff 4.0K Dec 15 13:18 etc
drwxr-sr-x  7 root staff 4.0K Dec 15 13:18 include
drwxr-sr-x 14 root staff 4.0K Dec 15 13:19 lib
drwxr-sr-x  2 root staff 4.0K Dec 15 13:18 private
drwxr-sr-x  2 root staff 4.0K Dec 15 13:20 sbin
drwxr-sr-x  7 root staff 4.0K Dec 15 13:20 share
drwxr-sr-x  7 root staff 4.0K Dec 15 13:18 var

You probably want to make SAMBA start when your server boots, right? Well, lets get that going.

The people over at SAMBA have made this super easy. So lets get some wget action going on this.

Just use wget like this:

wget -O /etc/init.d/samba4

If that link doesnt work, I’ve posted the script on my site, here:

From here, you just need to make sure this script is executable:

chmod 755 /etc/init.d/samba4

Now you can add this to your init scripts:

update-rc.d samba4 defaults

As for configuring SAMBA 4, that’ll be in my next blog. If it’s anything like setting up and configuring a Microsoft AD Domain Controller (which I’m sure it’ll be much MORE difficult than that) then I’m sure the next blog will be pretty long…



VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)