GROUP 18 - Storage Device Management
GROUP 18 - Storage Device Management
GROUP 18
20/U/5769/PS
OTHIENO BENEDICT ERNEST 2000708078 20/U/8078/Eve
SSEMBATYA DAVID 2000705693 20/U/5693/EVE
MUKISA SAMUEL OWEKITIIBWA 2000705673 20/U/5673/EVE
MUWANGUZI CYRUS 2000705723 20/U/5723/PS
STORAGE DEVICE MANAGEMENT
Storage Device Management
Before a storage device can store data, it must be divided into sectors that the
controller can read and write, the NVM pages must be initialized and FTL created
in a process called low-level formatting/ Physical formatting.
NVM (Non Volatile Memory): is a semiconductor technology that does not require
a continuous power supply to retain the data or program code stored in a
computing device.
FTL(Flash Translation Layer): is software that lets an operating system read and
write flash-based storage modules as if they were rotating disk drives.
Low-Level Formatting –is the process of outlining the positions of the tracks and
sectors on the hard disk, and writing the control structures that define where the
tracks and sectors are. This is often called a "true" formatting operation, because it
really creates the physical format that defines where the data is stored on the disk.
The data/control structure consists of the header, data area and trailer. The header
and trailer contain information used by the controller such as sector/page number
and error detection/ correction code.
Data structures enable OS to:-
• Manage the space on the disk
• Keep track of files
• Manage defective areas so they don’t cause problems.
The involves partitioning the drive into one or more groups of blocks or
pages. The OS can then treat each partition as though It were a separate
device.
Creating a partition on a hard drive enables it to support separate file
systems, each in its own partition and each file system can then use its
own method to allocate file space in logical units called clusters or
allocation units.
Some OSes and file systems perform the partitioning automatically when
the entire device is to be managed by the file system.
The partition information is written in a fixed format at a fixed location on a
storage device.
The device, when recognized by the operating system, has its partition
information read, and the operating system then creates device entries
for the partitions.
Mounting a file system is making the file system available for use by the
system and its users.
Step 2: Volume Creation and
Management
Sometime this step is implicit:- when a file is placed directly within a partition, that volume is
then ready to be mounted and used.
Other time the step is explicit:- for example when multiple partitions or devices are used
together as a RAID set, with one or more file systems spread across the devices.
Step 3: Logical Formatting
In this step, the OS stores the initial file system data structure onto the
device.
The data structure may include maps of free and allocated space, an initial
empty directory.
The partition information also indicates if a partition contains a bootable
file system (containing the operating system). The partition labeled for boot
is used to establish the root of the file system and once it is mounted,
device links for all other devices and their partitions can be created.
A computer’s file system mainly consists of all mounted volumes; For
example on Windows, these are separately named via a letter (C:, D:, E:).
On Windows, the file system interface makes it clear when a given device is being used.
Figure shows the Windows 7 Disk Management tool displaying three volumes (C:, E:, and F:).
Note that E: and F: are each in a partition of the “Disk 1” device and that there is unallocated
space on that device for more partitions
To increase efficiency, most file systems group blocks together into larger chunks, frequently
called clusters.
Device I/O is done via blocks, but file system I/O is done via clusters, effectively assuring that
I/O has more sequential-access and fewer random-access characteristics.
File systems try to group file contents near its metadata as well, reducing HDD head seeks
when operating on a file.
Boot Block(Booting From a drive)
Consider boot process in Windows which allows a drive to be divided into partitions, and one
partition— identified as the boot partition—contains the operating system and device drivers. The
Windows system places its boot code in the first logical block on the hard disk or first page of the
NVM device, which it terms the master boot record, or MBR.
Booting begins by running code that is resident in the system’s firmware. This code directs the system to
read the boot code from the MBR, understanding just enough about the storage controller and storage
device to load a sector from it.
In addition to containing boot code, the MBR contains a table listing the partitions for the drive and a flag
indicating which partition the system is to be booted from.
Once the system identifies the boot partition, it reads the first sector/page from that partition (called the
boot sector), which directs it to the kernel. It then continues with the remainder of the boot process, which
includes loading the various subsystems and system services.
Bad Blocks Recovery
Because disks have moving parts and small tolerances, they are prone to failure.
Sometimes the failure is complete; in that, the disk needs to be replaced and its contents
restored from backup media to the new disk.
Depending on the disk and controller in use, these blocks are handled in a variety of ways.
1. Manual Handling
2. Sector sparing / forwarding
3. Sector slipping.
Manual Handling
On older disks, such as some disks with IDE controllers, bad blocks are
handled manually.
One strategy is to scan the disk to find bad blocks while the disk is being
formatted. Any bad blocks that are discovered are flagged as unusable so
that the file system does not allocate them.
If blocks go bad during normal operation, a special program (such as the
Linux badblocks command) must be run manually to search for the bad
blocks and to lock them away.
Data that resided on the bad blocks usually are lost.
Sector sparing / forwarding
More sophisticated disks are smarter about bad-block recovery.
The controller maintains a list of bad blocks on the disk. The list is initialized during the low-
level formatting at the factory and is updated over the life of the disk.
Low-level formatting also sets aside spare sectors not visible to the operating system. The
controller can be told to replace each bad sector logically with one of the spare sectors.
Sector slipping