320 likes | 459 Views
Lecture 11: Sys Admin-D. Linux OS Info Backups RAID Arrays System Restore Virtual Machines. Linux OS Info. Let’s say I put a new system in front of you I want you to tell me some very basic things about the OS What can you tell me about it? (… esides ifconfig and route). Linux OS Info.
E N D
Lecture 11: Sys Admin-D • Linux OS Info • Backups • RAID Arrays • System Restore • Virtual Machines
Linux OS Info • Let’s say I put a new system in front of you • I want you to tell me some very basic things about the OS • What can you tell me about it? • (…esidesifconfig and route)
Linux OS Info • uname -a • Prints basic info of current system
Linux OS Info • uname -a • Prints basic info of current system • lshw • “List hardware”
Linux OS Info • uname -a • Prints basic info of current system • lshw • “List hardware” • motd • “Message of the day”
Linux OS Info • uname -a • Prints basic info of current system • lshw • “List hardware” • motd • “Message of the day” • w or who • List info about users that are logged in
Linux OS Info • uname -a • Prints basic info of current system • lshw • “List hardware” • motd • “Message of the day” • w or who • List info about users that are logged in • netstat • List info about network setup
Linux OS Info • uname -a • Prints basic info of current system • lshw • “List hardware” • motd • “Message of the day” • w or who • List info about users that are logged in • netstat • List info about network setup • dpkg -l • List packages current installed
Backups • I have some rather important files • They are CEG2350 grades • I need proof to give out a non-F • How can I be sure that I’ll always have a copy these files?
Backups • Let’s make a copy of the file! • When do we copy it? • Continuously? • Incrementally?
Backups • Let’s make a copy of the file! • When do we copy it? • Continuously? • We’d spend all our time doing it • Incrementally? • Only when there are changes • Where do we copy it to?
Backups • Let’s make a copy of the file! • When do we copy it? • Continuously? • We’d spend all our time doing it • Incrementally? • Only when there are changes • Where do we copy it to? • Need a different physical drive to really make a difference • Locations external to local computer are highly preferred
Backup Tools • Duplicity • Linux solution • Uploads encrypted directories to remote filesystem as they’re changed • Only changes are backed up • Encryption keeps your stuff safe • Bacula • Both Windows and Linux • Meant more for enterprise-level systems
The Future • Sometimes we want a bigger drive • …but cannot afford this one
The Future • Sometimes we want a faster drive • …but cannot afford this one
The Future • So how do we do things like that? • We RAID us up some hard drives! >.< • Redundant Array of Inexpensive/Independent Disks • Essentially, using 2+ HDDs to make a “better” HDD.
Future Disclaimers • Subsequent discussions make the following assumption: Real-world hardware is capable of mimicking our upcoming theoretical discussion. • If someone is paying you, don’t make this assumption.
RAID 0 • Split the data between 2 (or more) drives • Usually quicker to read/write • Sometimes it’s SLOWER • Provides no backup
RAID 1 • Make a “mirror image” of a drive • Now I have 2+ identical copies of my stuff • Reading has improved • Writing hasn’t changed • Still have to copy data to ALL drives • As long as one drive is alive, your data is safe • Replace your broken drive quickly
RAID 2 • Stripes data across multiple drives (bit-level) • 4 data bits, 3 parity bits • Allows detection of all “common” errors • No one uses this one • Transplanted RAID 2 good stuff to other RAID standards • Made this one kinda old
RAID 3 • Stripes data across multiple disks • Byte-level • Dedicated disk for parity • Typically only gets one hunk of data at a time • Data in same place on all disks, so need synchronized HDDs
RAID 4 • Block-level striping • Has a dedicated parity drive
RAID 5 • Stripes data across multiple drives (block-level) • Parity is distributed across drives
RAID 6 • Identical to RAID 5 except… • Has another parity block= • Increased redundancy • Reads as fast as RAID 5 • Writes slower • 2nd parity block
Other RAIDs • There are lots of variations on the common RAID arrays • Some are (notably) better • Some are crappy • Most all are proprietary and not widely accepted
System Restore • Sometimes things we do are risky • Updating windows • Playing with drivers • We want to be sure we can fix our computer if we hose it • So, how can we achieve this? • System restore!
System Restore • System restore… • …copies critical system files to another directory, and… • …makes a backup of affected registry values before they get changed • If something goes wrong, we can attempt to restore these • Backups are in “System Volume Information” • It’s a hidden directory in root of drive
Virtual Machines • I wish to embed an entire computer within my current OS • Computer is both hardware and software • I do this with a “virtual machine” • The hardware of the computer is faked • The software runs “natively”
VM Hardware • So what all is faked? • CPU • RAM • Graphics Card • Mouse/Keyboard • Hard drive • CD-ROM(s) • etc
VM Hardware • Running a virtual machine takes actual computer resources • If a VM has “1GB of RAM,” it takes 1GB of RAM from our host computer • Some resources must be shared • Only 1 computer can have CD-ROM access at a time
VM Software • Each VM is independent of any others • They’re completely different computers! • Each VM is dependent on the others • If a VM is using a lot of resources, other VMs may suffer (or vice-versa)
VM Tools • Virtual Box • In both Windows and Linux • Virtual PC • Windows-only • We expect that you will learn to use these on your own • http://www.cs.wright.edu/~pmateti/Courses/2350/Labs/SysAdmin/SysAdminLab.html#Virtual-Machines