NASA LAB RAID / Partition / LVM
Chiachi / Tinray Before We Start
Download what we need for today. linux1 linux2 linux3 linux4 google drive
Username : nasa Password : nasa2018 Levels of Storage ● Application Application Read/Write on filesystem.
● Filesystem Filesystem Handle lock, permission, journaling … Ex : ext 2/3/4 , xfs, NTFS, FAT32 Block Device ● Block device What really stores things. RAID Redundant Arrays of Independent Disks
Disk
Disk Virtual Disk Operating Disk RAID X System
Disk Virtual Disk Disk Why RAID?
1. Performance 2. Reliability 3. Storage pooling Performance
Example : RAID 0 Reliability
Example : RAID 1 More About RAID
RAID 1+0, RAID 0+1 (combination of RAID 0 & RAID 1)
RAID 5 , RAID 6 …
Wiki Partition Why Partitioning?
1. Separate OS and personal data 2. Multiple operating systems 3. Make backup more flexible 4. Improve performance (smaller partition) MBR
Primary Partition
Extended Partition
Logical Partition parted
LV LV LVM
Logical Volume Manager VG
PV PV PV PV PV
Disk Disk Disk Partition Partition Why LVM? 1. Storage pooling 2. Resizing 3. Snapshots PV Stage pvcreate
Then you can use Terminal or Git BASH to ssh on the virtual machine.
ssh [email protected] Goal /dev/sdb
● Use GPT partition table
● Create first partition with size 16G and xfs filesystem
● Create second partition with the rest of the size and label as
lvm Goal ● Create a volume group “nasa-vg” with the second partition of
/dev/sdb and the entire /dev/sdc
● Create a logical volume with 30G name “lv-
and ext4 filesystem Goal ● Mount the first partition of /dev/sdb under /backup
● Mount /dev/nasavg/lv-
See block devices as well as partitions even not mounted.
● df -h
See usage of mounted partitions. Useful commands ● mkfs -t
● mount