You are on page 1of 27

Department of Computer Science

Network and System Administration

CHAPTER 3

File Systems and Management of Data


Storages
Partition management

2
Naming of IDE drives
• Disk drives and partitions have names in the /dev directory
• Modern PCs are able to connect up to 4 IDE drives:

3
Naming of SCSI drives
• SCSI controllers can handle multiple drives
 They are simply named in order

4
Naming of partitions
• Originally, PCs allowed a maximum of four partitions on a hard drive
 To allow more, one partition can be designated an extended partition
 Multiple logical partitions can be placed within the extended partition
• Linux numbers the primary partitions 1, 2, 3 and 4, and the logical
partitions are numbered starting at 5 (even if there are less than 4
primary partitions)
 These examples are for a machine with IDE drives:

5
Swap partitions
• It is normal to allocate one or more partitions as swap partitions
 Swap partitions do not contain a filesystem
 They are used to increase the available virtual memory space on the machine
beyond the amount of RAM (random access memory)
• How big should the swap partition be?
 Hard to give generic advice
 A common rule of thumb is to make swap the same size as RAM
 Performance degrades significantly if the system does a lot of swapping
 Since memory is relatively cheap, a better guideline might be to put
 enough RAM in the machine so that it never swaps at all

6
Partitioning guidelines
• The simplest partitioning scheme is to put the entire file system into
the root partition
 Easy, no need to make any up-front decisions about partition sizes
• However, there are good reasons for using more partitions
 Keeping the root partition small minimizes the amount of file system that must
be intact and available for the system to boot successfully
 Partitions provide a crude way to impose disk space quotas on pieces of the
file system
 Partitions are the “unit of administration” of the file system (e.g. Repair,
backup and restore of the file system is on a per-partition basis)
 Partitions for “static” pieces of the filesystem (e.g. /usr) can be mounted read-
only, improving security
 If your file system spans multiple hard drives, you necessarily have multiple
partitions
7
Cont…
• Directories essential for booting must be on the root partition
 /bin, /sbin, /etc, /lib, ...
• Other directories are candidates for being on separate partitions
 /usr May be mounted readonly. Suggested minimum size 2 Gbytes
 /var
 /boot On early PCs this partition needs to be within the first 1024 cylinders.
Suggested minimum size 50 Mbyte.
 /home On a server, this partition may be exported to client machines This is
likely to be the largest partition
 /tmp Hard to give a specific guideline on the size but 1 Gbyte is probably
more than enough
 /opt

8
Implementing Local Storage
• Storage is one of the key components that you must consider when
planning and deploying an enterprise or a company infrastructure.

• Most organizations require a great deal of storage, because users work


regularly with apps that create new files that require storage in a
central location.

• When users keep their files for longer periods of time or every time a
user logs on to a server, an audit is created and requires storage.
Cont…
• There are various types of storage that you can utilize, in your
enterprise/company.
• To deploy storage for your environment, you need to make some
important decisions.
• Does the storage need to be fast?
• Does the storage need to be highly available?
• How much storage does your deployment actually require?
• How much resilience do you need to add to the initial storage
requirement to ensure that your investment remains secure in the
future?
Disk Types and Performance
• There are various types of disks available for storage to server and client
system.
• Like other electronic devices, these have witnessed numerous technological
advancements over the years in terms of capacity, size, shape, internal
structure, performance, interface, and modes of storing data.

Currently we can group Disks drive


in to four types.
1. Parallel Advanced Technology
Attachment (PATA)
2. Serial Advanced Technology
Attachment (SATA)
3. Small Computer System Interface
(SCSI)
4. Solid State Drives (SSD)
What Is RAID?
• RAID is a technology that Combines multiple disks into a single logical unit to provide fault
tolerance, high reliability and high performance.
• In most organizations, it is important that the servers are available all of the time.
• Provide fault tolerance by using:
• Disk mirroring
• Parity information (i.e Any single disk’s data can be recovered by XOR’ing the data of
the surviving disks.)
• Can also provide performance benefits by :
• spreading disk I/O across multiple disks
• Can be configured using several different levels
• large storage capacity and redundant data
• faster access to reading data

12
Cont..
• RAID subsystems can also provide potentially better performance than single disks by
distributing disk reads and writes across multiple disks.
• For example, when implementing disk striping, the server can read/write information from all
hard disks in the stripe set.
• When combined with multiple disk controllers, this can provide significant improvements in
disk performance.

file data block 0 block 1 block 2 block 3

Disk 0 Disk 1 Disk 2 Disk 3


RAID Levels
• When implementing RAID, you need to decide what level of RAID to implement.

• Each RAID Levels offers unique characteristics and function

• Performance

• Availability

• Costs

• The most common RAID levels are 0, 1, 5, 10 and other types used…but rarely: RAID
2,3,4,6,50……

14
RAID Level-0 (striping)

 Striped set without parity or mirroring and requires 2 or more disks combine together.

 Data is written sequentially to each disk that is data is distributed, when the data is written,

half of the data to disk 0 and the other to disk 1.

 Lack of data redundancy means there is no fail over support with this configuration.

 Provides good performance

15
Cont…
• All space on the disks is available.

• Use only in situations where you require high performance and can
tolerate data loss.

• In the diagram, the odd blocks are written to disk 0 and the even blocks
to disk 1 such that A1, A2, A3, A4, … would be the order of blocks
read if read sequentially from the beginning.

• Used in read only NFS systems and gaming systems.

16
RAID Level 1 (mirroring)
• Requires 2 disks and when the data is written identical copy of the
data is copied to each disk.

• Halved the available space but provide redundancy.

• more expensive implementation requires twice as much storage


space.
• Array continues to operate as long as at least one drive is
functioning.

• If we use independent disk controllers for each disk, then we can


increase the read or write speeds by doing operations in parallel.
17
RAID level 5 (Striped with parity)
• Requires 3 or more disks and equivalent of one disk used for parity.

• Data is written/ striped to each disk with parity spread across all disks but
not duplicating.

• RAID 5 is an ideal combination of good performance, good fault tolerance


and high capacity and storage efficiency.

• An arrangement of parity and CRC to help rebuilding drive data in case of


disk failures.

• failure of one disk is not quite a harm. We need more time if 2 or more disks
 “Distributed Parity”
fail.
is the key word here.
• Commonly used for data storage where performance is not critical, but
maximizing disk usage is important. 18
RAID level 1+0 or 10 (mirrored set with striped set )
• Several drives are mirrored to a second set of drives, and then
one drive from each mirror is striped.

• Combines RAID 1 and RAID 0 Which means having the


pleasure of both - good performance and good failover
handling.

• Frequently used in scenarios where performance and


redundancy are critical, and the cost of the required additional
disks is acceptable.

19
About disk quotas

Linux supports a quota mechanism to limit disk usage


• Soft limits (can be exceeded for a specified grace period)

• Hard limits (cannot be exceeded)

• Limit the number of disk blocks

• Limit the number of inodes

• Limits can be set per user and per group

Quotas are set and checked on a per-partition basis


• Typically, quotas are used on the /home partition
Initializing disk quotas
Enabling disk quotas
Setting and modifying quota limits
Quota grace period
Reviewing quota utilization
Thank you!

You might also like