0% found this document useful (0 votes)
522 views23 pages

Disk Attachment: Host Attached Storage Network Attached Storage

Host attached storage uses I/O ports to connect directly to devices like hard disks and CD drives. Network attached storage connects storage systems remotely over a network. A storage area network uses a private network to connect servers and storage units, allowing storage to be allocated dynamically to hosts. Disk formatting prepares disks for use by initializing sector mappings and allocating space for file systems. Boot blocks contain code to initialize systems during startup. Bad blocks are defective sectors that are mapped out and replaced with spare sectors.

Uploaded by

noshit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
522 views23 pages

Disk Attachment: Host Attached Storage Network Attached Storage

Host attached storage uses I/O ports to connect directly to devices like hard disks and CD drives. Network attached storage connects storage systems remotely over a network. A storage area network uses a private network to connect servers and storage units, allowing storage to be allocated dynamically to hosts. Disk formatting prepares disks for use by initializing sector mappings and allocating space for file systems. Boot blocks contain code to initialize systems during startup. Bad blocks are defective sectors that are mapped out and replaced with spare sectors.

Uploaded by

noshit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Disk Attachment

 Host Attached Storage


 Network Attached Storage
Host Attached Storage
 Accessed using I/O ports.
 Pc use I/O bus architecture that supports a maximum of 2 drives.
 High end work stations use fiber channel that operates over
optical fiber. It is of two types:
1. 24-bit address space which is a basis of SAN’s.
2. Arbitrated loops that address 126 devices.
 Examples are hard disks, CD, DVD, tape drives etc.
Network Attached Storage

 Special purpose storage system accessed remotely over the


network using TCP or UDP.
 Implemented as RAID arrays.
 Still lesser in performance and efficiency when compared to
direct attached storage.
 They use bandwidth on data networks which leads to an increase
in latency of network communication.
Storage Area Network

 Private network that connects servers and storage units.


 Multiple hosts and storages can be attached to the same SAN.
 A SAN switch allows or prohibits access between host and
storage.
 Storage is allocated dynamically to the hosts
Disk Management

 Disk Formatting
 Boot Blocks
 Bad Blocks
Disk Formatting

 Low Level Formatting


Fills the disk with a special data structure for each sector.
This data structure typically consists of a header, a data area and   
trailer. 
 The header and trailer contain info used by disk controller:
1) Sector number 
2) Error Correcting Code (ECC)
 The ECC can identify which bits have changed and what the
correct values should be.
 Low level formatting is done at the factory as a part of
manufacturing process.
 Enables manufacturer to test the disk and initialize the mapping
from logical block numbers to detect free sectors on this disk.
 Typical data area sizes: 256, 512 and 1024 bytes.
 Larger sector size implies:
1) Fewer sectors on each track
2) Fewer header and trailers
3) More space for user data.
 Usually OS handles sector area of 512 bytes.
 Before OS can use a disk to hold files, it needs to record its own
data structures on the disk.
 Two steps are involved here:
1) Partition the disk into one or more groups of cylinders.
2) Logical formatting or creation of a file system.
 For increasing efficiency, most file systems group blocks together
into clusters. Disk I/O done via blocks. File system I/O done via
clusters.
 Some OS give special programs ability to use a disk partition as a
large sequential array of logical blocks, without any file system
data structures. This is called a raw disk.
Boot Block

 Bootstrap Program: 
Initializes all aspects of the system, from CPU registers to device
controllers and the contents of main memory, and then starts the OS.
 Bootstrap Program -> OS Kernel -> Memory -> Address -> Execution
 Usually loaded in ROM. But this would result in difficulties in
changing the bootstrap code as it would require changing the ROM
hardware chips.
 Bootstrap loader program in boot ROM which brings the full
bootstrap program from the disk. The code in boot ROM instructs
disk controller to bring the boot blocks into memory and then starts
executing the code.
Booting in Windows
Bad Blocks

 Disks are prone to failure. This may occur frequently and some
sectors may be defective right from the manufacturing process.
 Based on the type of disks, bad blocks are handled in an
appropriate manner:
 In the case of simple disks, the bad blocks are handled in
manually. Disk is scanned to find bad blocks while disk is being
formatted. Flagged unusable if found.
 If blocks become defective during normal operation, a special
program must be run manually to search and lock the bad blocks.
 In the case of sophisticated disks, the controller maintains a list of
bad blocks right from the process of low level formatting at factory.
 It also sets aside spare sectors not visible to the OS.
 The controller can be told to replace each bad sector logically with
one of the spares. This is called Sector Sparing or Forwarding.
 Most sectors are formatted to provide a few spare sectors in each
cylinder.
 Another alternative is sector slipping.
 Soft Errors: Spared or Slipped
 Hard Errors: Data is lost
RAID STRUCTURE

 RAID stands for redundant arrays of independent disks.


 Drive disks have become smaller and cheaper, so many disks are
used, which presents the opportunity to improve the rate of read
and write.
 The ‘I’ in raid used to stand for inexpensive but later it started to
be used for other reasons such as their high data transfer rate
and reliability.
Improvement of reliability via
redundancy
 The chance of some disks out of ‘N’ disks failing is more than that
of a particular disk failing.
 Suppose we make a copy(redundancy) of the disk onto another
one, then the data is lost only when the 2nd disk also fails before
the 1st disk is written. This increases the man time of data loss
multiple times.
 As a disk gets old it’s probability of failure increases.
 Power failures during a write are very bad. To prevent the loss of
data to large extents we write data on 1 disk first and then onto
the other so that atleast one copy is ready instead of parallel
writes.
Improvement in Performance via
Parallelism
 Data transfer rate can be improved by striping data across the disks.
 Data striping consists of splitting the bits of each byte across
multiple disks.
 Logically, the array of eight disks can be treated as a single disk.
 Sectors are 8 times the normal size.
 Access rate is 8 times faster.
 Block level striping involves striping of blocks.
 Parallelism has two main goals :
1) Increase the throughput of multiple page access by load balancing.
2) Reduce the response time of large accesses.
RAID levels

 Mirroring is highly reliable but expensive.


 Striping gives high data transfer rate but doesn’t improve
reliability.
 Schemes to provide redundancy at lower costs using a
combination of parity and striping have been developed.
 They have different cost-performance tradeoff.
RAID Levels
Implementation of RAID

 Volume Management software can implement RAID within the


kernel or system software level. Parity RAID is fairly slow when
implemented in software. So RAID 0, 1 or 0+1 is used.
 Can be implemented on the host bus adapter (HBA) hardware.
 Can be used in hardware of storage array.
 In Storage Area Network, RAID provides mirroring by writing each
block to two separate storage devices.
 Features like Snapshots and Replication can be implemented.
 Hot Spare Disks are used in RAID.
Selecting RAID levels

 Rebuild performance: Ability to repair damaged data.


 Easiest for RAID level 1 as data is copied directly unlike the other
levels where we need to access all the other disks.
Raid Level Uses
0 High performance applications.
1 Places that require high reliability
with fast recovery.
5 Places where large volume of
data is involved.
6 Not supported by current RAID
implementations.
0+1 or 1+0 Places where performance and
reliability is important.
Problems with RAID

 It does not make sure data is always available, sometimes the


required data might have been over-written or corrupt.
 It prevents physical media errors but not hardware and software
errors.
 The Solaris ZFS solves the above problems through checksum.
 Lack of flexibility: Variable disk sizes are not supported by most
volume managers. Even if they are then file managers do not. So
to take advantage the files have to be recreated each time the size
changes.
 Disks or their partitions are gathered together via RAID sets into
pools of storage, where each pool can hold more than one ZFS file
system.
Extensions

 Arrays of tapes
 Broadcast of Data

You might also like