Materi-CE542-M08-Managing Partitions
Materi-CE542-M08-Managing Partitions
Materi-CE542-M08-Managing Partitions
CE542-System Administration
Managing Partitions
Dareen K. Halim
Hargyo Tri Nugroho (slides originator)
Target competencies
Code Description
SUB-CPMK 11 Mahasiswa dapat melakukan pengaturan partisi dengan
berbagai macam file system – C3
2
Contents
• MBR vs GPT partitions
• Creating partition (the traditional way)
• Logical Volume Management (LVM)
• Definition
• Creating partitions with LVM
• Creating File System & Mounting
3
MBR vs GPT
4
Undertanding MBR and GPT
• We need at least one partition to use a harddrive
• MBR (master boot record) partitioning scheme has been used
since 1982
• Allocated during booting
• The MBR contains all that is needed to start a computer, including a boot loader and
a partition table.
• was defined as the first 512 bytes on a computer hard drive (includes boot loader
and a partition table.
• the partition table size is 64 bytes, with up to 4 partitions could be created.
• Max partition size was limited to 2 TiB (hardly a problem in the early 1980s).
Partition limit in MBR
• Try creating 5 new partitions in MBR disk. Notice something?
• You can only have 4 primary partitions
• Logical partition to the rescue!
Undertanding MBR and GPT
• Current computer hard drives have become too big to be addressed by MBR partitions.
• GPT (GUID Partitioning Table) is a must for computers that using UEFI (Unified
Extensible Firmware Interface) but is still compatible for BIOS based computers
• The maximum partition size is 8 zebibyte (ZiB), which is 1024 * 1024 * 1024 *1024 gibibytes.
• In GPT, up to a maximum number of 128 partitions can be created.
• The 2 TiB limit no longer exists.
• Because space that is available to store partitions is much bigger than 64 bytes which was used in
MBR, there is no longer a need to distinguish between primary, extended, and logical partitions.
• GPT uses a 128-bit global unique ID (GUID) to identify partitions.
• A backup copy of the GUID partition table is created by default at the end of the disk, which
eliminates the single point of failure that exists on MBR partition tables.
Partition limit in GPT
• GPT provides maximum of 128 primary partitions
8
Understanding Measurement Units
Understanding disk types
Creating partition
The traditional way
- fdisk (MBR)
- gdisk (GPT) - supplementary
11
Creating MBR partition with fdisk
Creating MBR partition with fdisk
Creating MBR partition with fdisk
Creating MBR
partition with fdisk
Creating MBR
partition with fdisk
Creating MBR partition with fdisk
• Normally, the flow goes like this after we created the partitions
Create file
Partition Mount
system
17
Logical Volume Management
Definition
Creating partitions with LVM
23
LVM Logical Volume
35
Creating File System
Creating File System
Creating Swap Partition
Mounting File Systems
Some information for mounting file system:
• What to mount Name of devices to be mounted
• Where to mount Directory on which the device will be
mounted
• What file system to mount Optional, may not be necessary
• Mount options
Auto mount with fstab
Auto mount with fstab
Auto mount with fstab
Exercise
• Go to ‘RH199 8.0 Student Guide’ book, page 291
• Self-study the ‘Managing swap space’ part.
• If you have understood the previous steps, this should be easy!
• Previous steps work with hard drives as permanent storage
• Swap works with memory, i.e., using hard drives as ‘virtual memory’
• You can do the exercise with the OVA, or with your own self-
installed VM
44
Assignment
• Later at E-learning about extending LVM
45