Professional Documents
Culture Documents
CHAPTER 3
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.
• 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.
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.
• 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,
Lack of data redundancy means there is no fail over support with this configuration.
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.
16
RAID Level 1 (mirroring)
• Requires 2 disks and when the data is written identical copy of the
data is copied to each disk.
• Data is written/ striped to each disk with parity spread across all disks but
not duplicating.
• 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.
19
About disk quotas