Hp education services education.hp.com hp education services education.hp.com 1 HP World/Interex 2002 Linux File System Support Chris Cooper (734) 805-2172.

Slides:



Advertisements
Similar presentations
ITI-481: Unix Administration Rutgers University Center for Applied Computer Technologies Christopher Uriarte, Instructor Meeting 4.
Advertisements

Chapter 12: File System Implementation
Chapter 9 Part III Linux File System Administration
Operating Systems File Management.
Basic Unix system administration
Linux Installation LINUX INSTALLATION. Download LINUX Linux Installation To install Red Hat, you will need to download the ISO images (CD Images) of the.
04/21/2004CSCI 315 Operating Systems Design1 Disk Management.
A Guide to Unix Using Linux Fourth Edition
Allocation Methods - Contiguous
1 itec 400 Unix File Systems George Vaughan Franklin University.
Introduction to Unix (CA263) File System
File Management Systems
Lecture 10: The FAT, VFAT, and NTFS Filesystems 6/17/2003 CSCE 590 Summer 2003.
GNU/Linux Filesystem 1 st AUT GNU/Linux Festival Computer Engineering & IT Department Bahador Bakhshi.
Guide To UNIX Using Linux Third Edition
5.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 5: Working with File Systems.
Laksh mi.  fdisk is an interactive utility to manipulate disk partitions.  Use fdisk –l to review the disks and partitions on the system.  Use fdisk.
1 Chapter Overview Managing Compression Managing Disk Quotas Increasing Security with EFS Using Disk Defragmenter, Check Disk, and Disk Cleanup.
F ILE S YSTEMS comparison of FAT, NTFS, and Linux.
Configuring Disk Quotas Linux System Administration To implement disk quotas, use the following steps: Enable quotas per file system by modifying /etc/fstab.
SUSE Linux Enterprise Server Administration (Course 3037)
Objectives Learn what a file system does
Unix File System Internal Structures By C. Shing ITEC Dept Radford University.
Linux Installation and Administration – Lesson 5 Tutor: George Papamarkos Topic: Devices in Linux.
LIS508 lecture 5: storage devices Thomas Krichel
File Systems (1). Readings r Silbershatz et al: 10.1,10.2,
Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
Window NT File System JianJing Cao (#98284).
MCTS Guide to Microsoft Windows Vista Chapter 4 Managing Disks.
Chapter 6: Linux Filesystem Administration
1 Interface Two most common types of interfaces –SCSI: Small Computer Systems Interface (servers and high-performance desktops) –IDE/ATA: Integrated Drive.
Managing Disks and Drives Chapter 13 powered by dj.
Chapter 1 Managing Storage. Contents Understanding Partitioning Understanding LVM Understanding RAID Understanding Clustering and GFS Using Access Control.
1 Objectives Manage and install new file systems.
Sys Admin Course Physical Storage and File Systems Fourie Joubert.
Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2010 by Scott Orr and the Trustees of Indiana University.
Chapter 5 File Management File System Implementation.
Windows Vista Inside Out Chapter 28 - Chapter 28 - Managing Disks and Drives Last modified
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 11: File System Implementation.
Chapter 11: File System Implementation Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Implementation.
Creating and Managing File Systems. Module 5 – Creating and Managing File Systems ♦ Overview This module deals with the structure of the file system,
1 LINUX SECURITY. 2 Outline Introduction Introduction - UNIX file permission - UNIX file permission - SUID / SGID - SUID / SGID - File attributes - File.
Linux+ Guide to Linux Certification Chapter Six Linux Filesystem Administration.
System Administration – Part 2. Devices in UNIX are files: A device can be accessed with different file names All device files are stored in /dev or its.
UNIX File System (UFS) Chapter Five.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop V Files and the File System Part B – File System.
FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit
Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups.
Digital Forensics Dr. Bhavani Thuraisingham The University of Texas at Dallas Lecture #8 File Systems September 22, 2008.
File system and file structures
1 The File System. 2 Linux File System Linux supports 15 file systems –ext, ext2, xia, minix, umsdos, msdos, vfat, proc, smb, ncp, iso9660, sysv, hpfs,
Hands-On Microsoft Windows Server 2008 Chapter 7 Configuring and Managing Data Storage.
Materi managing user & groups, file system Managing Software Packages and File Systems The Complete Guide to Linux System Administration Chapter 10.
1 C1-UD 6-6 BASIC LINUX FILE MANAGEMENT. Part IV. File System Administration Academic Year DAI. Credit 1 (Single and Multiuser Operating Systems)
ORAFACT The Linux File System. ORAFACT Filesystem Support Support for dozens of filesystem types including: Minix, ext2, MS-DOS, UMSDOS, VFAT, NTFS, NFS,
Linux Filesystem Administration
Day 28 File System.
File-System Management
Chapter 8 Adding a Disk.
Configuring Disk Quotas
Filesystem Management and Backups
Chapter 11: File System Implementation
Chapter 12: File System Implementation
Chapter 6 File Systems CSNB113 SYSTEM ADMINISTRATION
Introduction to Computers
Operating System Module 1: Linux Installation
Linux File Systems Partitioning Mounting File Systems
COP 4343 Unix System Administration
Configuring Disk Quotas
Presentation transcript:

hp education services education.hp.com hp education services education.hp.com 1 HP World/Interex 2002 Linux File System Support Chris Cooper (734) George Vish II (404)

hp education services education.hp.com hp education services education.hp.com 2 Linux File System Management Version A.00 U2794S Module 11 Slides

© 2002 Hewlett-Packard Company U2794S A.00 3 Why Use Different File Systems? Linux supports multiple file system types. File systems types include: disk-based, CD-ROM and network- based file systems. Advantages of this support include: –Data can be made available when required. –Old and new file system types can be used together. –Backups can be taken offline while other file systems are in use. Disadvantages include: –Administration overhead increases. –Backup policy becomes more complicated.

© 2002 Hewlett-Packard Company U2794S A.00 4 The Linux operating system supports many types of file systems. File systems are created in disk partitions. (or Logical Volumes) The following are a few of the file system types supported under the Linux Kernel File Systems Supported under Linux ext2fs ext3fs reiser JFS Veritas NFS RFS SMB (CIFS) Minix Vfat Fat16 Fat32 MSDOS NTFS ISO 9660 And many, many more !

© 2002 Hewlett-Packard Company U2794S A.00 5 The ext2fs/ext3fs File Systems The ext2fs file system consists of: –a super block (with backup super blocks spread over the partition) – a cylinder group block for each cylinder group – an inode table (spread over the available cylinder groups) (This is the file system that is most similar to the classic UFS) The mkfs (mkfs.ext2) command is used to create the file system and the fsck (fsck.ext2) command is used to check it’s consistency and make repairs. The recently released ext3fs (available on 2.4.x kernel distributions) adds the feature of a recovery journal to the basic layout of the ext2fs. Early experimentation shows it to be reliable.

© 2002 Hewlett-Packard Company U2794S A.00 6 ext2fs File System Format The ext2 file system consists of a number of cylinder groups. Each cylinder group contains a portion of the inode table. Data is written, whenever possible, in contiguous data chunks. Disk fragmentation is kept to a minimum (usually less than 3%). /dev/hda1 CylGrp1CylGrp2CylGrp3CylGrp4CylGrp5 IIxxddddddxxIIxxxddddddxIIxxxxddddddIIxdddIIxxx

© 2002 Hewlett-Packard Company U2794S A.00 7 ext2fs Super Block The super block contains the following details: –size of the partition –size of remaining space within the partition –number of cylinder groups –size of cylinder groups –total number of inodes –number of free inodes Backup super blocks are spread over the disk, one per cylinder group.

© 2002 Hewlett-Packard Company U2794S A.00 8 Journal File Systems for Linux Much recent development has been centered on providing Linux with fast recovery Journal File Systems. The Rieser File System has been in development for some time and has been released for evaluation. IBM recently “opened” their JFS file system and the Linux port has been proceeding rapidly. It seems to be feast of famine, prior to the 2.4.x release there was no available file systems with the journal feature and now we have at a minimum three open source choices !

© 2002 Hewlett-Packard Company U2794S A.00 9 FAT16/FAT32/Vfat/MSDos/NTFS These file systems are used by the Microsoft Windows operating systems (95/98/2000/NT). These file systems suffer from severe fragmentation over prolonged use and require regular defragmentation in order to provide reasonable performance. A number of software tools ( mtools ) are provided with Linux to support the FAT16/FAT32 file systems. While the NTFS file system may be accessed by the Linux kernel as a R/O file system, building the Linux kernel with NTFS write capabilities is considered a developmental and somewhat risky endeavor. Until it is further refined we suggest only using the R/O mount functionality.

© 2002 Hewlett-Packard Company U2794S A CD-ROM File Systems This file system type is used for the CD-ROM file storage The ISO 9660 format is used by the IT and Software industry. Even CD’s containing Micro-Soft OS file follow this standard.

© 2002 Hewlett-Packard Company U2794S A Other File Systems Other file systems supported by Linux include: –Veritas (VxFS) file system (Veritas Software Corporation) –Network File System (NFS) (Sun Microsystems, Inc.) –Remote File System (RFS)

© 2002 Hewlett-Packard Company U2794S A A disk can be subdivided into partitions. Partitions can contain file systems. Disk partitions are accessed through a device file (for example, /dev/hda2 ). Data is written in disk blocks (historically 1 disk block = 1 sector = 512 bytes). sector partition: A range of consecutive cylinders spindle platters trackcylinder read/write heads device: /dev/hda2 Devices and File Systems

© 2002 Hewlett-Packard Company U2794S A Disk Partitions Disk partition details can be displayed using any of the following commands: # fdisk -l # hdparm -g is the letter associated with the hard disk drive. # parted (at the prompt enter print then quit to exit) These commands display the geometry details for the disk (number of cylinders/number of tracks per cylinder/number of sectors per track).

© 2002 Hewlett-Packard Company U2794S A User RAMBuffer CacheBlock Disk Device File Data Copy of Data Step 1: User RAMBuffer CacheBlock Disk Device File Data Copy of Data Marked as Available Step 2: Block Disk Devices When using block disk devices, data is first written to a buffer cache, then written to disk using blocks. The data is retained in the buffer cache until that area of cache is required by another disk input/output operation.

© 2002 Hewlett-Packard Company U2794S A User RAM Cache not used Raw Disk Device File Data Step 1: File Data Character (Raw) Disk Devices Data is written as a stream of characters. Data is not written to buffer cache. Data is written on disk as a consecutive stream of characters.

© 2002 Hewlett-Packard Company U2794S A Making a File System mkfs File systems are made using the mkfs command. Before using the mkfs command, the administrator must know: –What file system type is to be made? –Are there special options that must be used? –What is the device name of the storage medium to be used? –Should space be reserved for the root user? An example mkfs command: # mkfs -t ext2

© 2002 Hewlett-Packard Company U2794S A The mount command is used to mount file systems to the directory hierarchy. # mount /dev/fd0 -t msdos /mnt/floppy floppy / /dev/hd0a /dev/fd0 File system from floppy disk File system from hard disk / mnt The mount Command

© 2002 Hewlett-Packard Company U2794S A The /etc/fstab file is read by the mount command at boot time and subsequent to a system boot. # cat /etc/fstab /dev/hda1 / ext2 defaults 1 1 /dev/hda5 swap swap defaults 0 0 /dev/fd0 /mnt/floppy ext2 noauto 0 0 /dev/cdrom /mnt/cdrom iso9660 noauto,ro 0 0 none /proc proc defaults 0 0 none /dev/pts devpts mode= Device to Mount-point F/S Mount Backup fsck Mount Directory Type Options Check Pass Mounting at Boot Time — the fstab file

© 2002 Hewlett-Packard Company U2794S A The following steps are required for adding a hard disk drive unit (after adding the hard disk drive to the system): 1.Run fdisk to create the necessary partitions. 2.Create file system(s) in the relevant partition(s). 3.Create a mount-point directory(s). 4.Edit the /etc/fstab file to allow automated mount. Adding a Hard Disk

© 2002 Hewlett-Packard Company U2794S A The Inode Table Files and directories have an inode number. The system maintains a lookup table by reading the directory files and storing sets of information in RAM. The inode table is stored on disk. Inodes are found in cylinder groups on disk. Inodes contain the ownership and permission details of the file/directory. Inodes contain pointers to the file/directory data on the disk. A file will, generally, be created in the same cylinder group area as the directory in which that file exists. The mkfs command creates the inode table.

© 2002 Hewlett-Packard Company U2794S A File System Health The fsck command verifies the inode table entries. fsck is used to maintain the integrity of the file system structural data. It can be run at boot-time, controlled by an entry in /etc/fstab. It may be run manually by the root user. fsck should not be run on a mounted or in-use file system. The syntax for fsck is: # fsck [-AVRTNP] [-s] [-t fstype] filesystem fsck should not be run on the root file system while in read/write mode, this could corrupt the file system.

© 2002 Hewlett-Packard Company U2794S A fsck Several checks are run by fsck These are: –Checking inodes, blocks and sizes –Checking directory structure –Checking directory connectivity –Checking reference counts –Checking group summary information fsck checks the consistency of data stored in the inode table and will fix any corruption, if possible Files may be “recovered” in the lost+found directory.

© 2002 Hewlett-Packard Company U2794S A Out of Inodes Users view disk storage as “volume” in Megabytes. The available disk space can be checked using df -k. It is possible to run out of inode table entries before all of the disk space has been used up (on some file system types, ie. ext2fs). The remaining inode count can be checked using df -i. # df -i File system Inodes IUsed IFree IUse% Mounted on /dev/hda % / /dev/hda % /home

© 2002 Hewlett-Packard Company U2794S A Problems with Unmounting Disks Partitions cannot be unmounted when the file system is in use. File systems can be in use by both system and user processes. If an attempt is made to unmount a file system that is in use, a warning message is displayed. # umount /spare2 umount: /spare2: device is busy # What directory are you currently in ??

© 2002 Hewlett-Packard Company U2794S A fuser The fuser command can be used to show which processes are using the file system. The -k option can be used to “ kill ” the process(es) that is/are using the file system. –# fuser /spare2 –/spare2: 1010c –# fuser -u /spare2 –/spare2: 1010c(root) –# fuser -ku /spare2 –/spare2: 1010c(root) The “c” suffix denotes that associated pid# has a current directory open, “e” is an executable, “f” is an open file, “r” is a root directory, “m” is a mapped file

© 2002 Hewlett-Packard Company U2794S A Additional File System Controls Disk Quotas: Enable quotas to limit users taking up too much disk space. Configure /home to be on a separate partition. To enable quotas: –Change entry in /etc/fstab, add usrquota and/or grpquota to the options. –Remount the partition with the mount command.. –Use quotacheck to calculate existing usage. –Use quotaed and quotaon to configure and switch on quota management. Test quota management for your users. Let your users know you have enabled quotas. Immutable Files: The ext2 filesystem has additional attributes. We will focus on the I attribute. The I attribute makes a file immutable. When set, the file cannot be renamed, modified, deleted, or even linked to. Only the system administrator can set this attribute. The I attribute will not allow even root to do any modifications to the file. Use the chattr command to set the file’s attribute. Use the lsattr command to show the file’s attribute. Example: chattr +i /etc/inetd.conf