Chapter 5 File Management: Storage Hard Disks, LVM and RAID
Chapter 5 File Management: Storage Hard Disks, LVM and RAID
Chapter 5 File Management: Storage Hard Disks, LVM and RAID
Hard Disks
IDE (Integrated Drive Electronics)
ATA (Advanced Technology Attachment )
PATA (Parallel ATA or IDE)
SATA (Serial ATA )
Hard Disks
SCSI (Small Computer System Interface)
SAS (Serial Attached SCSI)
Linux /
Linux /home
Linux swap
Partitioning tools
fdisk
Virtually every PC OS comes with a tool fdisk to create partitions
for that OS
Linux, Windows, and so forth
parted
GPLed Linux program, available at www.gnu.org
Can create/resize/move/delete partitions
GParted, QTParted
GUI utilities that use GNU Parted
Can create/resize/move/delete partitions
Components of storage
Files
Directories
File systems
Logical storage
Physical storage
Partition 4
Partition 2
Partition 5
Partition 3
PROBLEMS:
Fixed partitions
Expanding size of the partition
physical volume
(hard disk or partition)
physical volume
(hard disk or partition)
PE
PE
PE
PE
PE
PE
PE
PE
PE
PE
PE
PE
PE
PE
PE
PE
PE
PE
logical volume
volume group
2
8
14
20
26
32
36
42
48
3
9
15
21
27
33
37
43
49
4
10
16
22
28
34
38
44
50
1
7
13
19
25
31
35
41
47
2
8
14
20
26
32
36
42
48
3
9
15
21
27
33
37
43
49
Logical
volume
Logical
volume
Logical
Partitions
4
10
16
22
28
34
38
44
50
pvdisplay <pv>
List information about a PV
Physical
Volume (PV)
Physical
Volume (PV)
vgdisplay [<vg>]
Display information about a volume group
vgremove <vg>
Delete a volume group
LV
LV
Physical
Volume (PV)
Physical
Volume (PV)
LV
physical volume
(hard disk or partition)
physical volume
PE
PE
PE
PE
PE
PE
PE
PE
PE
PE
PE
PE
PE
PE
PE
PE
PE
PE
volume group
/dev/vg00/mystripedlv
VGDA
VGDA
/etc/lvm/backup/vg_name.conf
VGDA
VGDA
VGDA
RAID
Redundant Array of Independent Disks
Typical PC hard disks, compared to expensive mainframequality hard disks, are:
Slower
Less reliable
Smaller
But less expensive
Faster
More reliable
Or larger
And still relatively inexpensive
22
23
24
RAID (1)
RAID (2)
RAID levels
RAID levels have different characteristics
RAID-5 is not "better" than RAID-1
Min #
disks
Read
performance
Write
performance
Redundancy
Data capacity
with 3x1GB
disk
Other remarks
Linear
Equal
Equal
No
3 GB
Fast
Fast
No
3 GB
Fast
Somewhat
slower
Yes
1 GB
Somewhat
faster
Slow
Yes
2 GB
Somewhat
faster
Somewhat
faster
Yes
2 GB
(*) Performance compared to a single disk, for data transfers greater than block size
Hardware RAID
Implemented in special adapter cards
Adapter needs to be supported by Linux kernel
Generally specific software needed to configure adapter correctly
(might not be available under Linux)
RAID devices show up as regular SCSI disk
Spare disks
To make RAID1/RAID5 more failsafe in case of a disk
failure, use spare disks!
# cat /etc/raidtab
...
nr-spare-disks 1
device /dev/sdd1
spare-disk 0
...
spare disk
References
Chapter 5: Input/Output, Modern Operating Systems .3rd ed,
Andrew S. Tanenbaum
Unit 8: Block devices, RAID, and LVM, Linux System
Administration I: Implementation , ERC 6.0, IBM