David e-mailed my dad (I’m just Tim) with a question about using RSYNC in Windows to backup to FreeNAS when the data is in two different locations. Since my dad doesn’t know anything about FreeNAS, I figured I’d answer:

Dear Mr. Fehlman,

Congratulations on your excellent series of articles on FreeNAS. I have got a Dell PIII with 640MB RAM and a single 30GB disc up and running with FreeNAS; the disc has two partitions one for FreeNAS and the second for data. Ultimately, what I would really like to aim for is a RAID FreeNAS to backup family photos, and MYOB business data….and here lies a problem.

It would appear that in FreeNAS each partition represents a single share point. With RSYNC, we need a matching share on the Windows box, and this Windows share (represented by a virtual directory in DeltaCopy) can only point to a single folder. Am I correct in stating that if I wanted to backup two different folders on the Windows box (say, MYPHOTOS and MYOBDATA), I would need two virtual directories in DeltaCopy, and thus would need two matching data partitions on the FreeNAS box? I note your link to “How to partition hard-drives for FreeNAS“, but I’m starting to get out of my depth by this stage (I consider myself a newbie luddite).

Many thanks for your comments,

David

Well, David, you are correct. There needs to be a 1:1 ratio between folder and backup on the FreeNAS using RSYNC. So, how do you go about backing up several different folders that are all over your hard drive? There are three different ways that this can be accomplished.

1. Move All Data One Folder

The first thing that comes to mind is that you can store all of your data in subfolders under one folder (e.g. My Data). Then, all you would have to do is set up one partition on the FreeNAS box and RSYNC the one folder to the FreeNAS partition.

2. Create an Intermediate Backup Folder

“But, what if you can’t move the data?”, you ask, “There are a lot of programs out there that do not let you specify where the data can be stored. How would you back up something like that?”

You could create an intermediate folder where you use a program such as Cobian Backup to copy all of the files to one folder and then RSYNC that folder to the FreeNAS box. Unfortunately, you now have two copies of your data residing on your hard drive which has a tendency to get pretty huge after a period of time.

There is also the issue of the initial file backup still running when RSYNC fires up. This means that you will be copying your data to the FreeNAS box prior to the backup completing. Definitely an issue.

3. Use NTFS Junction Points

The solution that I thing is the geekiest (thus, the coolest) is to use NTFS junction points. Essentially, you make the system think that an empty folder in a backup folder actually contains your data. Then, when RSYNC goes to copy the data, it will follow the junction points and backup everything you want.

Junction Link Magic
If you are new to NTFS junction points, this can be a bit of an odd concept to get used to. The way I wrap my head around it is to think of them like “stealth” shortcuts. Just like a shortcut on your desktop can point to a file or folder somewhere else on your hard drive, junction points point to other folders on your hard drive. The difference between shortcuts and junction points is that the file system sees shortcuts as files with an .LNK extension but it sees junction points as just another folder on your hard drive.

If you are interested in working with junction points, there are a lot of different programs out there that will allow you to create and delete them on your system. The one that I use the most is called Junction Link Magic and is available as freeware (of course). There are a lot of others out there but this is just the one that I am familiar with.

Junction Point Loop
Just a quick word of warning. You can really mess up your system if you go deleting junction points without understanding what they actually are doing. I suggest that you only create new junction points in folders that you have just created for the purpose of redirecting information. I also suggest that you do not delete any junction point that you dis not create. This is another great way to destroy your system. And finally, do not create a junction point that points to a folder higher up in the directory tree. This will create a junction point loop and if you are backing up this folder, you will never finish your backup.
Also be aware that you can only perform NTFS junction points on Windows 2000 and above. Your hard drive also needs to be formatted NTFS.

RSYNCed Data Unavailable

Data UnavailableNow, this brings up another problem. People are finding that they are not able to access their RSYNCed data. This is a know issue but there is a solution….which I will tell you about tomorrow!

If you found this post useful, why don't you buy me a cup of coffee to show your gratitude?

45400618_44fca3420f_m.jpgNate is finding that FreeNAS, actually, any NAS is really slow on his system and is looking for help. Nate write:

Hello!

I just found your website not too long ago, and have really enjoyed it! I’m in IT by hobby and trade, and I have found many many useful features on your site, and everything is well documented and easy to follow, not to mention interesting!

I just recently went through your FreeNAS guide and got the system up and running on an old Compaq system I had lying around. I had been having issues with a store-bought Western Digital NAS, and was hoping to try an alternative as well as learn something in the process.

What I did find however, is the same problem, so I am hoping you have some suggestions for me. I know that you are not offering tech support, and you surely get tons of needy email, but I thought I would at least throw it out there for ya, and with any luck you have some knowledge and free time that you toss some clues my way.

Both my FreeNAS system and my Western Digital drive are extraordinarily slow. Like, dog slow.

They ping back with less than 1ms response, so that looks good, and my router indicates that everything is wired in and running at 100M.

That said.. the web interface on both is very slow. Copying a 1.24GB file to the WD system, took 20 minutes exactly. Not exactly speedy. I have similar speed issues with FreeNAS.

Any ideas? Some protocols somewhere? or some authentication errors that may be causing lag? I don’t even know where to start looking.

Thanks for any advice you have. Either way, I look foward to all your future work, and am anticipating your 32MB FlashDrive articles!

-Nate

First, Nate, thanks for the compliments. I’m always glad to hear that people are getting something out of the website.

Now, as for your speed problem. There are several things that it could potentially be but the one that comes to mind is an issue that I had myself a number of years ago.

I had deployed a new network with a server and a number of workstations. Everything worked fine and the network connectivity was there but everything was painfully slow. All the network applications took forever to come up and file transfers were ridiculous. After about two weeks, I finally discovered the problem.

When I created the images for the workstations, I built the image with the network card set to a speed of 100 Mbits and full duplex. At the last minute, we switched from a managed switch to an unmanaged switch. Most unmanaged switches have their speed duplexing set to autonegotiation. It was at this point that I made a bad assumption.

I assumed that since the network cards on each workstations were hard coded to 100/full, the switch would automatically recognize this and set each port to 100/full as well. In reality, I had created a duplex mismatch. Essentially, the network cards were looking for a 100/full link on the other end of their patch cable while the switch was expecting an autonegotiation session. Neither got what they were looking for and trouble ensued!

The long and the short of it is that you have to be sure that what is on one end of a patch cable is the same on the other end of the patch cable. That also goes for autonegotiation. Both devices need to be set to autonegotiation. If only one is set that way, then you will experience all types of network slowdowns! So remember:

10 to 10
100 to 100
1000 to 1000
half to half
full to full
auto to auto
So, Nate, knowing what little I do about your network, this is the first thing that I would check. Make sure that all of your speed and duplex match on all of your devices. To change the speed and duplex in FreeNAS, click on the LAN item under the Interfaces (Assign) menu.

Menu
In this page, you will see a General configuration section near the bottom. Two of the options are Speed and Duplex.

Click to enlarge.

Set these two options to match that on your switch and then click the Save button. With any luck, this will resolve your speed issues!

The other option is to set the speed on the switch. But, this is sometimes not possible, especially if it is an unmanaged switch.

Now, this is only my opinion. So, let’s put this out there to the DCoT readers. What do you think is causing Nate’s speed issues? Let everyone know in the comments.

Good luck, Nate!

If you found this post useful, why don't you buy me a cup of coffee to show your gratitude?

USBBen sent me an e-mail asking me about automatically running a program when a USB drive is inserted into a computer. Ben writes:

Hi

I really like your site. Now I finally can have fun with my USB and not just use it at work.

I was wondering if there’s any way to make the USB drive run an exe as soon as its placed in the drive? Without questions asked.

The thing is, I would like my USB to send me an e-mail as soon as someone plugged it in, with something like.

“USB used at [IP] at [TIME], computer name is [COMPUTERNAME]”

so if someone stole it and tried to use it, I would know who they are (or the police at least know)

Is that possible?

- Ben.

Well, Ben, the short answer to your question is “Not that I am aware of.” Microsoft has put the AutoPlay function to prevent people from putting viruses on USB drives and infecting people’s computers this way.

Now, if you install a small monitoring client on a computer, it could monitor the system for USB drives and if it finds the USB drive and the appropriate application, it could launch it without prompting but this would defeat the purpose of having the application run from a found USB drive.

But, let me extend this question out to the DCoT readership. Does anyone out there know how to perform this action? If so, let us know in the comments.

If you found this post useful, why don't you buy me a cup of coffee to show your gratitude?

I have been experimenting with my RSS feeds, just to see what is the best way for me to be using them. I was hoping to drive more traffic to my website by just putting the first few lines in the feed and then having people come to the website for the rest of the story. Unfortunately, all this did was drive more unhappy e-mail to my site. Here is an example:

I have not been a long time reader, but I started reading your RSS feed after reading about the USB drive hack (great work and articles). I really miss having the whole story in the RSS feed so that I can read your articles on my PDA, as now it’s just little snippets. Will you be changing the RSS feed back to a full story?

Johan

Well, Johan (and everyone else who did not like the change), you will be happy to know that I have changed the RSS feed back to the way it was. Hopefully, this will let people read the articles but not drop traffic to the site.

In fact, you can show your appreciation for the change back to the full story feed by coming to the site and digging around for some of the older stories that you may have missed in the past.

If you found this post useful, why don't you buy me a cup of coffee to show your gratitude?

Here is another e-mail with a question whose answer could make all of our lives easier:

Hi Tim

Firstly can I congratulate you on a great site, I stumbled across it a few weeks ago and now visit each day.

Anyway I just wanted to ask if you had ever come across a program or utility that would enable a person to add computers to a workgroup and set user names, passwords, create drive mapping and an email profile for each user? I suppose a limited domain functionality for a workgroup.

Many Thanks and keep up the good work ;0)
Mark

Mark,
I’m glad you enjoy the site. I hope that I can continue to provide you with some useful information.

As for your technical question, I am going to make some assumptions:

  1. You are configuring workstations that are working in a peer to peer network without a domain (hence the reference to “workgroup” in your question)
  2. You want to be able to run a program that will automatically add specific users and passwords to the local system’s configuration
  3. Create a unique e-mail profile in Outlook for each user
  4. Create drive mappings for each user (to either a unique location per user or to the same location per user)

So, the way I see it, there are really four different things that need to be done. Two of these things (add computer to workgroup and add users to the system) would need to be done for each workstation and the other two (map drives and create e-mail profiles) need to be done per user.

Add Workstation to Workgroup

The first thing that you would like to do is add a workstation to a workgroup. This is a relatively simple thing to do using the Netdom utility provided in the Windows Resource Kit. Make sure you use version 1.8 as the new version does not work!. You can add it to the workgroup by simply typing the following command line:

Netdom Member \\Computername /JoinWorkGroup WorkGroupName

Make sure that you set Computername to the name of your computer and WorkGroupName to your workgroup.

Adding Users to the Workstation

To add users to a workstation, all you need is to use the following VBScript:

Set WSHShell = CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("PROCESS")

strComputer =WshSysEnv("COMPUTERNAME")

Set colAccounts = GetObject("WinNT://" & strComputer)
Set objUser = colAccounts.Create("user", "UserName")
objUser.SetPassword "Password"
objUser.SetInfo

Make sure that you set UserName to the user you want to create and Password to your selected password.

Creating Outlook Profiles

The Outlook profile can be created as a PRF file. Rather than walk you through the entire process, I will point you at an excellent tutorial by Outlook-Tips that will show you how it can be done.

You can then edit the PRF file for each user using either AutoIt or VBScript.

Map Network Drives

Mapping network drives is also quite simple. You could create an AutoIt script with the following command in it:

DriveMapAdd("O:","\\Server\Share")

Make sure that you set the proper drive and share for the account.

You can then compile this script and point the logon script for the workstation to it.

Conclusion

I hope this helps you out, Mark. It was a really good to see that all of this stuff is still in memory for me!

If you found this post useful, why don't you buy me a cup of coffee to show your gratitude?

« Previous PageNext Page »