Disk Structure, Disk Scheduling and Management, Swap Space ...
03[2] Disk Management
description
Transcript of 03[2] Disk Management
Designed by www.techpings.com
AgendaAgenda
Overview
Disk Components
Disk Architecture
Disk Access Errors
Recovery Console
Disk Management Tools
Disk Performance
Disk Protection
Boot Settings for Disks
Designed by www.techpings.com
ObjectivesObjectivesUpon completion of this course, the participant will be able to:
Explain disk components and proper installation procedures
Explain disk architecture and preparation using FDISK, FORMAT and SYS
Explain CMOS settings effecting IDE/EIDE devices
Optimize disk using Disk Cleanup, Compression, ScanDisk, and Defrag
Manage and protect the disk using Backup and Quotas
Designed by www.techpings.com
OverviewOverviewWhat is disk management?
The hard disk is the storage location for computer files
The operating system, programs, and documents are all files that are commonly stored on the local hard disk
Because the disk controller searches and stores sequentially, it is critical to optimize the disk on a regular basis and manage the space efficiently
Understanding how the operating system interacts with the disk and how files are stored on the disk can ensure that files are protected and the operating system performance is optimized.
Designed by www.techpings.com
OverviewOverviewHow do disk problems occur?
Disk problems occur because of operating system activities and storage activities
The Windows operating systems use the local disk when:
• Paging
• Downloading
• Printing
• Saving
Designed by www.techpings.com
OverviewOverviewIf disk space is insufficient or fragmented when the operating system accesses it, operating system performance can be negatively affected or the system can crash
Storage activities occur because the disk controller stores files sequentially
As files grow over time, this process leads to fragmented files, cross-linked files, or lost clusters
Many files are stored on the local hard disk that users may not be aware of
Cleaning up these files and optimizing the disk regularly can keep problems from occurring
Designed by www.techpings.com
Disk ComponentsDisk ComponentsIDE vs. SCSI Bus Architecture
Disks primarily come in two bus architectures IDE and SCSI
ATA (AT Attachment) and IDE (Integrated Device Electronics) are the same
Combines the disk controller with the physical disk
Controller is not on the I/O card
SCSI (Small Computer Systems Interface) architecture combines the disk controller and the adaptor (the SCSI card)
Allows SCSI to control access to the bus by multiple devices (multiple disks)
Designed by www.techpings.com
Disk ComponentsDisk ComponentsIDE (ATA) vs. SATA
SATA drives have a faster interface than normal ATA disks and can have higher duty cycles. SATA will be used where more performance than ATA disks is needed but cost is still an issue.
Serial ATA (Serial Advanced Technology Attachment or SATA) is a new standard for connecting hard drives into computer systems.
As its name implies, SATA is based on serial signaling technology, unlike current IDE (Integrated Drive Electronics)
hard drives that use parallel signaling.
Designed by www.techpings.com
Disk ComponentsDisk ComponentsWhen bus is free it can receive commands or transfer data for another device
Disk architecture choice depends on the computer device
If the computer will have only one disk drive, then IDE is the best choice
It is less expensive and no performance improvement will occur compared to SCSI
Designed by www.techpings.com
Disk ComponentsDisk ComponentsIf the computer will support multiple devices, SCSI will offer several advantages:
• Connectivity – IDE can support up to two devices on each bus, SCSI can support up to 126 devices
• Bandwidth – The SCSI bus controller manages bandwidth so more devices can have access without performance degradation
• Efficiency – SCSI provides queuing of up to 256 commands. IDE does not provide for queuing
• Reliability – SCSI can sustain higher temperatures and fluctuations and still maintain integrity
Designed by www.techpings.com
Disk ComponentsDisk ComponentsDisk Installation
Hard disk installation requires the following:
• Disk
• Data cable
• Power cable
• Disk adaptor card
• Driver
ATA/IDE architecture requires a 40 or 80 pin (40 grounding wires for each sending wire) ribbon cable with 3 IDC connectors
Designed by www.techpings.com
Disk ComponentsDisk Components
The red strip on the data cable is used to determine proper cable installation
Strip should always face the power cable
The middle IDC connector should be connected to the slave drive, if needed
SCSI requires a parallel interface with termination of the ends of the bus to prevent ringing
Several SCSI standards, specific requirements differ slightly for each standard
Designed by www.techpings.com
Disk ComponentsDisk Components
Most common internal connection cable is the Type Type A 50 pin ribbon cableA 50 pin ribbon cable used for SCSI-1, SCSI-2, and Fast SCSI-2
Type P 68 pin connectorsType P 68 pin connectors are also used for SCSI-2
SCSI-3 adaptors use SCA-80 80 pin cablesSCA-80 80 pin cables
External SCSI connectors include 50 pin Centronics (SCSI-1), 50 pin HD(High Density) D-type (SCSI-2), 68 pin HD D-type (Wide SCSI-2 and SCSI-3), and 25 pin standard D-type (SCSI-2 with Macintoshes)
Designed by www.techpings.com
Disk ComponentsDisk Components
The SCSI adaptor normally uses a PCI bus on the motherboard or a PCI slot
Each SCSI device on a SCSI chain must have a unique identifier
The two ends of a SCSI chain must be terminated to stop reflection
Designed by www.techpings.com
Disk ArchitectureDisk Architecture
Disk Components
Hard drives are composed of one or more silicon disks
Sector
Cluster
Track
• Sector –the smallest area on the disk where data is stored
• Cluster – two or more sectors used by the file system to store data
• Track – circular divisions on the disk
Designed by www.techpings.com
Disk ArchitectureDisk Architecture
Disk Preparation
A disk must be prepared before information can be stored on it
1. Low-level formatting occurs at the manufacturer
- Writes tracks and sectors to the surface of the disk
- Sector size is generally 512 bytes
- 0’s are written to every bit in each sector
- 8 bits in each byte
Designed by www.techpings.com
Disk ArchitectureDisk Architecture2. Identifying the disk for the CMOS occurs after the disk has been
installed in the computer
- During boot process the disk is automatically detected or requires input in setup to recognize disk characteristics
- OS reads the clusters
- Clusters are two or more sectors
- On ATA/IDE disks the BIOS cannot recognize more than 504 MB
- To get around this limit, LBA/ECHS lies to the computer about the disk’s geometry
- LBA (Long Block Allocation) allows the CMOS to see the logical drive geometry instead of the physical geometry
- SCSI drives do not have physical limitations
Designed by www.techpings.com
Disk ArchitectureDisk Architecture3. Partitioning the disk
- FDISK accomplishes this step for Windows 9x operating systems
- In Windows NT/2000 systems, Diskpart, is part of the installation process and Disk Administrator (Windows NT) or Disk Management (Windows 2000) provide access to this tool within Windows
- Partitioning walls off sections of a disk and assigns a drive letter to each partition
- Partitioning process writes two important components to the 0 sector of the disk, the partition table and the Master Boot Record (MBR)
- Partition table, keeps track of the primary, extended and logical partitions and their size, and the file system each uses
- The MBR points to the location of the operating system files upon boot
- They can then be loaded in memory and the boot process can continue
Designed by www.techpings.com
Disk ArchitectureDisk Architecture4. Specify a file system by formatting the disk
- Not a low-level format
- Formatting is specific to the file system used on the partition
- Two types of file systems when storing a Windows OS on a partition, FAT and NTFS
- When formatting a file, the File Allocation Table (FAT) or Master File Table (MFT) composed of metadata files (NTFS), is written to the 0 sector of the disk and a root directory structure is created
- The file or table written to the disk contains the file names and locations on the disk
- Formatting replaces the file/table, clearing the disk
Designed by www.techpings.com
Disk ArchitectureDisk Architecture
FAT (File Allocation Table)
• Can be used with Windows 9x and Windows NT/2000/XP operating systems
• FAT is a simple file system located at the top of the partition
• Two FATs exist in case one becomes damaged
• Provides little security for files
• Attributes can be assigned to files and folders to make them read only or hidden
• Attribute applies to everyone
• Partitions are limited to 2GB in Windows 9x operating systems and 4GB in Windows NT operating systems
Designed by www.techpings.com
Disk ArchitectureDisk Architecture
NTFS (New Technologies File System)
• NTFS is a high-performance and self-healing file system proprietary to Windows XP 2000 NT, which supports file-level security, compression and auditing.
• It also supports large volumes and powerful storage solution such as RAID.
• The most important new feature of NTFS is the ability to encrypt files and folders to protect your sensitive data. This provides several advantages over the FAT system
• Built in recoverability tools, which ensure minimal lost clusters and cross-linked files
• Provides individual user security settings for files and folders
• NTFS can access partitions as large as 16 exabytes
Designed by www.techpings.com
Disk ArchitectureDisk ArchitectureCriteria NTFS5 NTFS FAT32 FAT16
Operating SystemWindows 2000
Windows XP
Windows NTWindows 2000
Windows XP
Windows 98Windows ME
Windows 2000Windows XP
DOSAll versions of
Microsoft Windows
Limitations
Max Volume Size 2TB 2TB 2TB 2GB
Max Files on Volume Nearly Unlimited Nearly Unlimited Nearly Unlimited ~65000
Max File SizeLimit Only by Volume Size
Limit Only by Volume Size
4GB 2GB
Max ClustersNumber
Nearly Unlimited Nearly Unlimited 268435456 65535
Max File NameLength
Up to 255 Up to 255 Up to 255Standard - 8.3
Extended - up to255
Designed by www.techpings.com
Disk ArchitectureDisk ArchitectureCriteria NTFS5 NTFS FAT32 FAT16
Operating SystemWindows 2000
Windows XP
Windows NTWindows 2000
Windows XP
Windows 98Windows ME
Windows 2000Windows XP
DOSAll versions of
Microsoft Windows
File System Features
Unicode File NamesUnicode Character
SetUnicode Character
SetSystem Character
SetSystem Character
SetSystem Records
MirrorMFT Mirror File MFT Mirror File Second Copy of FAT Second Copy of FAT
Boot Sector LocationFirst and Last
SectorsFirst and Last
SectorsFirst Sector First Sector
File AttributesStandard and
CustomStandard and
CustomStandard Set Standard Set
Alternate Streams Yes Yes No No
Compression Yes Yes No No
Encryption Yes No No No
Object Permissions Yes Yes No No
Disk Quotas Yes No No No
Sparse Files Yes No No No
Reparse Points Yes No No No
Volume Mount Points Yes No No No
Designed by www.techpings.com
Disk ArchitectureDisk ArchitectureCriteria NTFS5 NTFS FAT32 FAT16
Operating SystemWindows 2000
Windows XP
Windows NTWindows 2000
Windows XP
Windows 98Windows ME
Windows 2000Windows XP
DOSAll versions of
Microsoft Windows
Overall Performance
Built-In Security Yes Yes No No
Recoverability Yes Yes No No
PerformanceLow on small
VolumesHigh on Large
Low on smallvolumes
High on Large
High on smallVolumes
Low on large
Highest on smallVolumes
Low on large
Disk Space Economy Max Max AverageMinimal on large
volumes
Fault Tolerance Max Max Minimal Average
Designed by www.techpings.com
Disk ArchitectureDisk Architecture
Disk is now ready to store information
Partition must contain an operating system to boot
The DOS operating system is easiest to install
It consists of three files:
• IO.sys
• MSDOS.sys
• Command.com
These files must be transferred to a bootable disk to notify the MBR that this is an operating system
Designed by www.techpings.com
Disk ArchitectureDisk Architecture
When a Windows OS is installed, the MBR is updated to reflect the location of the system files
On a multi-boot disk (a disk containing more than one operating system), the MBR points to the location of the primary operating system files
If the primary operating system is Windows NT or Windows 2000, the file boot.ini will contain a mapping to other operating systems available
Designed by www.techpings.com
Disk ArchitectureDisk Architecture
Disk Storage Processing
• Files are written to the disk in sequential order
• A file is written to the next open cluster on the disk
• If a file is not as large as the cluster, the rest of the space is not used
• When a file is deleted, the cluster occupied by that file is now available
• Cluster will not be used until the disk is completely full or the disk is defragmented
Designed by www.techpings.com
Disk ArchitectureDisk Architecture• In the following example, Files A, B, and C are written to the
disk clusters
• The user adds information to File A
• The user writes File D to the disk
File A File B File C
File A File B File C File A
File A File B File C File A File D
Designed by www.techpings.com
Disk ArchitectureDisk Architecture• The user deletes File A
• The user writes more information to File B
• The space occupied by File A is not used until Defragmenter is run
File A File B File C File A File D
File A File B File C File A File D File B
Designed by www.techpings.com
Disk ArchitectureDisk Architecture• All files that are not contiguous, like File B, are put together and the
deleted file spaces are overwritten
• Notice that File B is not overwritten until a new file is saved
• When a file is requested in memory, the file is retrieved through a sequential search
• If the disk is fragmented or parts of a file are located on different clusters on the disk, the process for retrieving the file will be slow and operating system performance will be adversely affected
File B File B File B File C File D File B
Designed by www.techpings.com
Disk Access ErrorsDisk Access ErrorsDisk access errors occur for several reasons:
• The 0 sector has been physically damaged
• The MBR is missing or corrupted
• The FAT or NTFS table has been corrupted
• The operating system files cannot be found
• A file cannot be opened
Specific errors are displayed that identify the error
Troubleshooting in a timely manner may save the disk or file
Designed by www.techpings.com
Disk Access ErrorsDisk Access Errors0 Sector Damage
Disk is no longer usable if 0 sector is physically damaged
Commonly caused by ESD (Electrostatic Discharge)
ESD can occur:
• When installing a field replaceable component
- Follow proper grounding procedures before touching the disk
- Latent catastrophic failures are caused by ESD damage to the transistors on the disk or main board
• When a surge occurs at the power source.
- Always use a surge protector to guard the computer system from electrical spikes and surges
Designed by www.techpings.com
Disk Access ErrorsDisk Access ErrorsMBR Damage
When the MBR is damaged, it no longer points to the location of operating system files
Errors that may signify damage to the MBR include:
• Machine language on the screen
• “Rom Basic missing. System halted”
• System freezes after Rom Bios checks hardware
If one of these errors occur, use FDISK /MBR to repair the MBR without changing the partition table
Do not use this command if there are more than 4 partitions on the physical disk
Designed by www.techpings.com
Disk Access ErrorsDisk Access ErrorsFile System Unreachable
If FAT is not readable, the error Missing Operating SystemMissing Operating System will display
Can occur if the partition containing the FAT is not marked as the active partition
This can be accomplished using FDISKFDISK
Can also occur when the FAT is corrupted
Use the SCANDISK SCANDISK utility to scan the disk
This tool may be able to salvage the copy of the FAT and restore access to the disk
Attempt to run the Emergency Repair Process from the Emergency Repair Disk
Designed by www.techpings.com
Disk Access ErrorsDisk Access ErrorsOperating System Error
Non-System Disk ErrorNon-System Disk Error occurs when boot disk contains no operating system files or files are corrupted
Boot order for disks is set in CMOSCMOS
Floppy drive is normally the first disk accessed
If a non-bootable disk is in the drive, this error will be displayed
Can also occur if the OS files have been damaged
With Windows 9x operating systems, the basic operating system files (DOS) can be restored from a bootable floppy using the SYS command
Attempt to run the Emergency Repair Process from the Emergency Repair Disk
Designed by www.techpings.com
Disk Access ErrorsDisk Access ErrorsFile Access Error
File access errors occur because the file parts have lost pointers to one another
Can be caused by disk fragmentation and by viruses
When a file access error occurs, scan the disk using the Scandisk or the error checking utility in Disk Management (Windows 2000)
Attempt to run the Emergency Repair Process from the Emergency Repair Disk
Designed by www.techpings.com
Recovery ConsoleRecovery Console
Recovery ConsoleRecovery Console is a command line utility similar to MS-DOS command line.
You can list and display folder content, copy, delete, replace files, format drives and perform many other administrative tasks.
To run Recovery Console, boot from Windows bootable disks or CD and choose RepairRepair option, when system suggests you to proceed with installation or repairing. Press C to run Recovery Console.
Designed by www.techpings.com
Recovery ConsoleRecovery ConsoleYou will be asked which system you want to log on to and then for Administrator's password.
After you logged on - you can display drive's contents, check the existence and safety of critical files and, copy them back if they have been accidentally deleted (see graphic).
Designed by www.techpings.com
Disk Management ToolsDisk Management Tools
Disk Cleanup
• Disk CleanupDisk Cleanup should always be performed before scanning the disk or defragmenting
• When disk space is limited, Disk CleanupDisk Cleanup points to the location of common files that can be deleted or compressed
Designed by www.techpings.com
Disk Management ToolsDisk Management Tools• Many files are saved to the disk without the user’s specific
request or approval
• Temporary Internet filesTemporary Internet files are downloaded every time you access a web site
• Temporary files are created during the printing process, while working on certain types of documents, and during unexpected shutdowns while working on documents
• Downloaded programs are support components that are automatically downloaded to support a web site the user opens
Designed by www.techpings.com
Disk Management ToolsDisk Management Tools
• When a file is deleted, it is sent to the Recycle Bin,Recycle Bin, which is just another location on the hard drive
• Disk CleanupDisk Cleanup provides the user with a single tool to delete or compress all files on the disk
• The More OptionsMore Options tab provides access to remove Windows components not being used and/or to remove installed programs no longer in use
Designed by www.techpings.com
Disk Management ToolsDisk Management Tools
Computer Management
• Partitions can be created, formatted and deleted from this screen
• Shows which file system the disk has been formatted with
• A FAT partition cannot see an NTFS partition on the same computer
• An NTFS partition can see both FAT and NTFS partitions
Designed by www.techpings.com
Disk Management ToolsDisk Management Tools
Disk Properties
• The following screen can also be reached following these steps:
- Double-click My Computer on the Desktop
- Right -click a partition and click Properties
• Click the Quota tabQuota tab to set disk quotas for users
• This can keep users from saving too much to the limited space on a disk
Designed by www.techpings.com
Disk Management ToolsDisk Management Tools
Error Checking• Scans the disk for errors and compares the contents with the
listing in the file table
• Looking for file system errors and errors on the disk
• If bad cluster is found, cluster is marked and the disk controller will no longer attempt to save information to it
• Fragments on the disk cause file system errors
• Cross-linked files occur when pointers in two files point to the same location
• Lost clusters occur when clusters are not correctly marked as containing information or as being available for information
Designed by www.techpings.com
Disk Management ToolsDisk Management Tools
Defragment
• Tool used to move files into contiguous order on the disk
• Fragmented files are put into contiguous order
• Space taken by deleted files is written over
Designed by www.techpings.com
Disk PerformanceDisk PerformancePerformance Monitor
• Tool used to monitor resources over time
• Monitoring physical disk components and paging file components provides information to direct troubleshooting efforts
• Resources to monitor can be added
Designed by www.techpings.com
Disk PerformanceDisk PerformancePaging File Settings
• Paging File is space on the physical disk set aside to act like memory
• While the operating system is managing the computer resources, it swaps 64K pages to the location of the paging file on the disk
• The Least Recently Used (LRU)Least Recently Used (LRU) files are swapped
• A page resides briefly on the page file
• It is then brought back to physical memory and another page is swapped
• The page file should be at least 1.5 times actual memoryat least 1.5 times actual memory and should be a static filestatic file
Designed by www.techpings.com
Disk PerformanceDisk Performance
• The paging file can be updated
• The computer will have to be rebooted after changing the paging file size
Designed by www.techpings.com
Disk ProtectionDisk Protection
Disk Backup
Disks fail!
There is no substitute for a backup
• A full backupfull backup copies everything in the designated folders
• An incremental backupincremental backup makes a copy of only the files that have changed since the last backup of the designated folders
• A differential backupdifferential backup is a copy of the files that have changed since the last backup but does not turn the archive attribute to OFF
- The next differential backup will copy some of the same files it copied during the original backup
Designed by www.techpings.com
Disk ProtectionDisk Protection
Electrostatic Discharge (ESD)
• Disks can be destroyed by ESD
• A UPSUPS protects a disk from surges and brownouts
• Both of these issues can cause problems for a disk
• When working with a disk, wear an electrostatic strap and place the disk on a rubber mat
Designed by www.techpings.com
Boot Settings for DisksBoot Settings for Disks
Physical disk boot settings are controlled in CMOS and in the boot.ini file
CMOS
• Access the CMOS settings during the bootstrap phase of the boot process
• This is where CMOS settings are modified
• Boot drive order can be changed here
• The options are the CD-ROM, disk, or floppy drive
• A bootable drive is one that contains an operating system
Designed by www.techpings.com
Boot Settings for DisksBoot Settings for Disks
Boot.ini
• If more than one operating system is on a computer, the boot.iniboot.ini file can be modified to boot to a different partition if the boot partition becomes corrupted
• File is always located in the first partition on the first disk
• Notepad is a text editor, and can be used to make changes
• Adds no format characters that the operating system cannot read
Designed by www.techpings.com
Boot Settings for Disks
Timeout settingTimeout setting controls the time the operating system selection page appears during the boot process
Default line points to the disk and partition that contains the operating system the computer boots to
OS sectionOS section lists all the operating systems that are loaded on the computer
ATTRIB commandATTRIB command will remove attributes of hidden files
Designed by www.techpings.com
Boot Settings for DisksBoot Settings for Disks
If the boot operating system crashes, boot to a bootable floppy disk or CD
Edit the boot.ini fileboot.ini file
Under the operating system heading choose an operating system other than the boot system
Designed by www.techpings.com
Objectives RevisitedObjectives RevisitedExplain disk components and proper installation procedures
Explain disk architecture and preparation using FDISK, FORMAT and SYS
Explain CMOS settings effecting IDE/EIDE devices
Optimize disk using Disk Cleanup, Compression, ScanDisk, and Defrag
Manage and protect the disk using Backup, and Quotas