Top Banner
1 File and Disk Maintenance
29

1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

Mar 29, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

1

File and Disk Maintenance

Page 2: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

2

File Systems

A file system defines the structure and the rules used to read, write, and maintain information stored on a disk.

Which system used is determined by; Hardware Software Security needs Need for a dual-booting system

Page 3: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

3

FAT???

file allocation table – where the OS records how the disk space is used

Page 4: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

4

File Systems FAT 16 – oldest, created for DOS, supported

by most OSs’, cannot be installed on partitions larger than 2 GB, or on hard drives larger than 4GB.

FAT 32 – supports disks from 512 to 2TB, compatible with Windows 98 and up

NTFS – (new technology file system) – better file security (Encrypting File System), disk compression, logging features, reliability and stability. NTFS volumes can not be accessed by DOS, or Windows 95 or Windows 98.

Page 5: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

5

File Systems

The operating system keeps track of data (documents, pictures, etc.) by placing it into a file.

To store and retrieve files: Disk divided into tracks Tracks are divided into sectors Sectors grouped into clusters

Number of sectors in a cluster is determined by

Size of the hard driveFile allocation system – FAT, FAT32, NTFS, e

Page 6: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

6

When you format a disk the operating systems creates concentric recording bands, called tracks, around the circumference of the disk. Then, the formatting program (in our case Windows XP) subdivides each track into equal parts, called sectors. Although not all of them are shown in the following diagram, there are 80 concentric tracks on a 3 ½ inch high density diskette and each track is divided into 18 sectors. Each sector in turn contains 512 bytes.

So let’s see . . . . . 80 tracks X 18 sectors X 2 sides X 512 bytes = 1,474,560 bytes = 1.4 MB

Page 7: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

7

Tracks

Sectors within a

Track

Cluster

Page 8: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

8

A hard disk has extremely smooth metal or glass plates called “platters” (vs. the floppy mylar disk of a floppy disk).

Each platter is divided into tracks and sectors by the format operation, like a floppy disk, however the number of tracks and sectors is different. The number of tracks on a hard disk depends on the disk size and the manufacturer.

Page 9: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

9

A cluster, also known as an allocation unit, consists of one or more sectors of storage space, and represents the minimum amount of space that an operating system allocates when saving the contents of a file to a disk.

The number of sectors per cluster is dependent on Type of disk (floppy disk, hard disk) Version of operating systems Size of disk

Every sector contains 512 bytes. (NTFS does allow you to change this number.)

The number of clusters per disk is determined by the filing system (FAT 16, FAT 32 or NTFS).

Clusters?

Page 10: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

10

DRIVE SIZEFAT 16

Cluster SizeFAT 32

Cluster SizeNTFS

Cluster Size

260 to 511 MB 8 KB (16 sectors) Not Supported 512 bytes (1 sector)

512 to 1023 MB 16 KB (32 sectors) 4 KB (8 sectors) 1KB (2 sectors)

1024 MB to 2 GB 32 KB (64 sectors) 4 KB (8 sectors) 2 KB (4 sectors)

2 to 4 GB 64 KB (128 sectors) 4 KB (8 sectors) 4 KB (8 sectors)

4 to 8 GB Not Supported 4 KB (8 sectors) 8 KB (16 sectors)

8 to 16 GB Not Supported 8 KB (16 sectors) 16 KB (32 sectors)

16 to 32 GB Not Supported 16 KB (32 sectors) 32 KB ( 64 sectors)

>32 GB (up to 2 TB) Not Supported 32 KB (64 sectors) 64 KB (128 sectors)

Page 11: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

11

Example - File size = 2KB Hard drive = 2GB

FAT 16 – the file will use 1 cluster which is 64 sectors, so 64 X 512 bytes per sector = 32KB – 2KB = 30KB slack

space FAT 32 – the file will use 1 clusters which is 8 sectors, so

8 X 512 bytes per sector = 4KB – 2KB = 2KB slack space NTFS – the file will use 1 cluster which is 4 sectors, so

4 X 512 bytes per sector = 2KB – 2KB = 0 slack space

Page 12: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

12

So, what does this all mean to us, as Windows XP users?

The bigger your disk – the bigger your clusters (because there is a maximum number of clusters per disk).

One way to help alleviate the problem of slack space is to partition the hard drive into smaller “drives”. Reducing the drive size will reduce the cluster size.

Page 13: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

13

So what can cause problems with a Disk?

Physical hard drive problems:• Wear and tear on hard disk - Minimize with Power

Management and/or Hibernation• Head crash - Minimize by placing system where it will

not get knocked around.Software-related problems:

• Viruses -Minimize by using virus protection softwareSome error causing conditions to data that may be

repairable: Power surges Power outages Locked system

Page 14: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

14

Cleaning Up Your Disk

Computer performance depends a great deal on the hard drive.

Need disk space for: New files Temporary files Documents waiting to be printed Cache files

Cache – storage area for often used information that can be accessed quickly

Recycle

Page 15: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

15

Cleaning Up Your Disk

Disk cleanup is a utility that helps maintain the hard disk.

Intended for hard drives. Will remove the following;

Internet cache files Downloaded program files Offline web pages Offline lines, & temporary offline files Temporary files Files in the recycle bin Windows components that you no longer use Installed programs that you no longer use Catalog files for the Content Indexer

Page 16: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

16

Check Disk

The Check Disk utility is a disk analysis and repair utility that examines disks for errors and, where possible, repairs errors. Checks the logical structure Checks the physical integrity of the disk’s

surface, if it finds a bad sector it will attempt to move the data to another location.

Take care of Lost Clusters

Page 17: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

17

What are lost clusters?

Lost Clusters:• Have no directory entry in directory table• Do not belong to any file• Take up disk space - • Unavailable for new data

• Cannot be retrieved/deleted• Reasons for Lost Clusters

•Not exiting program properly•Power surge/failure

Page 18: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

18

Lost Clusters Example

Page 19: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

19

Check Disk can fix lost clusters

Can fix lost clusters automatically or

Save them to disk as files

Side note:

You can check if you have lost clusters by clicking on a file and comparing the file size in explorer window to status bar files size.

Page 20: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

20

Check Disk continued

CAN check/repair local hard drives, floppy disks, and removable drives

CANNOT find/fix errors on CD-ROMs or network drives

Page 21: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

21

Check Disk, continued

Should be used on a regular basis The first time you use it you should back up your

disk before running check disk. Close all open programs when using this program,

including screen saver If disk is formatted as NTFS, Windows XP

Professional will automatically (without running Check Disk):

Log all file transactionsReplace bad clustersStore copies of key information for all files on

NTFS volume

Page 22: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

22

Contiguous and Noncontiguous Files

Windows XP Professional keeps track of data by placing it into a file.

To store and retrieve files: Disk divided into sectors Sectors grouped into clusters

Number of sectors in a cluster is determined by Size of the hard drive File allocation system – FAT, FAT32, NTFS, etc.

Page 23: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

23

Contiguous and Noncontiguous Files

When a file is deleted: Only entries in FAT deleted Space file occupied becomes

available

Page 24: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

24

Contiguous and Noncontiguous Files

Files are: Contiguous – written to adjacent clusters on

a disk Noncontiguous (fragmented) – written to a

disk in nonadjacent clusters.So a Fragmented Disk has noncontiguous

files. It takes longer to read a Fragmented Disk because the head must move around so much going to the various locations of the file clusters.

Page 25: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

25

Page 26: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

26

Page 27: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

27

Page 28: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

28

Defragmentation

Rearranges the files on a disk so that all parts of each files are store in consecutive clusters. It also records the clusters for one file right after the clusters for another file, and in the process, removes free space between files that would result in more fragmentation. At the end of defragmentation all the unused space is near the inner edge of the disk.

Page 29: 1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on.

29

Defragmentation, continued

Prior to running Disk Defragmenter:

Run Check Disk and Disk CleanupClose All open programsAllow ample time, can take hours – depends on

how fragmented your disk is.Back up disk