This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Showing posts with label Server. Show all posts
Showing posts with label Server. Show all posts

Monday, January 14, 2013

How to build a Home Server with Windows 8


How to build a Home Server with Windows 8

Saying that Windows 8 is a major shift in strategy for Microsoft is pretty obvious at this point. Between the Metro interface, complete dismissal of the start menu, focus on touch screen devices, and myriad other changes; this is not the Windows of the Bill Gates era. One change which hasn’t received much discussion is the idea of Windows 8 being Microsoft’s next iteration for not only Windows 7, but for Windows Home Server.
If you haven’t heard, Windows Home Server has been discontinued by Microsoft. For those not familiar with the Windows Home Server product line to begin with, it was designed to be the central hub of your home network; providing easy access to large amounts of easily expandable storage, simple backups, media functionality, and synchronization of usernames and passwords throughout your home network. The good news is that Windows 8 provides much of the same functionality previously found only in Windows Home Server.
Our in-depth guide here will show you everything you'll need to build a Windows 8 home server

Configuring Storage

Windows 8 offers some new tools which make it easy to create large amounts of redundant storage that may seem familiar if you’ve used Windows Home Server in the past. The storage spaces feature lets you group multiple physical hard drives together into a single storage pool and even provides options for redundancy. Storage spaces are probably a good idea even if you only have a single drive at the moment due to the ability to dynamically expand the size of your volume by adding more drives, much like the drive extender feature familiar to Windows Home Server users.

power user menu
Power users can quickly access a number of tools using this hidden menu.

To begin configuring storage spaces, you need to access the Control Panel, which can be a little tricky in Windows 8. The two easiest ways we’ve found to get there are:
1. Go to the Start Screen, type “Control Panel”, then click on the Control Panel shortcut.
2. Move your mouse cursor to the bottom left of the screen to bring up the Start Screen shortcutright click on the shortcut, and choose the Control Panel option. (There are some other goodies here as well, so keep this trick in mind for later use.)
Once you’ve navigated to the Control Panel you can find Storage Spaces under the System and Securitycategory. The first step in getting storage spaces up and running is to create a storage pool and add physical drives to the pool. One thing to know is that storage pools use the full capacity of your hard drive, so if you have existing data it needs to be copied off before you add the drive into a storage pool.

Storage Spaces
Storage spaces let you create RAID-like storage on the cheap.

Within the Storage Spaces applet in the Control Panel you should see a link that says Create a new pool and storage space. Click this link and confirm the user account control pop-up to begin adding drives to your storage pool. The next screen will ask you to choose the drives to use in your storage pool. Select the drive or drives you want to use and click the Create pool button at the bottom of the window. Notice you can use any combination of internal and external drives to create your storage pool (we’re using two 2TB Backup Plus Desk drives from Seagate connected over USB 3.0).


Once the storage pool is created we move on to creating a storage space. There are several options when creating a storage space, some of which require some additional explanation. The name and drive letter are probably obvious to Maximum PC readers, these configure how the storage space is displayed in File Explorer. You would think the pool size would be another obvious option, but storage spaces can be configured to be larger than the amount of physical storage you have available. To be clear this is not usable space, but it does allow you to create a large storage space and expand through new physical drives as needed.

Storage Space Config
Configuring a storage space is extremely simple.

Resiliency is probably the most confusing of the storage space options. A storage space can be built to protect against drive failure by storing a duplicate copy of your data on more than one drive in a mirroring configuration. The caveats to using resiliency are that you must have multiple drives in your storage pool and the maximum storage capacity is reduced because some of the drive space is being used for resiliency. A storage space can even be configured to store an additional copy of your data in a three-way mirror. Sadly you cannot add or change the resiliency configuration of a storage space simply by adding another drive at a later date. What you can do later is add additional drives, configure a new storage space with resiliency, and then move your files to the new storage space. Also keep in mind that you can have multiple storage spaces in a single storage pool. This means you could have a resilient storage space mirroring your important documents, and a second storage pool with no resiliency used for music or videos which you could recover through another method.

Sharing your Files

Microsoft introduced the HomeGroup feature in Windows 7, and it’s returned in Windows 8. The feature allows you to set up a relationship between the Windows PCs on your network and eases the process of sharing files and devices between computers. There are two parts to sharing files using HomeGroup on your network.

Home Group Password
HomeGroup creates a random password during the initial configuration.

First we need to create the HomeGroup and add computers. HomeGroup settings can be found in theControl Panel under the Network and Internet category. If there is already a HomeGroup on your network, you will be invited to join the existing HomeGroup, otherwise you will be prompted to create a new HomeGroup. There’s really not much to actually creating the HomeGroup itself. The system will generate a password which you must use to join other computers to the group. This password can be changed later to something you can remember.
Sharing files using a HomeGroup is most easily done by using Libraries. The HomeGroup Control Panelallows you to choose which libraries get shared with other users in the HomeGroup. If you want to simply share a single file it can be done by adding it to a shared library.
For our scenario, we’re looking to share entire folders within our new storage space. By creating Music, Video, and Pictures folders we can easily organize our media files. Additionally we can add these folders to the existing libraries by simply right clicking and choosing Include in library to start sharing them to the HomeGroup.

Sometimes we don’t want to do things exactly like Microsoft designed, so using the existing libraries isn’t always going to be a workable solution. Fortunately you can add libraries and then share them with the HomeGroup or simply share an individual folder without using the libraries. To test this, let’s create a Backup folder in our storage space. Once the folder is created, right click on the folder, choose Share with, and choose HomeGroup (view and edit).
Home Group
Libraries shared to the HomeGroup integrate directly into Windows Explorer.

Now that we’ve created our HomeGroup and shared all of our files open up File Explorer (this is another option in that power user menu we showed you earlier).  In the left panel of File Explorer you should now see a HomeGroup section with your username underneath. Expanding your username should show the computers you have access to, and should provide a list of shared folders on that computer.
Another feature of a HomeGroup is the ability to stream media over the network using DLNA. This can be configured using the Media streaming options in the Network and Sharing Center Control Panel. The Media streaming options will allow you to allow or disallow individual media devices on your network from accessing certain types of files.

Protecting your Data

One thing we can’t recommend highly enough is backing up your data. Few things are worse than losing years of pictures or documents because of a failed hard drive or accidental deletion. There are two aspects of data protection we want to take a look at, using your Windows 8 server as backup storage and backing up the storage volume itself.

Windows Backup
Windows Backup isn’t gone from Windows 8, it’s just hiding.

Using your Windows 8 server as backup storage is as simple as using the Backup folder we created earlier as your storage volume. This can be done with most backup tools, including Windows Backup and File History (which we’ll talk about in a minute). Interestingly, Windows Backup is a deprecated feature in Windows 8, which means two things. First, it’s hard to find. Second, it’s a feature that may disappear completely in future versions of Windows.
To use the traditional Windows Backup features in Windows 8 you need to go to File History in theSystem and Security category. Once there you will see an option for Windows 7 File Recovery in the bottom left corner of the window. Another option is to switch to the Control Panel’s icon view and find the Windows 7 File Recovery option there. Once you are in Windows Backup/Windows 7 File Recovery you can create a system image, back up your libraries, or choose individual folders to back up. These steps can be used to back up other computers to your central storage or to back up your centralized files and folders to another location.

File History
File History is a feature we wish we had before deleting that massive Word document.

Another option to back up critical files in Windows 8 is by using the File History feature. File History is primarily used for backing files up from other computers to your centralized storage, but it offers some increased flexibility over traditional backups. File History can be configured by simply choosing the backup location and turning the feature on. In addition to having a backup copy of your files you also have the ability to open a previous version of a file. This is particularly handy if you’ve accidentally deleted something contained in a file, such as paragraphs from a document or a slide from a presentation.

Conclusion

Windows 8 is certainly a shift from previous versions of Windows, but it’s not all about the new interface and the start screen. If you know where to look there are some sweet new features that open up new possibilities in how we use our computers on a daily basis.

Using FreeNAS to build a DIY home server


Using FreeNAS to build a DIY home server

We haven’t checked in with FreeNAS, the FreeBSD-based DIY NAS OS, in quite some time. The OS has been completely overhauled, plugin support has been added, and it now works with even more hardware.
Since the last time we built a FreeNAS box, back in January 2010, the OS has been through some changes. It switched developers, nearly switched platforms, removed media streaming, added it back in via plugins, added better ZFS management, and more. FreeNAS promises near-endless customization and hardware support, enabling nearly anyone to build a highly moddable NAS from off-the-shelf parts. I’ve been promising an updated FreeNAS build for quite a while, and now’s the time to deliver. I assembled a cream-of-the-crop batch of hardware, got the latest version of FreeNAS, and got cracking.

Choosing the Hardware

The beauty of FreeNAS is that it’ll work with just about any old hardware you have lying around—you don’t need to build a special box for it. This “build” is more about exploring the new version of FreeNAS than it is about the hardware itself. I took the opportunity to build a pretty powerful system, but you don’t have to take my hardware choices as your minimum recommended specs or anything like that. I just wanted to see what would happen if I gave it beefy hardware to play with.
I chose a Fractal Array R2 chassis, which has six drive bays and an integrated PSU. I had a Mini-ITX FM1 board and an AMD A8 APU lying around and decided to use those, because a more capable CPU in your NAS means better transcoding and streaming. You could just as easily use any Mini-ITX board with a PCIe slot, maybe one with an integrated Atom or Brazos chip, if you want to save some money.
Four Western Digital Caviar Red NAS drives at 3TB each give me a theoretical 12TB of capacity if I were just going to make a RAID 0, which I’m not. Because I’ll be using a filesystem called ZFS, which does all its volume management in software, I want a good host-bus adapter that doesn’t insist on imposing its own hardware RAID over it—just something to pass the commands from the OS to the drives. I picked LSI’s SAS-9207-8i, which can control up to eight 6Gb/s drives and runs on a x8 PCIe 3.0 bus. Because I want to use the case’s SATA power connectors, I also bought a HighPoint Mini-SAS-to-SATA breakout cable rather than use the included connectors, which run on Molex power.
Because ZFS loves RAM and wants as much as you can throw at it (the specs recommend at least 1GB per TB of storage), I used two 8GB DDR3 DIMMs from G.Skill.
FreeNAS won’t mount any storage on the boot drive, and only takes up about 2GB total (with another 2GB swap), so there’s no point wasting a hard drive on it. It’s perfectly happy booting from a flash drive. I just used an 8GB drive left over from a CES press kit.

Set it Up

Since this is a very straightforward build but a complicated software install, I’ll skip the step-by-step build entirely, and start with the software configuration. It’s a bit of a doozy. Thankfully, I have the excellent instructions on Freenas.org and the FreeNas Quick Start Guide to help. Here’s how to set up FreeNAS; create volumes; set up users, groups, and sharing; and install a few streaming plugins.

1. Install the OS

To create the bootable OS image (from a Windows machine), you’ll need the aforementioned USB drive, the programs 7-Zip and Win32 Disk Imager, and the img.xz file for your install. We’re using FreeNAS 8.2.0 Release 1. Download the FreeNAS-8.2.0-RELEASE-p1-x64.img.xz file fromSourceForge. Extract the img.xz file using 7-Zip to turn it into an .img file, then burn that file onto your USB key with Win32 Disk Imager. This might take a few minutes. Once it’s ready, plug the USB key into one of the FreeNAS box’s rear USB ports and turn on the machine. You’ll need a keyboard and a monitor for this, but only for a few minutes. Make sure the FreeNAS box is connected to your network via Ethernet. Make sure the system is set to boot from USB. The system will spend a few minutes doing a self-test and then dump you at a screen called Console Setup. At this point, under a list of 11 options, you should see the phrase “You may try the following URLs to access the web user interface,” followed by an IP address. Go to another computer on your network and enter that address into the web browser; you should be able to get right into the web console, which will make this whole process a lot easier (image A).
INGREDIENTS
PARTURLPrice
Case/PSUFractal Array R2 w/300W SFX PSUwww.fractal-design.com$200
MoboAsus F1A75-I Deluxewww.asus.com$175
CPUAMD A8-3850 2.9GHz APUwww.amd.com$100
CoolerStock AMDwww.amd.com$0
RAMG.Skill RipjawsXwww.gskill.com$105
Boot Drive8GB Flash Drivevarious$8
Hard Drives3TB WD Red NAS drive (x4)www.wdc.com$880
Drive ControllerLSI SAS 9207-8iwww.lsi.com$305
SAS-to-SATA cableHighPoint Int-MS-1M4Swww.highpoint-tech.com$10
OSFreeNAS 8.2 Releasewww.freenas.org$0
Total$1,783

You’ll notice a blinking Alert light on the upper right. Click it and you’ll see that you need to change the admin password. Hit the Account button to the left of the Alert button, then select Change Password. Changing the admin username from “admin” can help with security too. You should also set up an email address for the root account, so FreeNAS can email you with admin alerts. Go to Account, then Users, then View Users, and click Change Email on the root account. You should also set up console logging by going to System > Settings > Advanced and selecting Show Console messages in footer.


2. Set Up Storage

Now for the fun part: volume management. Thousands of words can be and have been written about the relative merits of the various traditional RAID levels, as well as ZFS-specific types like RAIDZ1 and RAIDZ2. Any choice will be a trade-off between performance, capacity, and robustness. I’m going with RAID-Z2, which will allow me to tolerate up to two disk failures without data loss.
Go to Storage > Volumes > Volume Manager. Create a volume name (I used “mpcstore”), then hold Ctrl and select the drives to use—I used all four drives. For filesystem type, select ZFS, then RAIDZ2. Select Add Volume. My four 3TB drives created a volume of 6TB; I’m sacrificing space for redundancy.
Inside the volume, I’ll create individual ZFS datasets so I can set granular permissions on each of them. Because I’m the first user, I’ll create a dataset within mpcstore for myself. In the left navigation pane I’ll go to Storage > Volumes >
/mnt/mpcstore and select Create ZFS Dataset. I’ll call it “nedstore” and give it an unlimited quota (image B).



3. Add Users and Groups

FreeNAS can be configured to inherit users from an Active Directory or LDAP, but I’m assuming that this device will be used in an unmanaged home network, so we’ll assign users with the same names as the Windows login names they use, per FreeNAS’s instructions.
I’ve created a user named Nathan (for myself), and selected “Create a new primary group for the user,” which will let me fine-tune permissions. I set my home directory to the dataset I created earlier, i.e., /mnt/mpcstore/nedstore.

4. Configure Permissions

Go back into Volumes and find the dataset you created earlier—in my case, that’s nedstore. Click Change Permissions and select the user you just created. Here you can control which users and groups have read/write access to the dataset (image C). Repeat the dataset, user, and permission steps for any users you create.


5. Set Up a Media Share

I’m going to set up a media dataset so I can share my music and movies with the rest of the Windows computers in my network. Follow the procedure above for setting up a new dataset (I called it Media), then browse in the navigation pane to Sharing > Windows (CIFS) > Add Windows (CIFS) Share. Create a new share and point it to the dataset you’ve just created (image D).
You can either restrict it to specific users or groups, or enable an anonymous Guest Mode. If you have Apple computers on your network, you should also turn on AFP; if you have Linux, enable NFS. You can also enable SSH, rsync (for replication), iSCSI, and more, all from the Services panel.

6. Map the Drive

Now you can map the Windows share you’ve just created. Go to My Computer, right-click, and select Add Network Location. Plug in the IP (the same one in your web console) and share name, as shown in the image (image E). Give it a fancy name. Note that you’ll have to configure permissions so that users have write access if you want to be able to add files and folders via Explorer.


7. Set Up the Plugins Jail

Earlier versions of FreeNAS contained robust streaming options, such as iTunes, uPnP, and BitTorrent clients. FreeNAS version 8.2 restored that functionality via the use of plugins. The word “plugin,” however, dramatically overstates the ease of using these. To install and set up these plugins, first go to your storage volume and create two ZFS datasets, one of at least 2GB called Jail and another called Software (image F). The plugin system basically creates a virtualized FreeBSD system inside your FreeNAS system, and by this point if you’re tearing your hair out, you’re not alone.
Next, go back to SourceForge and find the plugins_Jail.pbi file for the release you’re running. In our case, that’s at http://sourceforge.net/projects/freenas/files/FreeNAS-8.2.0/RELEASE/x64/plugins/. Download the PBI file to your computer. Now click the little wrench icon next to Plugins in the Services menu. That’ll put you through a three-part setup screen. The first one will give you a temporary place to store the PBI you’re about to upload. I just used the root of my mpcstore. The second lets you set up the paths to your jail and software datasets. Point the plugins jail path to the jail dataset and the archive path to the software dataset (image G). The third step is to upload the plugins jail PBI file from your desktop.
You’ll also need to create a separate pingable IP address for the software jail, distinct from your FreeNAS IP address (image H).




8. Install Plugins

Now you should be able to slide the Plugins slider to On and click the Plugins menu at the top. Go back to SourceForge and download the PBI files for the plugins you want to install. Right now the ones available are Transmission (a BitTorrent client), MiniDLNA (a, yes, DLNA client), and Firefly, a no-longer-maintained iTunes-library service. Once you’ve downloaded them, hit the Install Plugin button and browse to the PBI file and upload it. You’ll see it appear in the Plugins list, with service status set to Off. Create a mount point within the jail pointing to a folder outside the jail (image I). I directed it to the same dataset I’m using for my Windows share, so I can drag-and-drop media that can then be broadcast over MiniDLNA and Firefly. Easy, right?
Now go to the left-side navigation tree and go to Services > Plugins, and select the plugin you just installed. I’ll use MiniDLNA as an example. Give it a friendly name and a media directory. Note that your media directory should use a relative path within your software jail, so it’s best to just type it in manually. I used /media again (image J). Save your changes and turn the plugin on. Make sure the IP address you picked for your software jail is working and you should see the DLNA server show up in your list of UPnP devices (I used VLC to check).


Paddling in the Shallow End

So now you know how to set up users, groups, datasets, and sharing, and you’ve got your plugins ready to go. We’ve only scratched the surface of what FreeNAS has to offer. Fortunately, there’s a robust community that loves documentation and has its own forum with discussions and FAQs for every part of the FreeNAS experience, from hardware to software to plugins to fine-tuning, and more (bit.ly/OosjiB).
One note: Be sure to back up your NAS data to an external drive. Even with two-disk loss tolerance, you never know when disaster will strike. You can use FreeNAS’s built‑in rsync to make sure you have all your data synched to an external drive.
As for the specific hardware I used, it’s probably overkill for most home users. It did enable large-file read and write speeds of over 90MB/s, which is quite nice.
FreeNAS’s greatest strength is also its greatest weakness: It’s incredibly complex and granular, with myriad configuration options, plugins, services, and so forth. The average home user may be better off buying an off-the-shelf NAS from Qnap or Synology, which are easier to configure and often include mobile access apps. But if you have the patience and the inclination, there’s nothing like building your own.
NOTE: This article was taken from the Novembe issue of the magazine.