Lesson 5 Data RAID & Backup (1).pptx

Full Transcript

Lesson 5 - Symbolic Links RAID Systems & File Backups File Linking Data security RAID systems File Backup & Restore INFO12 Operating System 18 Fundamentals 3 In a tree directory structure with several layers of subdir...

Lesson 5 - Symbolic Links RAID Systems & File Backups File Linking Data security RAID systems File Backup & Restore INFO12 Operating System 18 Fundamentals 3 In a tree directory structure with several layers of subdirectories managing files and directories can be complicated Having users traverse multiple directories to find the files they need can lead to errors and complex permission settings The best solution is to use file and directory linking The file link will acts as an advanced shortcut so the exact path does not have to be specified each time you access the file The link is a pointer to the file location INFO12 Operating System 18 Fundamentals 4 Symbolic links act as a shortcut to a file path Windows supports soft links (junctions), symlinks and hard links Administrator privilege level is required to create symbolic links, hard links but not junctions. Windows documentation refers to soft links as junctions which are for directory links only. Symlinks (symbolic links) can be applied to both files and directories Symlinks links can point to directories and files on other volumes INFO12 Operating System 18 Fundamentals 5 Hard Links works only with files The file and all its links must be on the same volume A count of the number of directories to which a file is linked must be kept in the files metadata to prevent the space used by the file from being freed until all links to the file have been removed A single set of access permissions applies to all links to the file The original file is indistinguishable from its links INFO12 Operating System 18 Fundamentals 6 The Windows mklink command is used to create both hard links and soft (junctions) and symbolic links mklink new1.duh \info1218\felix.exe The above command creates a shortcut new1.duh that represents the complete path to the Felix program new1.duh can be copied to other directories and the link is maintained Activity 5 will create Windows symbolic links Both symlinks & hard links INFO12 Operating System 18 Fundamentals 7 Windows Symbolic Links https://www.howtogeek.com/howto/16226/complete-guide-to - symbolic-links-symlinks-on-windows-or-linux/ Understanding NTFS Hard Links, Junctions and Symbolic Links (2 brightsparks.com) INFO12 Operating System 18 Fundamentals 8 Plan for the ongoing operation of the business in the event of a disaster Plan to mitigate the impact on business operations Maintain mission critical services Risk assessment and safeguards Natural disaster such flood, wind, fire, earthquake Loss of electrical power Cyber attack Ransomware & DDoS Terrorist attack, vandalism, theft INFO12 Operating System 18 Fundamentals 9 Disaster recovery plans are steps to take when a disaster occurs at main business operation centre Hot site Parallel operation (mirror) in full working order Failover site with zero downtime Warm site Can be brought up to active service in 12hrs (?) Data must be restored from backups Cold site Office space on standby with little or no equipment Will take several days to re-establish operations INFO12 Operating System 18 Fundamentals 10 Power failure Backup generator 2 power line sources from utility UPS –Uninterruptible power supply Battery power to server for 30 min to allow graceful shutdown Data file backup plans RAID Redundant Array of Independent Disks INFO12 Operating System 18 Fundamentals 11 The smallest unit of storage on a physical disk was described as a sector which stores 512 bytes of data The file system allocates physical sectors into groups called clusters File allocation unit to file system Disk blocks to drive controller. From the operating system perspective, clusters are the smallest unit of data that is written to or read from disk. The number of sectors in a cluster varies with the size of the disk 2048, 4096, 8192, 16536,… INFO12 Operating System 18 Fundamentals 12 When the last cluster used to store the data for a file is not full, the space is unused and is call internal fragmentation. This space cannot be used in any other file. However, if more data is added to the file, this space will be filled before another cluster is added to the file Internal fragmentation does not have an impact on disk performance INFO12 Operating System 18 Fundamentals 13 When a new file is saved to disk, the operating system will attempt to write the file to the first available group of clusters The clusters used to store the file may be located at many different tracks and sectors on the disk When the clusters that store the file are not contiguous it is termed External fragmentation Caused by normal file deletion INFO12 Operating System 18 Fundamentals 14 Fragmentation makes efficient use of disk space but causes extra disk head movement for both reading and writing the file The normal disk operation will eventually cause the disk mechanics to break down Some operating systems include utilities that attempt to move files around on disk to reduce external fragmentation defrag INFO12 Operating System 18 Fundamentals 15 Security of data requires a plan to save and restore data in the event that the disk fails CIA requires that data be available INFO12 Operating System 18 Fundamentals 16 Security of data extends beyond the privacy and confidentiality provided by the access control of file permissions Data must also be available when needed for business operations 2 considerations are hard disk failures and data backup Redundant Array of Independent Disks (RAID) is a solution for disk failures Data file backup methods ensure data is stored and can be retrieved in case of equipment failure or data erasure Accidental or by cyber attack INFO12 Operating System 18 Fundamentals 17 Redundant Array of Independent Disks RAID works by placing data on multiple disks and allowing input/output (I/O) operations to each disk at same time RAID arrays appear to the operating system (OS) as a single logical hard disk. RAID employs disk mirroring and disk striping. Mirroring copies identical data onto more than one drive. Striping writes data to multiple disks INFO12 Operating System 18 Fundamentals 18 Disk Mirroring provides data security in the event of a failure of one of the mirrored disks The other disk is an exact copy of the failed disk Disk Striping distributes the contents of files roughly equally among all disks in the array Concurrent read or write operations on the multiple disks results in performance improvements Striping can be at bit, byte or block level With bit striping each sequential bit is on a different drive With byte striping each sequential byte is on a different drive With block striping each sequential block of data is on a different drive INFO12 Operating System 18 Fundamentals 19 Striping provides data security if parity is implemented Fault tolerance Parity is a check on the data bits in a byte to ensure no bits are corrupted After a failed drive is replaced, the RAID controller rebuilds the lost data from the other drives based on the parity information. Original RAID specs used a separate parity disk Newer RAID specs distribute the parity information on multiple disks in the array INFO12 Operating System 18 Fundamentals 20 Parity is an integrity check on the data bits. If a data byte is corrupted it can be detected with the parity bit added to the byte of data Even Parity If the number of 1s in a byte is an odd number the parity bit is set to 1 to make the total count of 1s an even number Odd Parity If the number of 1s in a byte is an even number the parity bit is set to 1 to make the total count of 1s an odd number If a data bit changed from a 0 to a 1 then the parity bit would be incorrect and the error is detected INFO12 Operating System 18 Fundamentals 21 Parity can only detect the error but can not tell which bit in the byte is corrupted Originally used in telecom systems which would retransmit the failed byte INFO12 Operating System 18 Fundamentals 22 RAID parity is used to determine which data bytes have been corrupted or lost due to hard drive mechanical failure The bytes stored on the failed drive can then be reconstructed on a new drive Original RAID striping standards with parity implemented Hamming-code parity Math calculation on data byte to determine which bit was incorrect INFO12 Operating System 18 Fundamentals 23 AND OR XOR. XY=Z XY=Z XY=Z 00=0 00=0 00=0 01=0 01=1 01=1 10=0 10=1 10=1 11=1 11=1 11=0 Inputs to the function are X & Y output is Z For AND both inputs must be a 1 to result in a 1 output For OR if one or the other input is a 1 the result is a 1 output XOR – (Exclusive OR) exclude result when both inputs are a 1 INFO12 Operating System 18 Fundamentals 24 RAID 3 parity is computed by XOR'ing a byte from disk 1 with a byte from disk 2 and storing the result on disk 3 Disk 3 is the parity drive Disk 1 01101101 Disk 2 11010100 Disk 3 10111001 (XOR result of Disk 1 & Disk 2) If the data byte on Disk 1 is corrupted adding the XOR value stored on Disk 3 to the Disk 2 value will result in the Disk 1 data byte being recovered Recovery of data calculation Disk 3 10111001 Disk 2 11010100 Disk 1 01101101 (XOR result of Disk 3 & Disk 2) INFO12 Operating System 18 Fundamentals 25 RAID 0 RAID 3 Block Striping without parity Byte striping with parity RAID 1 Dedicated disk for parity Disk mirroring RAID 4 Simultaneous writes Block striping with parity Independent reads from each disk Dedicated disk for parity for faster read request RAID 2 Bit striping with parity Hamming-code parity INFO12 Operating System 18 Fundamentals 26 RAID 5 Block striping with distributed parity Parity data bytes are not stored on a separate disk but are distributed on other disks in the array Most common parity RAID system RAID 6 Block striping with double distributed parity Recovers from 2 failed drives Implement in large data stores RAID 1 + 0 Combines data mirroring and striping RAID levels 2, 3 and 4 not used Standards created but vendors did not build equipment using those specs INFO12 Operating System 18 Fundamentals 27 RAID can be implemented with special disk controllers or software RAID disk controllers Fast - all disks in an array connected to a single controller Often allows a defective disk to be swapped without shutting down the system Hot swapping RAID Software (usually part of the operating system) Slower Normal system activity may be interrupted in order to replace a defective disk and rebuild the array Supported by both Windows and Linux INFO12 Operating System 18 Fundamentals 28 Even with RAID systems file backup is still required in case of disasters such as fire or storm May destroy building and all contents Data backup involves storing a copy of files from the hard drive to another off site storage device 3 backup strategies Full, Incremental and Differential When a file is created or altered the O/S will set the archive bit (A) attribute INFO12 Operating System 18 Fundamentals 29 Full Backup Will copy all files and remove the archive (A) attribute When a file is changed and saved to the disk the archive attribute bit (A) is set on that file This method involves copying all selected files and folders regardless of whether they have changed since the last backup Differential Backup Saves the data files that have changed since the last full backup Saves only files with archive bit set The archive bit is not changed Each differential backup always contains all files altered since the last full backup Faster to backup files than full backup INFO12 Operating System 18 Fundamentals 30 Incremental Backup Saves the data files that have archive bit set The archive bit is removed Each incremental backup always contains only files altered since the last incremental backup Faster backup than differential (fewer files in each backup) INFO12 Operating System 18 Fundamentals 31 Full Backup All files are copied from backup file store This strategy typically requires the longest backup window but offers the fastest restore times Differential Backup Shorter recovery time Only files changed since the full backup need to be restored Only one restore operation Incremental Backup Multiple restore operations Each individual incremental backup must be restored INFO12 Operating System 18 Fundamentals 32 Incremental offers faster daily backups Fewer files in each backup Slower recovery as several backup operations are required Differential offers faster recovery Fewer files than full backup Only one recovery operation Each file backup takes longer The method to be used depends on business operations ROI –cost of backup vs cost of lost business to recover INFO12 Operating System 18 Fundamentals 33 Backup Schedule 1 Full backup on Sunday night each week Incremental at end of each day If disk fails on Thursday restore last full backup Restore incremental for Monday, Tuesday, Wednesday Backup Schedule 2 Full backup on Sunday night each week Differential at end of each day If disk fails on Thursday restore last full backup Restore differential for Wednesday INFO12 Operating System 18 Fundamentals 34 Silberschatz, A., Galvin, P.B., Gagne, G., Operating System Concepts, Essentials 2 nd Edition John Wiley & Sons, Inc., 2014 (the course textbook) Chapter 9 - RAID Pg. 458-471 Chapter 10 - Backup Pg. 544-545 INFO12 Operating System 18 Fundamentals 35

Use Quizgecko on...
Browser
Browser