sys admin course physical storage and file systems fourie joubert
TRANSCRIPT
Sys Admin Course
Physical Storage and File Systems
Fourie Joubert
Sys Admin Course
Physical Storage
• Physical disks may be inside the server, or in an external enclosure
• The server may also be connected to storage in other ways, such as on a network
Sys Admin Course
• The physical disks may have platters, or be SSD
Sys Admin Course
• The disks may have different speeds• Seeks times vary from around 4ms to 15 ms• Latencies:
Sys Admin Course
• There are different types of disk interfaces– IDE (deprecated)– SCSI (mostly deprecated)– SATA– SAS– FC
Sys Admin Course
• Interface speeds– Vary from around 1Gbps to around 6Gbps
Sys Admin Course
• Connections to external disk enclosures– SAS– iSCSI– FC
Sys Admin Course
• Physical storage devices in Linux– /dev/sda– /dev/sdb– /dev/sdc
• Partitions on the disks– /dev/sda1– /dev/sda2– …
Sys Admin Course
• RAID– Redundant Array of Independent Disks
• RAID levels– RAID 0: Striping– RAID 1: Mirroring– RAID 2: Bit-level striping with dedicated Hamming-
code parity– RAID 3: Byte level striping with dedicated parity– RAID 4: Block level striping with dedicated parity– RAID 5: Block level striping with distributed parity– RAID 6: Block level striping with double distributed
parity
Sys Admin Course
• Nested RAID– RAID 0 + 1: creates a second striped set to mirror a
primary striped set– RAID 1 + 0: creates a striped set from a series of
mirrored drives
Sys Admin Course
• Hardware vs software RAID– Hardware RAID: the interface card has a dedicated
setup system• Software RAID– Managed by the operating system– mdraid (preferred)– dmraid (user space)
Sys Admin Course
Working with the partition table
• partedparted /dev/sda> print
Sys Admin Course
> mklabel type> mklabel gpt
> mkpart part-type fs-type start end
> rm number
> toggle number flag
Sys Admin Course
• gparted
Sys Admin Course
Filesystems• ext2 (old)• ext3 (old-ish)• fat16 (old win)• fat32 (old win)• hfs (apple)• jfs (IBM journalled)• linux-swap (swap)• ntfs (win)• reiserfs (old-ish)• hp-ufs (HP)• sun-ufs (Sun)• xfs (Silicon Graphics)• btrfs(btree)
Sys Admin Course
• mkfs – create a file systemmkfs –t ext4 /dev/sda3• e2label – label an e-filesysteme2label /dev/sda3 /work
Sys Admin Course
• The file system tableblkid –o list• You will get a list of your block devices, with
their /devs, labels, mount points and UUIDs
Sys Admin Course
• Looking at the fstabless /etc/fstab• 1: column is the mount id• 2: mount point (directory)• 3: fs type• 4: additional options• 5: dump options• 6: filesystem check order
Sys Admin Course
• Mounting a device manuallymount /dev/sda1
• ormount /home
Sys Admin Course
• Allowing users to do mounts• FUSE: Filesystem in user space
Sys Admin Course
• Checking a filesystemumount /homefsck.ext4 /dev/sda2fsck.ext4 –y /dev/sda2
Checking a filesystem• Repairing a filesystem
fsck –p /dev/sda2
Sys Admin Course
GUI Mode filesystem operations
• Applications -> System Tools -> Disk Utility
Sys Admin Course
More complex configurations
• Cluster file systems• Aggregate many devices under a single name
space
Sys Admin Course
Sys Admin Course