Showing posts with label disk. Show all posts

Sharing disks with NFS network

   

Sharing disks with NFS network

 ________________________________________

Follow us on Facebook

Follow us on Google+

________________________________________

 

 Introduction


NFS (Network File System) is a protocol used to mount network disks. This protocol is based on the client / server principle has been developed by Sun Microsystems in 1984. It can be used to exchange data between Linux, Mac or Windows. One of its advantages is that it manages file permissions.


Installing NFS


On Fedora, normally the tools for setting up a network via nfs are installed. You can check it with the command:

$ Rpm-qi nfs-utils

If you get back a message like: "The nfs-utils is not installed", you can install nfs-utils with the command:

# Yum install nfs-utils


Configuring NFS


Before starting the configuration, you must know the IP addresses of your client and server machines. You can get the address of each machine using the command:

$ / Sbin / ifconfig
 



Server-side


You must edit the file / etc / exports and add a line like:

/ path / to / shared @ _ip_client (rw) @ _ip_client2 (rw)

For example, if you want to share your / home / user and the client has the address 192.168.0.23, you would add the line: / home / user 192.168.0.23 (rw) Then it'll just restart the NFS server with the command:

# Service nfs start

Since Fedora 16, systemd uses NFS, it should run it with the command:

# Systemctl start nfs-server.service

If you want the service to be active in the launch of Fedora:
 

 

Client-side configuration


First you need to create a folder that will contain the shared / mnt or / media for example. Then you can mount the file directly with the command:

# Mount-t nfs @ _ip_serveur :/ path / to / share / mnt / share

It is also possible to mount at boot time, for this simply edit the file / etc / fstab and add a line like:

@ _ip_serveur :/ path / to / share / mnt / share nfs auto, user, rw 0 0

Once this change is made, you can mount all partitions in fstab by typing the command:

# Mount-a

You can use showmount to list information for mounting an NFS server:

$ Showmount-e <IP_du_serveur_NFS>

Some security

 

Configuring the firewall


Default portmap ports dynamically defined using NFS and transmits them to client port 2049, which makes the configuration of firewall. For simplicity, it is preferable to set the ports to allow our firewall enabled. You can either use the graphical tool, system-config-nfs or edit the file / etc / sysconfig / nfs manually so that it has the following parameters:

LOCKD_TCPPORT = 32803
LOCKD_UDPPORT = 32769
MOUNTD_PORT = 892
STATD_PORT = 662

Then, modify the configuration by fire so that your open its ports

# System-config-firewall

Ports are open:

2049 (nfs) tcp / upd
111 tcp / upd
32803 tcp / udp
32769 tcp / udp
892 tcp / udp
662 tcp / udp

By default, only the ports 2049, 111 and MOUNTD_PORT are used. The other match Diversent NFS server option.

Finally, you must restart the NFS service changes to take into account:

# / Etc / init.d / nfs restart

If you want to start the NFS server startup, use:

# Chkconfig nfs on
# Chkconfig rpcbind on

(adjust if you enable nfslock etc.).
 

Hard Disk configuration

 

Hard Disk configuration:

 

 ________________________________________

Follow us on Facebook

Follow us on Google+

________________________________________



  

Windows 2003 supports two types of storage drives. Basic storage and dynamic storage.


Basic storage:


The basic storage is the traditional standard for organizing drives. It divides the hard disk into partitions. There may be primary partitions and extended partitions. This is the mode of operation of all Microsoft operating systems prior to Windows 2003. It is also the storage mode Windows 2003 by default and will remain as long as you have not requested type of dynamic storage.

Types of partitions:

 

Primary partitions:

A hard disk can contain up to four partitions. A primary partition is required to start the operating system. The primary partition that contains the boot files to boot the operating system is the active primary partition. At least one partition must be present on the first hard disk. If the active partition is formatted NTFS, you can not have dual boot with another operating system. Only FAT16 formatting can dual-boot with all Windows operating systems. System partition Windows 2003 is the active partition that contains the files describing the equipment and those required for loading the operating system Windows 2003The boot partition of Windows 2003 is the partition that contains the operating files (Winnt).Boot partition and system partition can be on the same partition.

Extended Partitions:

 

An extended partition is created from free space on a hard drive after creation of primary partitions. There can therefore be only one extended partition per drive. This type of partition can receive an operating system but can not ensure the direct priming. It does not require formatting. This type of partition can be divided into segments called logical drives to be formatted with the file system you want. . Each drive is assigned a drive letter.

 

 

Logical drives:

 

Logical divisions are structured within an extended partition. You should at least create a logical drive in an extended partition which can in this case take all (or part ..) the ability of it. Then you must format each logical drive with a file system supported by W2003 Server. (FAT/32 or NTFS). By default, the letters A, B and C are 23 possibilities remain reserved for logical drives ...The tool for managing disks with W2003 Server is the Disk Management snap-in. This console allows you to create, delete partitions. It also gives you information on the type of your disk (basic or dynamic) on the file system of your partitions on the capacity, free space, and the percentage of partitions or partitions belonging to a set of fault tolerance.We will see that you can also use the utility in interactive mode command line DISKPART. This tool gives the possibility to automate some disk management operations via script.Example: DISKPART / F SCRIPTFILE or SCRIPTFILE is a text file containing commands to execute.

 

Create a primary partition:


To create a primary partition you must first select unallocated space on basic disk. Then from the menu confirm Action - All Tasks - New Partition or from the context menu. The wizard asks you to select the partition type (Primary Partition) and the size in MB (can not be less than 8 MB).Note: If you want to take all the remaining space, keep at least 1 MB in order to convert your basic disk to a dynamic disk later. (This is so the system needs to perform this conversion).Then W2003 offers you a drive letter to this partition that you can keep or choose another. Anyway you can do this later.
 


Then you need to format the partition by choosing a file system available and recognized by W2003 Server. You must also specify the size of allocation unit (cluster).Reminder: the cluster or allocation unit is the smallest element that can be processed by the system reading or writing to a disc. It is equal to several physical sectors of the hard disk.The allocation unit or cluster depends on the size of the partition and file system selected.Values ​​assigned by default can be changed by yourself but it is possible then you may change without formatting the drive ...








Note: The utility allows you to create a primary partition with DISKPART utility from the command prompt.DISKPARTSelect disk nCreate partition primary size = x = y offsetAssign letter = zn number of the disk on which the partition is createdx partition size in bytesy offset in bytes to the beginning of the partition. If this option is absent, the partition is created at the beginning of free space on the diskz drive letter assigned to the partition


 

 

Activate the partition:

If this is the first primary partition on the first physical disk that you just created will be marked as active. Start your micro boot sector will be sought on this partition. In case you have several primary partitions on one or more hard drives you can change the status of each of them in order to boot on another partition.Note: Only one primary partition can be activated on a hard disk.

    
To activate the partition go to the Action menu - All tasks - Mark Partition as Active.Implementation with DISKPART.DISKPARTSelect disk nSelect partition xactiven number of supporting disc partition to activatex number of the partition to activate


Create an extended partition:

Select an unallocated space on your hard core then select Action - All Tasks - New Partition or from the context menu.Extended partition check and enter the desired size. The extended partition is automatically created.



The extended partition is a space that awaits the creation of logical drives.




Implementation with DISKPART.DISKPARTSelect disk nCreate partition extended size = x = y offset

 
n number of the disk on which the partition is createdx partition size in bytesy offset in bytes to the beginning of the partition. If this option is absent, the partition is created at the beginning of free space on the disk

Create logical drives:





This operation must be done after the creation of the extended partition. You can create as many logical drives that you have available drive letters.Select the extended partition - Action - All Tasks - Create a new logical drive or from the context menu. The Logical Drive option is automatically selected. Then enter the size to allocate to this logical drive and the type of formatting. You can also change the drive letter assigned by default.



 Implementation with DISKPART.DISKPARTSelect disk nCreate partition logical size = xAssign zn number of the disk on which the partition will be set logical drivex partition size in bytesz drive letter assigned to the logical driveOr NOTE REMINDER: removable storage devices contain only primary partitions. You can not create extended partitions there, or volumes. You can not mark a primary partition as active located on a removable device.

Delete a partition:

Warning: this will erase all the data on it .. From the Disk Management console select the partition to delete and Action - All Tasks - Delete Partition or from the context menu.Command mode.DISKPARTSelect disk nSelect partition xDelete partitionn number of supporting disc partition to deletex partition number to delete