Quick Tips

Setup Samba Shares With FreeNAS - A 5 Minute Tutorial

|


After reading some tweets between Beq and Freenas on Twitter recently, I thought it would be a great idea to write a quick tutorial on setting up a basic Samba (CIFS/SMB) tutorial for anonymous access. I had gone through similar problems when I first started using FreeNAS. The process is very similar the one I used for Data Recovery Using FreeNAS. Note that I am running this setup and keeping it on as a LiveCD setup. All these settings will be lost upon a reboot. You can save the settings to a Floppy or a USB drive.


Bootup and Install
  • I Boot up with the LiveCD.
  • Configure the IP address via DHCP (option 2)
  • I go to another machine for the WebGUI to do additional configuration.
  • From the WebGUI, I login with the default admin/freenas account.
  • Then I setup the Disks - steps are below.


Adding the Disk
  • Disks - Management - Add Choose the Disk.
  • In my case it is ad8.
  • I give the description as HD (Hard Disk)
  • I leave everything else default, leaving the Preformatted file system as UFS (GPT and Soft Updates). Click Save
  • Now Click Apply Changes
  • You should see the status of the Disk as Online

Format The Disk

  • If this is a new disk (to FreeNAS) you should format it.
  • Choose the Disk you setup in the above step
  • Choose the File System.
  • Give it a Label (optional)
  • Click Format Disk

Mount the Disk
  • Disks - Mount Point - Management - Add mount point
  • I Choose the Disk I configured above
  • I choose EFI GPT as the partition, since I am using the entire disk for data storage.
  • Filesystem: I choose UFS
  • Sharename: I call it Windows. You can call it anything you want.
  • I leave everything else as the default and click Add
  • save the changes by clicking Apply Changes
  • Status should go to OK

Setup Samba (CIFS/SMB) Services
  • Go to Services - CIFS/SMB
  • On the Settings tab, make sure you check off Enable
  • Choose Anonymous for Authentication (you can change this once you get it all working)
  • Give it a NetBIOS name and Workgroup of your choosing
  • I left all settings as the default. Click Save and Restart

Setup Samba (CIFS/SMB) Shares
  • On the Shares tab, Click on the Add Share icon (plus sign)
  • Give your Samba Share a name and put a comment in so you know what it is.
  • Choose the Path. This should be /mnt/mountpoint. Where the mountpoint is what you setup in the Mount The Disk step's Share name. In my case it would be called Windows. THIS STEP IS VERY IMPORTANT!
  • Click the Add button.
  • Click Apply changes
From Your windows machine, or any machine that can access a Samba share, I go to the folder \\freenasIP - You should see your available Samba share now.

I know all the mounts and share names and all the other steps can be very confusing if you have never set up FreeNAS before. It was confusing to me until I did it a few times. I hope this has helped you get your FreeNAS system up and running. Let me know your thoughts on this process and if this tutorial helped you at all. To read more about FreeNAS see My other FreeNAS posts:
You can buy the Learning FreeNAS: Configure and manage a network attached storage solution book if you are looking for a good reference book.

For additional links to tips and tricks follow me on Twitter. If you would like to contribute to FrugalNYC or FrugalTech in any way (guest posts, articles, ideas, interesting links, advice, financial assistance, or anything else), feel free to contact me via email. Click here to add this to your RSS reader or Subscribe to FrugalTech by Email.

Using 7-Zip To Do Data Backup

|

I've been using 7-Zip for several years now. I wrote a short blog post about 7-Zip back in October of 2008 on FrugalNYC. You can read about why I use it on that post. Today, I wanted to give you a real-life example of using 7-zip to do some data backup in Windows XP.

If you want to do manual backup of a folder, all you need to do is right click on the folder, choose 7-zip and then Add to Archive and that would be the end of it. Your archive file will be located in the same folder you just ran the archive command on (eg. your Desktop).

One of the best features a utility program can have is to have a command line feature. With a command line (aka console) feature, you can automate tasks using batch files or in this case, using the windows scheduler to automatically do regular backups.

Assuming you installed 7-zip in the default directory c:\program files\7-zip you can automate the directory backup using the below steps:

  • Control Panel -> Scheduled Tasks
  • Add Scheduled Task -> Next -> Click on the Browse button
  • Browse to C:\Program Files\7-Zip\ and choose 7z.exe and click Open
  • Give it a name such as John Doe's Data Backup
  • Choose the backup interval, I like the weekly interval. Click Next
  • Now Select the start time. I'll schedule it for Every Friday at Noon (lunch time) and to repeat every 1 week. Click Next
  • Now you will need to put in your login name and password. Then click Next
  • Check the box marked Open advanced properties for this task when I click Finish
  • Click Finish

On the next window we want to verify the Run Command and the Start In folder.

Here is the command I have set in the Run Command
"C:\Program Files\7-Zip\7z.exe" a jdoe.7z "C:\Data"

  • "C:\Program Files\7-Zip\7z.exe" is the application that will run
  • a is the switch that tells 7-zip to create an archive
  • jdoe.7z is the file name of the 7-zip archive
  • "C:\Data" is the folder I want backed up
The Start in field is where the archive file will reside. This should be another disk drive, external drive or server. I point it to a folder on my FreeNAS server \\freenas\public.

Now you can test the scheduled task by right clicking on the task you just created and choosing Run. For best results, I recommend you create a batch file with the command you want to run, then all you have to do is point the Run field to the batch file. This will also allow you to add additional directories into the batch file as additional lines instead of creating another scheduled task.

What tools do you use to do your data backup? Do you use 7-Zip? Do you FreeNAS?

For additional links to frugal tips and tricks follow me on Twitter. If you would like to contribute to FrugalNYC or FrugalTech in any way (guest posts, articles, ideas, interesting links, advice, financial assistance, or anything else), feel free to contact me via email. Click here to add this to your RSS reader or Subscribe to FrugalTech by Email.

Data Recovery Using FreeNAS

|

I have written several posts about FreeNAS in the last several weeks. For such a small and compact OS, I have found this to be one of my favorite tools of late. I first wrote about 9 Great Things About FreeNAS and then I wrote 9 Reasons To Use FreeNAS At Work. I then wrote 11 FreeNAS Tips that I picked up after using it and reading about it for several weeks.

Today I would like to talk about how FreeNAS can be used as a data recovery tool. Below is my account of how I used the FreeNAS LiveCD to restore data from a Windows Laptop. I've done this on a HP/Compaq Windows XP Laptop and it worked very well.

Bootup and Install
  • I Boot up with the LiveCD.
  • Configure the IP address via DHCP
  • I go to another machine for the WebGUI to do additional configuration.
  • From the WebGUI, I login with the default admin/freenas account.
  • Then I setup the Disks - steps are below.


Adding the Disk I want to Recover
  • Disks - Management - Add Choose the Disk.
  • In My case it was the acd4, the only other one being a RAM Disk or CDROM Drive (acd0)
  • I give the description as HD (Hard Disk)
  • I leave everything else default, but I do change the Preformatted File system to NTFS
  • Save the changes


Mount the Disk
  • Disks - Mount Point - Management - Add mount point
  • I Choose the Disk I configured above
  • I chosse partition 1, since I know the Laptop only has one primary partition.
  • Filesystem: I choose NTFS
  • Sharename: I call it Windows. You can call it anything you want.
  • I leave everything else as the default.
  • save the changes.


Get to the Files
  • For the easiest access to files I setup the FTP service.
  • I go to Services - FTP
  • I click enable and then Save and Restart.
  • From windows explorer (on the machine I did the WebAdmin work and where I want the data restored to) I go to the folder ftp://freenasIP
  • I see the files from my windows install and grab whatever files I need to backup.


Shutdown the Laptop
  • When Done copying, I just shutdown the system.
  • System - Shutdown

Voila! Now you know how to use FreeNAS as a data recovery tool. There are other dedicated recovery tools, such as SystemRescueCD, but I find FreeNAS very easy to setup and it gives me the results I want faster. Do you use FreeNAS? What features do you like best? Share your thoughts and comments. You can get the current iso of FreeNAS here. Do you have other useful resources for FreeNAS?

You can buy the Learning FreeNAS: Configure and manage a network attached storage solution book if you are looking for a good reference book.

For additional links to frugal tips and tricks follow me on Twitter. If you would like to contribute to FrugalNYC or FrugalTech in any way (guest posts, articles, ideas, interesting links, advice, financial assistance, or anything else), feel free to contact me via email. Click here to add this to your RSS reader or Subscribe to FrugalTech by Email.