Disks. Computer Center, CS, NCTU 2 Outline  Interfaces  Geometry  Add new disks Installation procedure Filesystem check Add a disk using sysinstall.

Slides:



Advertisements
Similar presentations
Hard Disks Low-level format- organizes both sides of each platter into tracks and sectors to define where items will be stored on the disk. Partitioning:
Advertisements

1 Lecture 18: RAID n I/O bottleneck n JBOD and SLED n striping and mirroring n classic RAID levels: 1 – 5 n additional RAID levels: 6, 0+1, 10 n RAID usage.
Hard Disk Drives Chapter 7.
Faculty of Information Technology Department of Computer Science Computer Organization Chapter 7 External Memory Mohammad Sharaf.
RAID Oh yes Whats RAID? Redundant Array (of) Independent Disks. A scheme involving multiple disks which replicates data across multiple drives. Methods.
Hands-on RAID on Moxa Computer Prepared by: (40min) Date: mm-dd-yyyy.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 6:
Linux Installation LINUX INSTALLATION. Download LINUX Linux Installation To install Red Hat, you will need to download the ISO images (CD Images) of the.
“Redundant Array of Inexpensive Disks”. CONTENTS Storage devices. Optical drives. Floppy disk. Hard disk. Components of Hard disks. RAID technology. Levels.
RAID- Redundant Array of Inexpensive Drives. Purpose Provide faster data access and larger storage Provide data redundancy.
REDUNDANT ARRAY OF INEXPENSIVE DISCS RAID. What is RAID ? RAID is an acronym for Redundant Array of Independent Drives (or Disks), also known as Redundant.
RAID Technology CS350 Computer Organization Section 2 Larkin Young Rob Deaderick Amos Painter Josh Ellis.
Chapter 22 All About SCSI.
Other Disk Details. 2 Disk Formatting After manufacturing disk has no information –Is stack of platters coated with magnetizable metal oxide Before use,
Chapter 8 Adding a Disk. Computer Center, CS, NCTU 2 Disk Interface  SCSI Small Computer Systems Interface High performance and reliability  IDE (or.
Guide To UNIX Using Linux Third Edition
Chapter 8: Adding a Disk — Unix Hard Disk Basics Installation and Configuration Barry Kane CMSC-691X.
IDE and SCSI Devices Terms and Definitions.
Hard Drive.
Servers Redundant Array of Inexpensive Disks (RAID) –A group of hard disks is called a disk array FIGURE Server with redundant NICs.
Session 3 Windows Platform Dina Alkhoudari. Learning Objectives Understanding Server Storage Technologies Direct Attached Storage DAS Network-Attached.
Secondary Storage Unit 013: Systems Architecture Workbook: Secondary Storage 1G.
RAID Redundancy is the factor for development of RAID in server environments. This allows for backup of the data in the storage in the event of failure.
Copyright © 2007 Heathkit Company, Inc. All Rights Reserved PC Fundamentals Presentation 20 – The Hard Drive Interface.
Hard Drives Non-Volatile Storage. Hard Drives Hard Drives (HD) The primary storage device in a computer system.
CENG334 Introduction to Operating Systems Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL:
1 Chapter Overview CD-ROM and DVD Drives Advanced Hard Disk Drives SCSI Drives.
A+ Guide to Managing and Maintaining Your PC Fifth Edition Chapter 8 Understanding and Installing Hard Drives.
RAID Shuli Han COSC 573 Presentation.
CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Storage Systems.
RAID: High-Performance, Reliable Secondary Storage Mei Qing & Chaoxia Liao Nov. 20, 2003.
Chapter 6 Advanced Installation. Objectives  Describe the types and structure of SCSI devices  Explain the different levels of RAID and types of RAID.
Two or more disks Capacity is the same as the total capacity of the drives in the array No fault tolerance-risk of data loss is proportional to the number.
Day 10 Hardware Fault Tolerance RAID. High availability All servers should be on UPSs –2 Types Smart UPS –Serial cable connects from UPS to computer.
Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.
Disk Access. DISK STRUCTURE Sector: Smallest unit of data transfer from/to disk; 512B 2/4/8 adjacent sectors transferred together: Blocks Read/write heads.
 SCSI › Small Computer Systems Interface › High performance and reliability  IDE (or ATA) › Integrated Device Electronics (or AT Attachment) › Low cost.
Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies.
Understanding and Troubleshooting Your PC. Chapter 5: Understanding, Installing, and Troubleshooting Disk Drives2 Chapter Objectives  In this chapter,
Linux+ Guide to Linux Certification, Third Edition Chapter 6 Advanced Installation.
Storage Devices Chapter 7. Floppy Drive Overview The floppy drive subsystem consists of three main parts: ▫the electronic circuits or the controller,
Introduction to Hard Drives Chapter 6 - Key Terms Information Compiled by Diane Ferris, Michele Henderson & Vicki Kertz.
1 Selecting LAN server (Week 3, Monday 9/8/2003) © Abdou Illia, Fall 2003.
1 Interface Two most common types of interfaces –SCSI: Small Computer Systems Interface (servers and high-performance desktops) –IDE/ATA: Integrated Drive.
Disks. Computer Center, CS, NCTU 2 Outline  Interfaces  Geometry  Add new disks Installation procedure Filesystem check Add a disk using sysinstall.
A+ Guide to Managing and Maintaining your PC, 6e Chapter 8 Hard Drives (v0.9)
Sys Admin Course Physical Storage and File Systems Fourie Joubert.
Windows Server 2003 硬碟管理與磁碟機陣列 林寶森
Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2010 by Scott Orr and the Trustees of Indiana University.
System Administration – Part 2. Devices in UNIX are files: A device can be accessed with different file names All device files are stored in /dev or its.
1 CEG 2400 Fall 2012 Network Servers. 2 Network Servers Critical Network servers – Contain redundant components Power supplies Fans Memory CPU Hard Drives.
Hands-On Microsoft Windows Server 2008 Chapter 7 Configuring and Managing Data Storage.
Enhanced Availability With RAID CC5493/7493. RAID Redundant Array of Independent Disks RAID is implemented to improve: –IO throughput (speed) and –Availability.
RAID Technology By: Adarsha A,S 1BY08A03. Overview What is RAID Technology? What is RAID Technology? History of RAID History of RAID Techniques/Methods.
RAID TECHNOLOGY RASHMI ACHARYA CSE(A) RG NO
Network-Attached Storage. Network-attached storage devices Attached to a local area network, generally an Ethernet-based network environment.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 10: Mass-Storage Systems.
Chapter 8 Adding a Disk.
Disks frank.
Multiple Platters.
I/O System Chapter 5 Designed by .VAS.
IDE and SCSI Devices Terms and Definitions. Chapter Objectives After completing this chapter you will: Understand hard drive terminology. Understand the.
RAID RAID Mukesh N Tekwani
Disks.
Chapter Overview CD-ROM and DVD Drives Advanced Hard Disk Drives
Linux+ Guide to Linux Certification, Third Edition
UNIT IV RAID.
Adding a Disk Chapter 8.
RAID RAID Mukesh N Tekwani April 23, 2019
Hard disk basics Prof:R.CHARLES SILVESTER JOE Departmet of Electronics St.Joseph’s College,Trichy.
Presentation transcript:

Disks

Computer Center, CS, NCTU 2 Outline  Interfaces  Geometry  Add new disks Installation procedure Filesystem check Add a disk using sysinstall  RAID GEOM  Appendix – SCSI & SAS

Computer Center, CS, NCTU 3 Disk Interfaces  SCSI Small Computer Systems Interface High performance and reliability  IDE (or ATA) Integrated Device Electronics (or AT Attachment) Low cost Become acceptable for enterprise with the help of RAID technology  SATA Serial ATA  SAS Serial Attached SCSI  USB Universal Serial Bus Convenient to use

Computer Center, CS, NCTU 4 Disk Interfaces – ATA & SATA  ATA (AT Attachment) ATA2  PIO, DMA  LBA (Logical Block Addressing) ATA3, Ultra DMA/33/66/100/133 ATAPI (ATA Packet Interface)  CDROM, TAPE Only one device can be active at a time  SCSI support overlapping commands, command queuing, scatter- gather I/O Master-Slave 40-pin ribbon cable  SATA Serial ATA SATA-1 1.5Gbit/s, SATA-2 3Gbit/s, SATA-3 6GBit/s

Computer Center, CS, NCTU 5 Disk Interfaces – ATA & SATA Interfaces  ATA interface and it’s cable  SATA interface and it’s cable

Computer Center, CS, NCTU 6 Disk Interfaces – USB  IDE/SATA to USB Converter

Computer Center, CS, NCTU 7 Disk Geometry (1)  sector Individual data block  track circle  cylinder circle on all platters  Position CHS Cylinder, Head, Sector

Computer Center, CS, NCTU 8 Disk Geometry (2)  40G HD 4866 cylinders, 255 heads 63 sectors per track, 512 bytes per sector 512 * 63 * 4866 * 255 = 40,024,212,480 bytes 1KB = 1024 bytes 1MB = 1024 KB = 1,048,576 bytes 1GB = 1024 MB = 1,073,741,824 bytes 40,024,212,480 / 1,073,741,824 ≒ GB

Disk Installation Procedure

Computer Center, CS, NCTU 10 Disk Installation Procedure (1)  The procedure involves the following steps: Connecting the disk to the computer  IDE: master/slave  SATA  SCSI: ID, terminator  power Creating device files  Auto created by devfs Formatting the disk  Low-level format –Address information and timing marks on platters –bad sectors  Manufacturer diagnostic utility

Computer Center, CS, NCTU 11 Disk Installation Procedure (2) Partitioning and Labeling the disk  Allow the disk to be treated as a group of independent data area  root, home, swap partitions  Suggestion: –/var, /tmp  separate partition –Make a copy of root filesystem for emergency Establishing logical volumes  Combine multiple partitions into a logical volume  Software RAID technology –GEOM: geom(4) 、 geom(8) –ZFS: zpool(8) 、 zfs(8) 、 zdb(8)

Computer Center, CS, NCTU 12 Disk Installation Procedure (3) Creating UNIX filesystems within disk partitions  Use “ newfs ” to install a filesystem for a partition  Filesystem components –A set of inode storage cells –A set of data blocks –A set of superblocks –A map of the disk blocks in the filesystem –A block usage summary

Computer Center, CS, NCTU 13 Disk Installation Procedure (4)  Superblock contents –The length of a disk block –Inode table ’ s size and location –Disk block map –Usage information –Other filesystem ’ s parameters  sync –The sync() system call forces a write of dirty (modified) buffers in the block buffer cache out to disk. –The sync utility can be called to ensure that all disk writes have been completed before the processor is halted in a way not suitably done by reboot(8) or halt(8).

Computer Center, CS, NCTU 14 Disk Installation Procedure (5) mount  Bring the new partition to the filesystem tree  mount point can be any directory  # mount /dev/ad1s1e /home2 Setting up automatic mounting  Automount at boot time –/etc/fstab –% mount –t ufs /dev/ad2s1a /backup –% mount –t cd9600 –o ro,noauto /dev/acd0c /cdrom cat fstab # DeviceMountpointFstypeOptionsDumpPass# /dev/ad0s1bnoneswapsw00 /dev/ad2s1bnoneswapsw00 /dev/ad0s1a/ufsrw11 /dev/acd0/cdromcd9660ro,noauto00 /dev/ad2s1a/backupufsrw,noauto22 csduty:/bsdhome/bsdhomenfsrw,noauto00

Computer Center, CS, NCTU 15 Disk Installation Procedure (6) Setting up swapping on swap partitions  swapon, swapoff, swapctl  swapinfo, pstat

Computer Center, CS, NCTU 16 fsck – check and repair filesystem (1)  System crash will cause Inconsistency between memory image and disk contents  fsck Examine all local filesystem listed in /etc/fstab at boot time. (fsck -p) Automatically correct the following damages:  Unreferenced inodes  Inexplicably large link counts  Unused data blocks not recorded in block maps  Data blocks listed as free but used in file  Incorrect summary information in the superblock  fsck(8) 、 fsck_ffs(8)  ffsinfo(8): dump metadata

Computer Center, CS, NCTU 17 fsck – check and repair filesystem (2)  Run fsck in manual to fix serious damages Blocks claimed by more than one file Blocks claimed outside the range of the filesystem Link counts that are too small Blocks that are not accounted for Directories that refer to unallocated inodes Other errors  fsck will suggest you the action to perform Delete, repair, …

Computer Center, CS, NCTU 18 Adding a disk to FreeBSD (1) 1.Check disk connection >Look system boot message 2.Use /usr/sbin/sysinstall to install the new HD >Configure  Fdisk  Label >Don’t forget to “W” the actions >Easiest approach, but has some problems. >fdisk(8), bsdlabel(8), newfs(8) 3.Make mount point and mount it ># mkdir /home2 ># mount –t ufs /dev/ad3s1e /home2 ># df 4.Edit /etc/fstab ad3: MB at ata1-slave UDMA100

Computer Center, CS, NCTU 19 Adding a disk to FreeBSD (2)  If you forget to enable soft-update when you add the disk % umount /home2 % tunefs –n enable /dev/ad3s1e % mount –t ufs /dev/ad3s1e /home2 % mount /dev/ad0s1a on / (ufs, local, soft-updates) /dev/ad1s1e on /home (ufs, local, soft-updates) procfs on /proc (procfs, local) /dev/ad3s1e on /home2 (ufs, local, soft-updates)

RAID

Computer Center, CS, NCTU 21 RAID – (1)  Redundant Array of Inexpensive Disks A method to combine several physical hard drives into one logical unit  Depending on the type of RAID, it has the following benefits: Fault tolerance Higher throughput Real-time data recovery  RAID Level RAID 0, 1, 0+1, 2, 3, 4, 5, 6 Hierarchical RAID

Computer Center, CS, NCTU 22 RAID – (2)  Hardware RAID There is a dedicate controller to take over the whole business RAID Configuration Utility after BIOS  Create RAID array, build Array  Software RAID  GEOM –CACHE 、 CONCAT 、 ELI 、 JOURNAL 、 LABEL 、 MIRROR 、 MULTIPATH 、 NOP 、 PART 、 RAID3 、 SHSEC 、 STRIPE 、 VIRSTOR  ZFS –JBOD 、 STRIPE –MIRROR –RAID-Z 、 RAID-Z2 、 RAID-Z3

Computer Center, CS, NCTU 23 RAID 0  Stripped data intro several disks  Minimum number of drives: 2  Advantage Performance increase in proportional to n theoretically Simple to implement  Disadvantage No fault tolerance  Recommended applications Non-critical data storage Application requiring high bandwidth (such as video editing)

Computer Center, CS, NCTU 24 RAID 1  Mirror data into several disks  Minimum number of drives: 2  Advantage 100% redundancy of data  Disadvantage 100% storage overage Moderately slower write performance  Recommended application Application requiring very high availability (such as home)

Computer Center, CS, NCTU 25 RAID 0+1  Combine RAID 0 and RAID 1  Minimum number of drives: 4

Computer Center, CS, NCTU 26 RAID 2  Hamming Code ECC Each bit of data word  Advantages: "On the fly" data error correction  Disadvantages: Inefficient Very high ratio of ECC disks to data disks  Recommended Application No commercial implementations exist / not commercially viable

Computer Center, CS, NCTU 27 RAID 3  Parallel transfer with Parity  Minimum number of drives: 3  Advantages: Very high data transfer rate  Disadvantages: Transaction rate equal to that of a single disk drive at best  Recommended Application Any application requiring high throughput

Computer Center, CS, NCTU 28 RAID 4  Similar to RAID3  RAID 3 V.S RAID 4 Byte Level V.S Block Level Block interleaving

Computer Center, CS, NCTU 29 RAID 5  Independent Disk with distributed parity blocks  Minimum number of drives: 3  Advantage Highest read data rate Medium write data rate  Disadvantage Disk failure has a medium impact on throughput Complex controller design When one disk failed, you have to rebuild the RAID array “write hole”

Computer Center, CS, NCTU 30 RAID 6  Similar to RAID5  Minimum number of drives: 4  2 parity checks, 2 disk failures tolerable.

GEOM Modular Disk Transformation Framework

Computer Center, CS, NCTU 32 GEOM – (1)  Support ELI – geli(8): cryptographic GEOM class JOURNAL – gjournal(8): journaled devices LABEL – glabel(8): disk labelization MIRROR – gmirror(8): mirrored devices STRIPE – gstripe(8): striped devices …

Computer Center, CS, NCTU 33 GEOM – (2)  GEOM framework in FreeBSD Major RAID control utilities Kernel modules (/boot/kernel/geom_*) Name and Prodivers  “manual” or “automatic”  Metadata in the last sector of the providers  Kernel support {glabel,gmirror,gstripe,g*} load/unload  deviceGEOM_* in kernel config  geom_*_enable=“YES” in /boot/loader.conf

Computer Center, CS, NCTU 34 GEOM – (3)  LABEL Used for GEOM provider labelization. Kernel  deviceGEOM_LABEL  geom_label_load=“YES” glabel  # glabel label -v usr da2  # newfs /dev/label/usr  # mount /dev/label/usr /usr  # glabel stop usr  # glabel clear da2 UFS label  # tunefs -L data /dev/da4s1a  # mount /dev/ufs/data /mnt/data

Computer Center, CS, NCTU 35 GEOM – (4)  MIRROR Used for GEOM provider labelization. Kernel  deviceGEOM_MIRROR  geom_mirror_load=“YES” gmirror  # gmirror label -v -b round-robin data da0  # newfs /dev/mirror/data  # mount /dev/mirror/data /mnt  # gmirror insert data da1  # gmirror forget data  # gmirror insert data da1  # gmirror stop data  # gmirror clear da0

Computer Center, CS, NCTU 36 GEOM – (5)  STRIPE Used for GEOM provider labelization. Kernel  deviceGEOM_STRIPE  geom_stripe_load=“YES” gstripe  # gstripe label -v -s data da0 da1 da2 da3  # newfs /dev/stripe/data  # mount /dev/stripe/data /mnt  # gstripe stop data  # gstripe clear da0

Appendix SCSI & SAS

Computer Center, CS, NCTU 38 Disk Interfaces – SCSI Interface Evolution VersionFreq.WidthSpeedLengthDiff. SCSI-15MHz8 bits5MB/s6m25m SCSI-25MHz8 bits5MB/s6m25m SCSI-2 Fast10MHz8 bits10MB/s3m25m SCSI-2 Fast Wide10MHz16 bits20MB/s3m25m Ultra SCSI20MHz8 bits20MB/s1.5m25m Ultra Wide SCSI20MHz16 bits40MB/s1.5m25m Ultra2 SCSI40MHz16 bits80MB/s-12m Ultra160 SCSI80MHz16 bits160MB/s-12m Ultra320 SCSI160MHz16 bits320MB/s-12m

Computer Center, CS, NCTU 39 Disk Interfaces – SCSI Interface Connector

Computer Center, CS, NCTU 40 Disk Interfaces – SCSI Interface  Daisy chain on SCSI bus Most external devices have two SCSI ports Terminator  Each SCSI device has a SCSI ID

Computer Center, CS, NCTU 41 Disk Interfaces – SAS  SAS – Serial Attached SCSI  SAS vs parallel SCSI SAS uses Serial transfer protocol to interface multiple devices hence lesser signaling overhead than parallel SCSI, resulting in higher speed. No bus contention as SAS bus is point-to-point while SCSI bus is multidrop. Each device is connected by a dedicated bus to the initiator. Connection through expanders may appear to cause some contention, but this is transparent to the initiator. SAS has no termination issues and does not require terminator packs like parallel SCSI. SAS eliminates skew. SAS supports higher number of devices (> 16384) while Parallel SCSI limits it to 16 or 32. SAS supports higher transfer speed (1.5, 3.0 or 6.0 Gbps). The speed is realized on each initiator-target connection, hence higher throughput whereas in parallel SCSI the speed is shared across the entire multidrop bus.Gbps SAS supports SATA devices. SAS uses SCSI commands to interface with SAS End devices.