1 itec 400 Unix File Systems George Vaughan Franklin University.

Slides:



Advertisements
Similar presentations
Va-scanCopyright 2002, Marchany Unit 8 – Solaris File Systems Randy Marchany VA Tech Computing Center.
Advertisements

ITI-481: Unix Administration Rutgers University Center for Applied Computer Technologies Christopher Uriarte, Instructor Meeting 4.
Chapter 9 Part III Linux File System Administration
Hands-on RAID on Moxa Computer Prepared by: (40min) Date: mm-dd-yyyy.
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.
File Systems.
What to expect.  Linux  Windows Server (2008 or 2012)
Allocation Methods - Contiguous
File Systems Examples.
CIS 240 Introduction to UNIX Instructor: Sue Sampson.
Introduction to Unix (CA263) File System
Chapter 8 Adding a Disk. Computer Center, CS, NCTU 2 Disk Interface  SCSI Small Computer Systems Interface High performance and reliability  IDE (or.
Operating Systems File Systems (in a Day) Ch
Operating Systems File Systems (Select parts of Ch 6)
5.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 5: Working with File Systems.
Linux Install. Resources Guide to Linux Installation and Administration, Nicholas Wells, Course Technology, 2000.
Operating Systems File Systems (Select parts of Ch 11-12)
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.
Tasks Necessary for Setting Up a Hard Disk Initializing the disk with basic or dynamic storage type Creating partitions on basic disks or volumes on dynamic.
Week 10 Project 3: An Introduction to File Systems
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)
Storage and NT File System INFO333 – Lecture Mariusz Nowostawski Noria Foukia.
Chapter Sixteen Data Recovery and Fault Tolerance.
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.
Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.
Disk Access. DISK STRUCTURE Sector: Smallest unit of data transfer from/to disk; 512B 2/4/8 adjacent sectors transferred together: Blocks Read/write heads.
 SCSI › Small Computer Systems Interface › High performance and reliability  IDE (or ATA) › Integrated Device Electronics (or AT Attachment) › Low cost.
Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies.
Chapter 2 Installation Overview. Planning the Installation Questions: –Size of partitions –Where to put partitions –Which software packages to install.
Boot Diskettes, Bootable USB Keys and Live CDs Used when the computer can't start for some reason, as a diagnostic, repair and recovery tool. Boot diskettes.
1Fall 2008, Chapter 11 Disk Hardware Arm can move in and out Read / write head can access a ring of data as the disk rotates Disk consists of one or more.
CIS Lesson 2 Storage Devices. CIS Lesson 2 Floppy drive and diskettes Hard drive (IDE and SCSI) USB flash drive (aka pen drive) Storage Devices.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
C HAPTER 7 Managing Disk and File System. I NTRODUCING DISK MANAGEMENT 2 types of hard disk storage supported by Windows XP are: basic hard disk & dynamic.
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.
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.
CE Operating Systems Lecture 20 Disk I/O. Overview of lecture In this lecture we will look at: Disk Structure Disk Scheduling Disk Management Swap-Space.
Sys Admin Course Physical Storage and File Systems Fourie Joubert.
Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical.
Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2010 by Scott Orr and the Trustees of Indiana University.
Manage Directories and Files in Linux. 2 Objectives Understand the Filesystem Hierarchy Standard (FHS) Identify File Types in the Linux System Change.
CS 153 Design of Operating Systems Spring 2015 Lecture 22: File system optimizations.
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,
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.
Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups.
Hp education services education.hp.com hp education services education.hp.com 1 HP World/Interex 2002 Linux File System Support Chris Cooper (734)
1 CEG 2400 Fall 2012 Network Servers. 2 Network Servers Critical Network servers – Contain redundant components Power supplies Fans Memory CPU Hard Drives.
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)
Linux Filesystem Administration
Chapter 10: Managing Software Packages and File Systems
Storage HDD, SSD and RAID.
Chapter 8 Unix & Linux.
Chapter 8 Adding a Disk.
Filesystem Management and Backups
Chapter 11: File System Implementation
Chapter 12: File System Implementation
Basic Commands ls cp ls –l (in detail format) echo ls –a
CIT 470: Advanced Network and System Administration
Operating System Module 1: Linux Installation
Lecture 43 Syed Mansoor Sarwar
Presentation transcript:

1 itec 400 Unix File Systems George Vaughan Franklin University

2 Topics Types of File Systems Basic File System Administration Logical Volume Managers Disk Striping RAID and Disk Mirroring Samba Using MS-DOS floppies with Solaris/Linux

3 Types of File Systems Historical Unix File Systems –Unix System V (s5fs) Used to be predominant Unix Files System Traded performance for space efficiency (small block size [1 or 2K] critical structures not replicated –BSD Fast File System (FFS) Better performance than s5fs Larger block size [4k or 8k] block sharing between files. attempt to locate blocks of file near each other organize partition in cylinder groups improved reliability by replication of super block Complicated disk geometry made fsck very slow.

4 Types of File Systems Modern Unix File Systems –Journal-ed File Systems maintains a log of changes using transaction entries If system crashes, journal log entries are replayed to reconstruct data. –BSD Soft Updates similar to journal approach file system changes are maintained in memory as metadata. maintains dependency information

5 Types of File Systems Default File Systems on Unix/Linux 1 FreeBSDLinix (RH) Linux (SuSE) Solaris Typeufsext3reiserfsufs Journaled?Soft- updates yes

6 Basic File System Administration Basic File System Administration includes: –Creating Disk Partitions –Formatting Disk Partitions –Creating File Systems –Checking File Systems –Creating Mount Points –Mounting File Systems –Unmounting File Systems The following slides illustrate basic file system administration using a floppy disk drive and Red Hat Linux

7 Creating Disk Partitions fdisk - used for creating, deleting and administering disk partitions 0014: # fdisk /dev/hda 0015: Command (m for help): p 0016: 0017: Disk /dev/hda: 255 heads, 63 sectors, 2434 cylinders 0018: Units = cylinders of * 512 bytes 0019: 0020: Device Boot Start End Blocks Id System 0021: /dev/hda1 * c Win95 FAT32 (LBA) 0022: /dev/hda Linux 0023: /dev/hda Linux swap

8 Formatting Disk Partitions Line 1: format the floppy using fdformat 0001 # fdformat /dev/fd Double-sided, 80 tracks, 18 sec/track. Total capacity 1440 kB Formatting... done 0004 Verifying... done

9 Creating File Systems Line 7: Make file system using mkfs 0007 # mkfs -t ext2 -m 0 /dev/fd mke2fs 1.23, 15-Aug-2001 for EXT2 FS 0.5b, 95/08/ Filesystem label= 0010 OS type: Linux 0011 Block size=1024 (log=0) 0012 Fragment size=1024 (log=0) inodes, 1440 blocks blocks (0.00%) reserved for the super user

10 Creating File Systems 0015 First data block= block group blocks per group, 8192 fragments per group inodes per group Writing inode tables: done 0021 Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 39 mounts or days, whichever comes first. Use tune2fs -c or -i to override.

11 Checking File Systems Line 26: Use fsck to check newly created file system 0026 # fsck /dev/fd Parallelizing fsck version 1.23 (15-Aug-2001) 0028 e2fsck 1.23, 15-Aug-2001 for EXT2 FS 0.5b, 95/08/ /dev/fd0: clean, 13/184 files, 44/1440 blocks

12 Mounting and Unmounting File Systems Unix has a logical single file directory structure, starting with the root. Logical directory tree may be composed of many directory trees on many file systems. The tree can be expanded by adding additional file systems to mount points. A mount point can be any directory on the existing logical directory tree.

13 Mounting and Unmounting File Systems ‘mount’ command used to add the directory system to the existing logical directory tree. ‘umount’ command used to remove a file system from existing logical tree. Any files in a directory that serves as a mount point are obscured when a filesystem is mounted at that point. Any files in a directory that serves as a mount point will re-appear when the filesystem at that mount point is unmounted.

14 Mounting and Unmounting File Systems To mount a filesystem you need: –to create a mount point (if one does not exist) –use the mount command mount device mount_point –device: a disk or disk partition (/dev/hda3, /dev/fd0) –mount_point: an existing directory in the logical tree

15 Creating Mount Points Line 31-32: create the mount point 0031 # cd /mnt 0032 # mkdir mySpace

16 Mounting File Systems 0034 # mount 0035 /dev/hda2 on / type ext3 (rw) 0036 none on /proc type proc (rw) 0037 usbdevfs on /proc/bus/usb type usbdevfs (rw) 0038 none on /dev/pts type devpts (rw,gid=5,mode=620) 0039 none on /dev/shm type tmpfs (rw) 0040 /dev/hdb2 on /home type ext2 (rw) 0041 /dev/hdb1 on /mnt/msdos/d type msdos (rw) 0042 none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) Line 34: ‘mount’ with no arguments shows currently mounted filesystems

17 Mounting File Systems 0044 # mount /dev/fd0 /mnt/mySpace # mount 0047 /dev/hda2 on / type ext3 (rw) 0048 none on /proc type proc (rw) 0049 usbdevfs on /proc/bus/usb type usbdevfs (rw) 0050 none on /dev/pts type devpts (rw,gid=5,mode=620) 0051 none on /dev/shm type tmpfs (rw) 0052 /dev/hdb2 on /home type ext2 (rw) 0053 /dev/hdb1 on /mnt/msdos/d type msdos (rw) 0054 none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) 0055 /dev/fd0 on /mnt/mySpace type ext2 (rw) Line 44: Mount the new fs Line 55: mount command shows new fs

18 Using File Systems Line 61: copy a file into new fs Line 65: Check out the space on new fs 0061 # cp /etc/inittab /mnt/mySpace/george 0062 # ls 0063 inittab # df /mnt/mySpace 0066 Filesystem 1k-blocks Used Available Use% Mounted on 0067 /dev/fd % /mnt/mySpace

19 Unmounting File Systems Line 69: We attempt to unmount the file system /dev/fd0. Line 70: the filesystem is busy so we can’t unmount. Line 73: list of processes using /dev/fd # umount /dev/fd umount: /mnt/mySpace: device is busy # fuser -u -m /dev/fd /dev/fd0: 13038c(gvaughan) 13192c(gvaughan) 13195c(gvaughan)

20 Unmounting File Systems Line 75: use fuser to kill processes using filesystem. Line 77: unmount filesystem (no complaints this time) 0075 # fuser -k -m /dev/fd /dev/fd0: 13038c 13192c 13195c 0077 # umount /dev/fd0

21 Filesystem Config File Filesystems can be configured to be mounted at boot. The config file is: /etc/fstab Must specify such things as: –device name –mount point –file system type ‘mount -a’ can be used to mount all fs’s in /etc/fstab.

22 Disk Drive A Disk Drive is composed of 1 or more (usually more) stacked platters. Each platter has 2 surfaces. Each Surface has a r/w head.

23 File Systems and Disks (Traditional View) A partition is a logical subset of a drive A drive may have 1 or more concentric partitions (cylinders) A partition is logically 3 dimensional (cylinders: area of ring x platters x 2). One filesystem per partition partitions cannot be dynamically resized.

24 File Systems and Disks (Logical Volume Managers) A Volume Group is composed of one or more disk drives (or UNIX partitions). Each disk drive is broken up into LVM partitions of standard size (4MB). A volume group can be split into logical volumes (which can also be span multiple drives).

25 File Systems and Disks (Logical Volume Managers) There is a 1 to 1 mapping between a file system and a logical volume. Therefore, a file system can span more than 1 disk drive. Logical volumes can be dynamically resized. With LVM, we mount logical volumes instead of disk partitions. Supported by most Unix/Linux distributions including Solaris and Redhat.

26 Disk Striping Used in configurations involving multiple physical disk drives into one logical drive Can be used to improve performance. Can be used to support very large files. Files are spread across physical drives so different parts of the file can be read/written to concurrently. Supported by Solaris, Linux and others…

27 Disk Mirroring and Raid A configuration involving multiple physical drives to maintain multiple copies of files. RAID - Redundant Array of Independent Disks. Replication of data is at the O.S. or even at the controller level. Application does not worry. Sometimes 3 sets are maintained to resolve discrepancies. Supported by Solaris, Linux and others…

28 RAID RAID – Redundant Array of Independent (Inexpensive) Disks. A set of techniques for grouping disks together for performance and/or fault tolerance. Filesystem is spread across grouped disks There are many ways to group RAID disks; these groupings are called RAID Levels.

29 RAID Levels There are many RAID Levels – some are shown below:

30 RAID RAID Tutorial –The link below provides a nice interactive tutorial on RAID: –

31 Network File System (NFS) NFS allows filesystems to be shared across multiple computers. Computers do not need to be of same manufacturer of version of Unix/Linux. NFS protocol designed by SUN in mid 1980’s. Supported by Solaris, Linux and others…

32 Samba Samba - an application (server) that runs on Unix/Linux. Samba allows Unix/Linux filesystems to look like MS drives. MS machine thinks it is mapping an MS drive. Great for allowing Unix/Linux machine to act as MS file server.

33 Using MS-DOS Floppies With Linux 1.fdformat /dev/fd0 2.mkfs -t msdos /dev/fd0 3.mount /dev/fd0 /mnt/floppy 4.do whatever with /mnt/floppy… 5.umount /mnt/floppy 6.eject floppy

34 References 1.Essential System Administration, Aeleen Frisch, Linux Administration Handbook, Evi Nemeth, et. al., n_98/lectures/file1.pdfhttp:// n_98/lectures/file1.pdf usenix2000/general/seltzer.htmlhttp:// usenix2000/general/seltzer.html