file systems. presented to: sir. ahmad kareem presented by: sadia rasheed bsit 07-13

42
FILE SYSTEMS FILE SYSTEMS

Upload: william-lester

Post on 29-Jan-2016

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

FILE SYSTEMSFILE SYSTEMS

Page 2: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Presented to:

Sir. Ahmad Kareem

Presented by:

Sadia Rasheed Bsit 07-13

Page 3: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

File system File system

In a computer, a file system (sometimes written In a computer, a file system (sometimes written filesystem) is the way in which files are named filesystem) is the way in which files are named and where they are placed logically for storage and where they are placed logically for storage and retrieval. and retrieval.

File systems specify convention for naming files.File systems specify convention for naming files.

Page 4: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

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

Which system used is determined by;Which system used is determined by; HardwareHardware SoftwareSoftware Security needsSecurity needs Need for a dual-booting systemNeed for a dual-booting system

Page 5: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

File NamesFile Names

1 to 255 characters in length1 to 255 characters in length This includes the pathThis includes the path

You can use uppercase and lowercase (case-You can use uppercase and lowercase (case-aware, but not case-sensitive)aware, but not case-sensitive)

You can use spaces and periodsYou can use spaces and periods You cannot use these characters:You cannot use these characters:

/ \ : * ? “ < > |/ \ : * ? “ < > |

Page 6: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

File Names continuedFile Names continued

Filenames consist of two partsFilenames consist of two parts Main part of filenameMain part of filename

Identifies the contents of the fileIdentifies the contents of the file File extensionFile extension

Identifies the file typeIdentifies the file type The last period separates the file extension from The last period separates the file extension from

the main part of the filename.the main part of the filename. Windows typically associates a file extension with Windows typically associates a file extension with

an application installed on a computeran application installed on a computer

Page 7: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Folder NamesFolder Names

Folder names follow the same guidelines for Folder names follow the same guidelines for naming files naming files

Folder names usually do not have a file extensionFolder names usually do not have a file extension

Page 8: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Presented to:Presented to:Sir. Ahmad Sir. Ahmad

KareemKareem

Presented by: Presented by:Jamila bb 07-48Jamila bb 07-48

Page 9: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

MS-DOS filename MS-DOS filename

Filename: 1 to 8 charactersFilename: 1 to 8 characters File extension: 1 to 3 charactersFile extension: 1 to 3 characters DOS only uses uppercaseDOS only uses uppercase You cannot use spacesYou cannot use spaces A single period separates the file extension from A single period separates the file extension from

the filenamethe filename You cannot use these characters:You cannot use these characters:

/ \ : * ? “ < > | + = ; , [ ]/ \ : * ? “ < > | + = ; , [ ]

Page 10: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

The Full PathThe Full Path

What does it mean?What does it mean? The complete path from the root of the files The complete path from the root of the files

system to the desired object.system to the desired object. Use Use \\ (vs. /) (vs. /) C:\ - the rootC:\ - the root

For Example;For Example;

E:\BSIT\6th Semester\System Administration\File E:\BSIT\6th Semester\System Administration\File System.pptSystem.ppt

Page 11: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

FAT???FAT???

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

Page 12: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

File SystemsFile Systems

FAT12:FAT12: The earliest version the file system, The earliest version the file system, FAT12 allows a partition to contain up to 4096MB/ FAT12 allows a partition to contain up to 4096MB/ (212)clusters.(212)clusters.

FAT 16FAT 16: : oldest, created for DOS, supported by oldest, created for DOS, supported by

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

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

Page 13: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Advantages of FAT File Advantages of FAT File SystemSystem

The FAT file system is best for drives and/or The FAT file system is best for drives and/or partitions under approximately 200 MBpartitions under approximately 200 MB

It is better to format system partition as FATIt is better to format system partition as FAT

Page 14: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Disadvantage of FAT File Disadvantage of FAT File SystemSystem

It is not better to use FAT on partitions that are It is not better to use FAT on partitions that are greater than 200 megabytes. FAT partitions are greater than 200 megabytes. FAT partitions are limited in size to a maximum of 4 Gigabytes (GB) limited in size to a maximum of 4 Gigabytes (GB) under Windows NT and 2 GB in MS-DOS.under Windows NT and 2 GB in MS-DOS.

Any FAT partitions that use DOS-based disk Any FAT partitions that use DOS-based disk compression (such as DriveSpace) will not have compression (such as DriveSpace) will not have readable files when running Windows NTreadable files when running Windows NT

The FAT file system is also prone to fragmentationThe FAT file system is also prone to fragmentation

..

Page 15: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Presented to:Presented to:Sir. Ahmad Sir. Ahmad

KareemKareem

Presented by: Presented by:Irum Mumtaz 07-Irum Mumtaz 07-

2424

Page 16: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

NTFSNTFS (new technology file system) – better file (new technology file system) – better file

security (Encrypting File System), disk security (Encrypting File System), disk compression, Disk Quota features, reliability and compression, Disk Quota features, reliability and stability. NTFS volumes can not be accessed by stability. NTFS volumes can not be accessed by

DOS, or Windows 95 or Windows 98.DOS, or Windows 95 or Windows 98.

Page 17: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Advantages of NTFSAdvantages of NTFS Large disks and large files: Large disks and large files: NTFS is NTFS is

best for use on volumes of about 400 MB or morebest for use on volumes of about 400 MB or more Recoverability:Recoverability: The recoverability The recoverability

designed into NTFS is such that a user should designed into NTFS is such that a user should never have to run any sort of disk repair utility on never have to run any sort of disk repair utility on an NTFS partition.an NTFS partition.

Security:Security: NTFS uses the Windows NT object NTFS uses the Windows NT object model to enforce security. An open file is model to enforce security. An open file is implemented as a file object with a security implemented as a file object with a security descriptor that defines its security attributesdescriptor that defines its security attributes..

Page 18: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

General indexing facility:General indexing facility: NTFS NTFS associates a collection of attributes with each file. associates a collection of attributes with each file. The set of files in the file management system is The set of files in the file management system is organized as a relational database, so that files organized as a relational database, so that files can be indexed by any attribute.can be indexed by any attribute.

Page 19: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Disadvantages of NTFSDisadvantages of NTFS

It is not recommended to use NTFS on a volume It is not recommended to use NTFS on a volume that is smaller than approximately 400 MBthat is smaller than approximately 400 MB

Currently, there is no file encryption built into Currently, there is no file encryption built into NTFSNTFS

It is not possible to format a floppy disk with the It is not possible to format a floppy disk with the NTFS file systemNTFS file system

Page 20: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Presented to:Presented to:Sir. Ahmad KareemSir. Ahmad Kareem

Presented by: Presented by:Nudrat Rehman 07-Nudrat Rehman 07-

4747

Page 21: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

File SystemsFile Systems

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

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

Number of sectors in a cluster is determined Number of sectors in a cluster is determined byby

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

Page 22: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Tracks

Sectors within a

Track

Cluster

Page 23: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

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

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

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

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

Clusters?Clusters?

Page 24: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

DRIVE SIZEDRIVE SIZE FAT 16FAT 16Cluster SizeCluster Size

FAT 32FAT 32Cluster SizeCluster Size

NTFSNTFSCluster SizeCluster Size

260 to 511 260 to 511 MBMB

8 KB (16 sectors)8 KB (16 sectors) Not SupportedNot Supported 512 bytes (1 512 bytes (1 sector)sector)

512 to 1023 512 to 1023 MBMB

16 KB (32 16 KB (32 sectors)sectors)

4 KB (8 sectors)4 KB (8 sectors) 1KB (2 sectors)1KB (2 sectors)

1024 MB to 2 1024 MB to 2 GBGB

32 KB (64 32 KB (64 sectors)sectors)

4 KB (8 sectors)4 KB (8 sectors) 2 KB (4 sectors)2 KB (4 sectors)

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

4 KB (8 sectors)4 KB (8 sectors) 4 KB (8 sectors)4 KB (8 sectors)

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

8 to 16 GB8 to 16 GB Not SupportedNot Supported 8 KB (16 8 KB (16 sectors)sectors)

16 KB (32 16 KB (32 sectors)sectors)

16 to 32 GB16 to 32 GB Not SupportedNot Supported 16 KB (32 16 KB (32 sectors)sectors)

32 KB ( 64 32 KB ( 64 sectors)sectors)

>32 GB >32 GB (up to 2 (up to 2 TB)TB)

Not SupportedNot Supported 32 KB (64 32 KB (64 sectors)sectors)

64 KB (128 64 KB (128 sectors)sectors)

Page 25: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

OS and File System OS and File System CompatibilityCompatibility

Operating SystemOperating System FAT16FAT16 FAT32FAT32 NTFSNTFS

Windows XPWindows XP

Windows 2000Windows 2000

Windows NTWindows NT

Windows 95, 98, MEWindows 95, 98, ME

Windows 95Windows 95

MS-DOSMS-DOS

Page 26: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Presented to:Presented to:Sir. Ahmad Sir. Ahmad

KareemKareem

Presented by: Presented by:Nimra Irshad 06-Nimra Irshad 06-

2727

Page 27: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

What happens during the What happens during the Formatting Process?Formatting Process?

OS creates four tables in the 1OS creates four tables in the 1stst sectors sectorsBoot RecordBoot Record – the name & version number of – the name & version number of the OS, info. on the physical characteristics of the OS, info. on the physical characteristics of the diskthe diskMaster File Table #1-Master File Table #1- keeps track of keeps track of

Available clustersAvailable clustersClusters that contain dataClusters that contain dataClusters that are defectiveClusters that are defectiveClusters that contain OS filesClusters that contain OS files

Master File Table #2Master File Table #2 – copy of MFT #1 – copy of MFT #1Directory TableDirectory Table – top level folder and file – top level folder and file informationinformation

Page 28: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Formatting Process, cont.Formatting Process, cont.

Full FormatFull Format lays down new tracks and sectorslays down new tracks and sectors Verifies the integrity of each sectorVerifies the integrity of each sector

By doing a surface scan – OS will put dummy By doing a surface scan – OS will put dummy data into sectors and then try to read the data into sectors and then try to read the sectorsector

Quick FormatQuick Format Removes filesRemoves files Does not check for defective sectorsDoes not check for defective sectors

Page 29: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Formatting Process, cont.Formatting Process, cont.

Should you Should you format brand format brand new new preformatted preformatted disk?disk?

Page 30: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Registered FilesRegistered Files

A file that is associated with an application on A file that is associated with an application on your computer via its file extension.your computer via its file extension.

Where is this information kept?Where is this information kept?

THE REGISTRY – a database that consists of a set THE REGISTRY – a database that consists of a set of files where Windows XP stores your computer’s of files where Windows XP stores your computer’s hardware, software, network, security,user hardware, software, network, security,user settings or profiles, and property settings for settings or profiles, and property settings for folders and programs.folders and programs.

Page 31: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Presented to:Presented to:Sir. Ahmad Sir. Ahmad

KareemKareem

Presented by: Presented by:Qudsia Zafar 07-Qudsia Zafar 07-

3535

Page 32: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Compare FAT and NTFS Compare FAT and NTFS File SystemFile System

CompatibilityCompatibility Only Windows NT supports NTFS partitions , Only Windows NT supports NTFS partitions ,

Windows NT and Windows 95 supports both NTFS Windows NT and Windows 95 supports both NTFS and FATand FAT

Volume sizeVolume size FAT supports partition sizes only up to 2 GB , FAT supports partition sizes only up to 2 GB ,

the maximum size of an NTFS partition is 16 EB the maximum size of an NTFS partition is 16 EB

Page 33: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Fault toleranceFault tolerance Windows NT offers software support for several Windows NT offers software support for several

alternate disk-access methods that increase alternate disk-access methods that increase speed and/or fault tolerance, While FAT does speed and/or fault tolerance, While FAT does maintain two copies of the file-allocation table, in maintain two copies of the file-allocation table, in case one copy is damaged, it’s incapable of case one copy is damaged, it’s incapable of automatically fixing errorsautomatically fixing errors))

File compressionFile compression NTFS has its native support for file compression, NTFS has its native support for file compression,

It offers you the chance to compress individual It offers you the chance to compress individual files and directories of your choice files and directories of your choice

Page 34: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

The system partition The system partition A better solution is to format your system partition A better solution is to format your system partition

as FATas FAT because because NTFS partitions are accessible only NTFS partitions are accessible only via Windows NT. If you have a fatal error with via Windows NT. If you have a fatal error with Windows NT,Windows NT, you can’t simply boot a system disk to you can’t simply boot a system disk to a command prompt and fix a problem on an NTFS a command prompt and fix a problem on an NTFS partitionpartition

Converting to NTFSConverting to NTFS In MS-DOS type command: CONVERT drive: In MS-DOS type command: CONVERT drive:

/FS:NTFS/FS:NTFS

Page 35: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

SecuritySecurity NTFS has a built-in security systemNTFS has a built-in security system , FAT has no , FAT has no

local protection, it only has the share permission local protection, it only has the share permission (protect the file from network(protect the file from network

Page 36: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Presented to:Presented to:Sir. Ahmad KareemSir. Ahmad Kareem

Presented by: Presented by:Nudrat Rehman 07-Nudrat Rehman 07-

4747

Page 37: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Ext3 third extended file Ext3 third extended file systemsystem

Stephen TweedieStephen Tweedie November,2001November,2001 Journaled file system commonly used by linux.Journaled file system commonly used by linux. (journaling capability means no worrying about (journaling capability means no worrying about

metadata corruption. What is most noticeable is metadata corruption. What is most noticeable is that you can switch back and forth between ext2 that you can switch back and forth between ext2 and ext3 on a partition without any problem: it is and ext3 on a partition without any problem: it is just a matter of giving the mount command the just a matter of giving the mount command the right file system type. )right file system type. )

Page 38: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

AdvantagesAdvantages

(over ext2 file system)(over ext2 file system)

SimpleSimple Have the facility of backup and restore dataHave the facility of backup and restore data journaling improves reliabilityjournaling improves reliability

indexing for larger directories.indexing for larger directories.

Page 39: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Size limitsSize limits

Block Block sizesize

Max file Max file sizesize

Max filesystem Max filesystem sizesize

1 KB1 KB 16 GB16 GB 2 TB2 TB

2 KB2 KB 256 GB256 GB 8 TB8 TB

4 KB4 KB 2 TB2 TB 16 TB16 TB

8 KB8 KB 2 TB2 TB 32 TB32 TB

Page 40: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Journaling levels Journaling levels

There are three levels.There are three levels.

Journal (lowest risk)Journal (lowest risk) Ordered (medium risk) Ordered (medium risk) Write back (highest risk)Write back (highest risk)

Page 41: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Both metadata and file contents are written to the Both metadata and file contents are written to the journal before being committed to the main file journal before being committed to the main file system. system.

Only metadata is journaled; file contents are not, but Only metadata is journaled; file contents are not, but it's guaranteed that file contents are written to disk it's guaranteed that file contents are written to disk before associated metadata is marked as committed before associated metadata is marked as committed in the journal.in the journal.

Only metadata is journaled; file contents are not. Only metadata is journaled; file contents are not. The contents might be written before or after the The contents might be written before or after the journal is updated. journal is updated.

Page 42: FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit 07-13

Thanks!!!!!!!!!!Thanks!!!!!!!!!!