Tải bản đầy đủ (.pdf) (455 trang)

Learning Free NSA

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (4.97 MB, 455 trang )


Learning FreeNAS
Copyright © 2008 Packt Publishing
All rights reserved. No part of this book may be
reproduced, stored in a retrieval system, or
transmitted in any form or by any means, without the
prior written permission of the publisher, except in the
case of brief quotations embedded in critical articles
or reviews.
Every effort has been made in the preparation of this
book to ensure the accuracy of the information
presented. However, the information contained in this
book is sold without warranty, either express or
implied. Neither the author, Packt Publishing, nor its
dealers or distributors will be held liable for any
damages caused or alleged to be caused directly or
indirectly by this book.
Packt Publishing has endeavored to provide
trademark information about all the companies and
products mentioned in this book by the appropriate
use of capitals. However, Packt Publishing cannot
guarantee the accuracy of this information.
First published: August 2008
Production Reference: 1130808
Published by Packt Publishing Ltd. 32 Lincoln Road
Olton Birmingham, B27 6PA, UK.
ISBN 978-1-847194-68-8
www.packtpub.com
Cover Image by Michelle O'Kane
(<>)
Credits


Author
Gary Sims
Reviewers
Dan Merschi
Nathan Yocom
Robert La Gesse
Senior Acquisition Editor
David Barnes
Development Editor
Nikhil Bangera
Technical Editor
Ajay Shanker
Editorial Team Leader
Mithil Kulkarni
Project Manager
Abhijeet Deobhakta
Project Coordinator
Neelkanth Mehta
Indexer
Rekha Nair
Proofreader
Camille Guy
Production Coordinator
Aparna Bhagat
Cover Work
Aparna Bhagat
About the Author
Gary Sims is a freelance Linux/FreeBSD consultant
and writer from the UK and has been working with
open-source software since the mid 1990s. He first

saw Linux while completing his degree in Business
Information Systems at Portsmouth University. Then
while working for Digital Equipment Corp he came in
to contact with DEC's Ultrix and later Digital UNIX
(formerly OSF/1). While developing enterprise
software for DEC on its UNIX platforms he became
more and convinced of the benefits of open source
and open-source Unix-like operating systems like
Linux and FreeBSD. After leaving DEC he became a
software contractor and after moving to Romania in
2003 he became a freelance Linux/FreeBSD
consultant and writer and started publishing articles
for the Open Source Technology Group (owners of
Linux.com and SourceForge.net). This then led to him
writing his first book with Packt
I would like to thank my Mum and Dad for their
support and enthusiasm while I was writing this book.
I would also like to thank my wife for her patience and
encouragement and my children for their frequent, but
yet, welcome interruptions. I would also like to thank
the FreeNAS community, specifically, Olivier
Cochard-Labbé, Volker Theile, and Dan Merschi,
without them FreeNAS wouldn't exist. I also owe a
debt of gratitude to David Barnes (and all the people
at Packt) for making this book possible.
About the Reviewer
Nathan Yocom is an accomplished software
engineer with a focus on network security, identity,
access control, and data integrity applications. With
years of experience working at the system level, his

involvement in the industry has ranged from creation
of software like the open source Windows
authentication project pGina (), to
Bynari Inc's Linux/Outlook integration suite
(), to working on Centrify
Corporation's ground breaking Active Directory
integration and auditing products
().
Nathan's own publications have included several
articles in trade journals such as SysAdmin
Magazine, and co-authoring the Apress book "The
Definitive Guide to Linux Network Programming"
(ISBN: 1590593227).
When not hacking at code, Nathan enjoys spending
time at home in the Seattle, WA area with his wife
Katie, daughter Sydney, and son Ethan. Nathan can
be contacted via email at: <>.
Preface
FreeNAS is a free piece of software that turns a PC
into Network Attached Storage (NAS). It supports
connections from Microsoft Windows, Apple OS X,
Linux, and FreeBSD. It supports RAID, has a simple
web GUI, and modest system requirements. Since
FreeNAS is an embedded operating system, it is
compact, efficient, and dedicated to just one task.
This book shows system administrators, as well as
home network users, how to quickly install and
configure FreeNAS.
FreeNAS has a full range of advanced features
including support for Redundant Array of Independent

Disks (RAID), Microsoft Active Directory, and iSCSI.
The goal of this book is to show administrators how
to use these advanced features and exploit the full
potential of the FreeNAS software.
The FreeNAS software is suitable for home use as
well as enterprise deployment and as such this book
also covers the planning and administration tasks for
both types of environment. This book also has a
chapter dedicated to problem solving, and much
more...
What This Book Covers
Chapter 1 is a high level look at Network Attached
Storage (NAS), and more specifically, the FreeNAS
software. We will cover the basic idea behind NAS
and the philosophy of the FreeNAS server. This
chapter is less hands-on than the others in this book,
but it is important to understand the concepts of
Network Attached Storage and where the FreeNAS
server fits into your business.
Chapter 2 will look at the basic planning points
including: Capacity planning, Hardware requirements,
Planning for backup, Redundancy needs, and
Network infrastructure.
Chapter 3 will install the FreeNAS server, and we'll
start looking at the basic configuration.
Chapter 4 shall look at the different services and
protocols supported by FreeNAS, and we'll also see
examples of how various platforms like Windows, OS
X, and Linux can use the FreeNAS server for file
sharing, backup, and streaming multimedia.

Chapter 5 will look at the different system
administration tasks for the FreeNAS server as well
as user administration.
Chapter 6 will look at how to manage hard disks in
the FreeNAS server and how to configure them to
form RAID sets that improve fault tolerance and
increase drive performance.
Chapter 7 shall explore the different options that exist
to back up the data on the FreeNAS server including
using RSYNC to a second local disk as well as to a
remote machine.
Chapter 8 looks at Advanced System Configuration
like disk encryption, adding a swap space, and
tweaking FreeBSD.
Chapter 9 is a guide on how to solve problems with
your FreeNAS server. It covers where to look for
information about the problem as well as how to hunt
down problems by being methodical. It also looks at
the common problems people have with their
FreeNAS servers including networking problems and
problems with RAID.
Chapter 10 will look at some simple FreeBSD
commands and also some fundamental FreeBSD
administration tasks, including stop and starting
different services as well as controlling RAID from the
command line.

What You Need for This Book
To get the most from this book you will need a copy of
the FreeNAS server software and one or more PCs

on which to install it. You will need the ability to burn a
CDROM and you will possibly need a USB flash disk.
You will need a network and a separate client PC with
a web browser. The client PC can use Windows, OS
X, Linux or any other OS that support web browsing.
FreeNAS can be administered using almost any web
browser including Firefox, Safari or Internet Explorer.
Since the FreeNAS server is configured via a web
interface, it is assumed that the reader has a basic
knowledge of using browser software.
Conventions
In this book, you will find a number of styles of text that
distinguish between different kinds of information.
Here are some examples of these styles, and an
explanation of their meaning.
Code words in text are shown as follows: "We can
include other contexts through the use of the include
directive."
A block of code will be set as follows:
<interfaces>
<lan>
<ipaddr>192.168.1.251</ipaddr>
<subnet>24</subnet>
<gateway>192.168.1.254</gateway>
Any command-line input and output is written as
follows:
Apr 1 11:06:00 kernel: real memory = 268435456 (256 MB)
Apr 1 11:06:00 kernel: avail memory = 252907520 (241 MB)
New terms and important words are introduced in
a bold-type font. Words that you see on the screen, in

menus or dialog boxes for example, appear in our
text like this: "clicking the Next button moves you to
the next screen".
Important notes appear in a box like this.
Tips and tricks appear like this.
Reader Feedback
Feedback from our readers is always welcome. Let
us know what you think about this book, what you
liked or may have disliked. Reader feedback is
important for us to develop titles that you really get the
most out of.
To send us general feedback, simply drop an email
to< >, making sure to
mention the book title in the subject of your message.
If there is a book that you need and would like to see
us publish, please send us a note in the SUGGEST A
TITLE form on www.packtpub.com or email<
>.
If there is a topic that you have expertise in and you
are interested in either writing or contributing to a
book, see our author guide on
www.packtpub.com/authors.
Customer Support
Now that you are the proud owner of a Packt book,
we have a number of things to help you to get the
most from your purchase.
Errata
Although we have taken every care to ensure the
accuracy of our contents, mistakes do happen. If you
find a mistake in one of our books—maybe a mistake

in text or code—we would be grateful if you would
report this to us. By doing this you can save other
readers from frustration, and help to improve
subsequent versions of this book. If you find any
errata, report them by visiting
selecting your
book, clicking on the let us know link, and entering
the details of your errata. Once your errata are
verified, your submission will be accepted and the
errata added to the list of existing errata. The existing
errata can be viewed by selecting your title from
/>Piracy
Piracy of copyright material on the Internet is an
ongoing problem across all media. At Packt, we take
the protection of our copyright and licenses very
seriously. If you come across any illegal copies of our
works in any form on the Internet, please provide the
location address or website name immediately so we
can pursue a remedy.
Please contact us at< >
with a link to the suspected pirated material.
We appreciate your help in protecting our authors,
and our ability to bring you valuable content.
Questions
You can contact us at< > if
you are having a problem with some aspect of the
book, and we will do our best to address it.


Chapter 1. All About NAS and FreeNAS

The first chapter is a high level look at Network
Attached Storage (NAS), and more specifically, the
FreeNAS software. We will cover the basic idea
behind NAS and the philosophy of the FreeNAS
server. This chapter is less hands-on than the others
in this book, but it is important to understand the
concepts of Network Attached Storage and where the
FreeNAS server fits into your business. The main
topics for this chapter include:
What is Network Attached Storage?
What is FreeNAS?
What are the features of FreeNAS?
What does FreeNAS do for me and my
business?
Network Attached Storage
In the mid 80s, two popular computer companies
independently started to work on ways to access
files, over the network, on another computer as if the
hard drive of that remote computer was attached to
the local machine. These two companies were Sun
Microsystems and Microsoft. The Sun Microsystems
method, which was for their UNIX operating system,
is known as the Network File System (NFS) and was
subsequently implemented in almost all versions of
the UNIX operating system including Linux. The
Microsoft solution (which they actually joint developed
with IBM in the initial stages) became known as SMB
(Server Message Block) but in later years was
renamed as the Common Internet File System
(CIFS).

The general functionality of NFS and CIFS are very
similar, and with either installed on a networked
computer, it can read and write to the file system on
another networked computer. Windows users are
most used to this concept via the "Network
Neighborhood" (Windows 95/98) or "My Network
Places" (Windows ME, 2000 and XP) or more
recently "Network and Sharing Center" (Vista). Here,
you can browse the local network for other PCs and
read and write files on that machine as long as the
owner shared it with you.
This ability to use a remote computer (a fileserver) to
store files led to many companies deploying large
centralized NFS Servers or Windows Servers that
were accessed by hundreds and maybe thousands of
UNIX workstations or PC clients. Users would then be
encouraged to store all important files on these
servers as the IT staff would back up the servers
regularly and so back up the important user files.
Storage space has always been an important aspect
of computer systems. Today, more than ever, hard
disk space is in demand. Back in the 1960s, storage
was measured in bytes (8 binary digits, taking a value
of either 0 or 1) and kilobytes. Then, as computers
advanced, storage (including hard disks) grew to the
size of megabytes (1024 kilobytes) and then
gigabytes (1024 megabytes) and today with the 21st
century well underway, computer storage is into the
realm of terabytes (1024 gigabytes).
With modern needs for video and audio, combined

with high speed local networks and the access
protocols of CIFS and NFS, a new kind of storage
solution has appeared: Network Attached Storage or
NAS for short. A NAS server is similar to a traditional
file server in many ways, especially in respects to the
hardware side of the server. But a NAS server is
much more specialized than a traditional office or
departmental server in that it only provides access to
storage via the network. It is not designed to run other
applications such as databases or email servers,
which other types of server might. Normally, NAS
servers don't require a keyboard, mouse or monitor
permanently connected to them and for day-to-day
administration, a web interface is used instead.
Here is an example of the FreeNAS web interface:
To access the data on the server, a typical NAS will
support multiples access protocols and so allow
Microsoft Windows clients, Apple OS X clients, and
UNIX (including Linux) clients to connect and use the
data on the server.
NAS servers normally contain one or more hard
disks, and these hard disks can be combined to
create large contiguous areas of storage or used in a
way to create redundancy. In a redundancy set-up, if a
hard disk fails then the system keeps working and
your data isn't lost.
NAS servers come in all shapes and sizes. There are
several companies that offer compact NAS servers
with an embedded operating system and space for
maybe two hard drives. These units are relatively

cheap but offer limited room for expansion. At the
other end of the scale, are dedicated NAS servers
that look more like traditional file servers with good
processing power and space for several hard disks
(which can make the NAS capable of hosting several
terabytes of data).
Here is how a NAS might fit into your network
environment:

Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay
×