Creating and Managing File Systems. Module 5 – Creating and Managing File Systems ♦ Overview This module deals with the structure of the file system,

Slides:



Advertisements
Similar presentations
Chapter 9 Part III Linux File System Administration
Advertisements

Working with Disks and Devices
1 Dynamic DNS. 2 Module - Dynamic DNS ♦ Overview The domain names and IP addresses of hosts and the devices may change for many reasons. This module focuses.
Linux Boot Loaders. ♦ Overview A boot loader is a small program that exists in the system and loads the operating system into the system’s memory at system.
Linux Installation LINUX INSTALLATION. Download LINUX Linux Installation To install Red Hat, you will need to download the ISO images (CD Images) of the.
LinuxChix Africa UNIX BASICS. To r00t or not to r00t ● Unix security is (in most cases) binary. Either you are root or you are not. – Effects on permissions.
CIS 240 Introduction to UNIX Instructor: Sue Sampson.
Introduction to Unix (CA263) File System
1 Web Server Administration Chapter 3 Installing the Server.
GNU/Linux Filesystem 1 st AUT GNU/Linux Festival Computer Engineering & IT Department Bahador Bakhshi.
Computer Forensics Principles and Practices by Volonino, Anzaldua, and Godwin Chapter 6: Operating Systems and Data Transmission Basics for Digital Investigations.
Guide To UNIX Using Linux Third Edition
Linux Install. Resources Guide to Linux Installation and Administration, Nicholas Wells, Course Technology, 2000.
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 Data Storage Creating Dynamic Disks Implementing Storage Quotas Managing Compression and Encryption.
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)
1 SAMBA. 2 Module - SAMBA ♦ Overview The presence of diverse machines in the network environment is natural. So their interoperability is critical. This.
Managing Software using RPM. ♦ Overview In Linux, Red Hat Package Manager referred as RPM is a tool used for managing software packages and its main function.
SUSE Linux Enterprise Desktop Administration Chapter 1 Install SUSE Linux Enterprise Desktop 10.
Guide To UNIX Using Linux Fourth Edition
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
Guide to Linux Installation and Administration, 2e1 Chapter 3 Installing Linux.
Fall 2011 Nassau Community College ITE153 – Operating Systems Session 14 Windows XP Professional 1.
Connecting to Network. ♦ Overview ► A network connection is required to communicate with other computers when they are in a network. Network interface.
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 4 Manage Software for SUSE Linux Enterprise Server.
1 Network File Sharing. 2 Module - Network File Sharing ♦ Overview This module focuses on configuring Network File System (NFS) for servers and clients.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
Managing User Accounts. Module 2 – Creating and Managing Users ♦ Overview ► One should log into a Linux system with a valid user name and password granted.
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.
Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical.
Managing Files. Module 5 Managing Files ♦ Introduction “On a Linux system, everything is a file; if something is not a file, it is a process.” ♦ Topics.
Manage Directories and Files in Linux. 2 Objectives Understand the Filesystem Hierarchy Standard (FHS) Identify File Types in the Linux System Change.
A Practical Guide to Fedora and Red Hat Enterprise Linux Unit 9: Basic Linux Administration Chapter 11: System Administration: Core Concepts Chapter 16:
Kickstart Installation
Linux Kernel Management. Module 9 – Kernel Administration ♦ Overview The innermost layer of Linux operating system is the kernel, which is a thin layer.
Shell Advanced Features. Module 8 Shell Advanced Features ♦ Introduction In Linux systems, the shells are often referred to as command line interfaces.
Linux Security. Module 13 – Linux Security ♦ Overview Linux is more prone today to security loopholes and attacks, both inside and outside the network.
1 Network Information System (NIS). 2 Module – Network Information System (NIS) ♦ Overview This module focuses on configuring and managing Network Information.
Linux+ Guide to Linux Certification Chapter Six Linux Filesystem Administration.
Week Fourteen Student name: David Long Open source topic : KeePass Student name: Matthew Tankersley Open source topic : Blender 3D Modeling Student name:
Linux Operations and Administration
CSC414 “Introduction to UNIX/ Linux” Lecture 6. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
Hp education services education.hp.com hp education services education.hp.com 1 HP World/Interex 2002 Linux File System Support Chris Cooper (734)
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)
Red Hat ® I NTERNET S YS A DMIN Introduction to Linux.
ORAFACT The Linux File System. ORAFACT Filesystem Support Support for dozens of filesystem types including: Minix, ext2, MS-DOS, UMSDOS, VFAT, NTFS, NFS,
1 C1-UD 6-2 INSTALLING LINUX Academic Year DAI. Credit 1 (Single and Multiuser Operating Systems) Ferran Chic PELE-08/09 (Pla Experimental Llengües.
Linux Filesystem Administration
Agenda The Linux File System (chapter 4 in text) Linking Files Hard Links / Symbolic Links Disk Storage Checking for Disk Space (df / du) Archiving (Backing.
Linux and File Systems What is a file system?.
Chapter 10: Managing Software Packages and File Systems
Chapter 8 Unix & Linux.
Answer to Summary Questions
Configuring Disk Quotas
Guide to Linux Installation and Administration, 2e
Installing OS.
Basic Commands ls cp ls –l (in detail format) echo ls –a
Operating System Module 1: Linux Installation
IS3440 Linux Security Unit 4 Securing the Linux Filesystem
Linux File Systems Partitioning Mounting File Systems
COP 4343 Unix System Administration
Devices, Linux Filesystems,and the Filesystem Hirarchy standard
Configuring Disk Quotas
Presentation transcript:

Creating and Managing File Systems

Module 5 – Creating and Managing File Systems ♦ Overview This module deals with the structure of the file system, the standard types of file system in Linux. This module also deals with the file system structure, mounting file system and unmounting file systems and disk quotas. ♦ Lessons covered in this module ► File System Structure ► ext2 and ext3 File System ► Creating File Systems ► Checking File Systems ► Mounting and Unmounting File Systems ► Disk Quotas

Creating and Managing File Systems ♦ Introduction A file system is a data structure which interprets the physical sector of a disc into logical directory structure. The logical structure will help computers and users to trace files. The file system registers the location of the files and directories on the disc ♦ Topics Covered in this Lesson ► What is File System Structure ► File System Hierarchy Standard ► Special File Locations under Red Hat Linux Standard Lesson 1 – File System Structure

Creating and Managing File Systems Topic 1 – What is File System Structure ♦ The file system structure is the most basic level of organization in an operating system. ♦ A file system is an organization of storage space intended to contain files in directories. Providing a common file system structure ensures users and programs are able to access and write files. ♦ File systems are divided into two categories: ♦ Static and dynamic files. Contd …

Creating and Managing File Systems Contd … The Virtual File System (VFS)

Creating and Managing File Systems Topic 2 – File System Hierarchy Standard Red Hat Enterprise Linux uses the File System Hierarchy Standard (FHS) file system structure Linux Directory Structure Contd …

Creating and Managing File Systems Topic 3 – Special File Locations under Red Hat Linux Standard ♦ Red Hat Enterprise Linux has made an extension of FHS structure slightly to contain special files. ♦ Files related to RPM (Red Hat Package Manager) are placed in the /var/lib/rpm directory. ♦ The /var/spool/up2date/ directory holds files used by Red Hat Update Agent.. ♦ The /etc/sysconfig directory is also specific to Red Hat Enterprise Linux. Topic 2 – File System Hierarchy Standard

Creating and Managing File Systems Lesson 2 – ext2 and ext3 File system ♦ Introduction Linux supports several file systems but the most commonly used was the Second Extended or ext2 file system. Now the ext2 file system has been replaced by Third Extended or ext3 file system, which is a journaling version of ext2 file system. ♦ Topics covered in this lesson ► Second extended or ext2 File System ► The ext3 File System ► ext2 and ext3 File System Attributes

Creating and Managing File Systems Topic 1 – Second extended or ext2 File System ♦ In Linux, the ext2 file system or second extended file system was the file system by default. ♦ It supports partitions that are up to 4 terabytes or 4096 Gigabytes in size and a file of up to 2 Gigabytes in size. Physical layout of the ext2 File System

Creating and Managing File Systems The ext2 Inode ♦ In the ext2 file system, the inode is the basic building block; every file and directory in the file system is described by one and only one inode

Creating and Managing File Systems ♦ In the ext2 file system, directories are special files that are used to create and hold access paths to the files in the file system ext2 Directories

Creating and Managing File Systems Topic 2 – The ext3 File System ♦ This is the third extended file system, ext3 is used by Linux currently and it is a journaling file system. ♦ Journaling file system keeps temporary data in a new location, unrelated to the permanent data and metadata on disk. ♦ ext3 file system is an enhanced version of the ext2 file system ♦ There are several advantages of ext3 File system over ext2 file system

Creating and Managing File Systems Topic 3 - ext2 and ext3 File System Attributes ♦ Besides to the UNIX-derived modes of permission, the ext2 file system structure gives a few data controls or attributes. To enable file attributes, the following command is used: Chattr +|-| = [attribute…] file [file….] ♦ Some of the attributes given below may be enabled: A when a file is modified, its atime record is not modified. D the file is skipped for backup by dump.

Creating and Managing File Systems Lesson 3 – Creating File Systems ♦ Introduction File systems are created on the partitions. The partitions have to be created before creating a file system. By default ext2 file system is generated when the ‘make file system’ command is used. But now ext3 is the file system by default ♦ Topics Covered in this Lesson ► Creation of an ext2 File System ► Creation of an ext3 File System ► Conversion of ext2 to ext3 File System

Creating and Managing File Systems ♦ mkfs is a standard utility used in creating file systems. By default mkfs creates ext2 file system. The command given below will create an ext2 file system. ~]# mkfs /dev/hda1 The above command when executed will create an ext2 file system on the first primary partition and on the first IDE hard drive Topic 1 - Creation of an ext2 File System

Creating and Managing File Systems ♦ Installation of Red Hat Linux will use ext3 for all file systems by default. After partitioning a hard disk, an ext3 file system can be created by using the command ~]# mkfs –j ext3 /dev/hda1 This command will generate an ext3 file system on the first partition and on the first IDE hard drive Topic 2 - Creation of an ext3 File System

Creating and Managing File Systems ♦ Converting an ext2 file system into an ext3 file system can be done using root privileges and the below command tune2fs –j ► For example, tune2fs –j /dev/hda7 ♦ The command df is run that will display mounted file systems. After running the above commands, the partition type has to be changed from ext2 to ext3 in the /etc/fstab file. Topic 3 - Conversion of ext2 to ext3 File System

Creating and Managing File Systems ♦ Exercise 1 Creating Partition In this lab you have to create a 100M partition with ext2 file system by using fdisk and then convert ext2 file system to ext3 file system. Lab Exercise

Creating and Managing File Systems ♦ Introduction File systems needs to be maintained and periodic checks have to be performed on the file systems. This is one of the tasks of the system administrator. Linux has a utility that checks and repairs the file system at every reboot and performs the process quickly ♦ Topics covered in this Lesson ► Maintaining File Systems Lesson 4 – Checking File Systems

Creating and Managing File Systems ♦ System administrators’ tasks include maintaining file systems periodically. ♦ Checking File Systems ► The utility fsck which means ‘file system check’ is used generally to check and repair file system Topic 1 - Maintaining File Systems

Creating and Managing File Systems ♦ The e2label command is used to view what the ext2 label is by indicating the raw device for the file system. ~]# e2label /dev/hda2 /usr ♦ A new label can be set using the command given below ~]# e2label /dev/hda5 /iiht ♦ After setting labels, the mount command can be used with labels and it will mechanically trace the proper underlying device. For example: # mount LABEL=/iiht /iiht File System Labels

Creating and Managing File Systems ♦ Introduction Mounting a file system is instructing the operating system to make a file system available for use at a particular location. That particular location is called mount point. When the user no longer uses this file, then that file system should be unmounted ♦ Topics Covered in this lesson ► Mounting File Systems ► Unmounting File Systems Lesson 5 – Mounting and Unmounting File Systems

Creating and Managing File Systems ♦ A file system is mounted on a directory so that it is accessible to the users Using the mount command The basic command used ~]# mount device directory If options are used then: ~]# mount device directory Topic 1 – Mounting File Systems

Creating and Managing File Systems ♦ Linux will allow only the file systems that are not in use to be unmounted. The command used to unmount a file system is: ~]# umount device directory where directory is the directory to be unmounted. ♦ Note: the command used is spelt as umount and not unmount Topic 2 – Unmounting File Systems

Creating and Managing File Systems ♦ Introduction ► In a multi-user system environment, it is very common to have problems like some users utilizing disk space more than they require. This problem can be completely rectified by using Disk Quotas feature of Linux. ♦ Topics Covered in this lesson ► What are Disk Quotas? ► Implementing Disk Quota ► Disk Quota Settings Configuration ► Managing Disk Quotas Lesson 6 – Disk Quotas

Creating and Managing File Systems ♦ In a multi-user environment, problems such as some users utilizing more than required space persists and this can be rectified by many methods. ♦ These methods include requesting the users to utilize some amount of space as required by them and disk quotas. ♦ The disk quota is a successful method of Linux that permits the system administrator to distribute amount of disk space. ♦ Assigning disk quotas is flexible and is implemented per file system. Topic 1- What are Disk Quotas?

Creating and Managing File Systems ♦ Disk quotas can be established by inodes or by blocks on user or group levels. ♦ The procedure involved in the configuration of disk quotas is as given below: ► The file system should be mounted with the usrquota and (or) or grpquota option. ► Quota configuration files, aquota.user and aquota.group ► Kernel support for disk quotas should be made active ► Allocate user and (or) or group quotas as proper through the edquota command Topic 2 – Implementing Disk Quotas

Creating and Managing File Systems ♦ Disk quotas can be created, modified and eliminated by using edquota command. For example: ~]# edquota user1 ► The above command will start vi editor on a transient text file. ► The values are to be modified in the proper column and the user can exit the file after saving it Topic 3 – Disk Quota Setting Configuration

Creating and Managing File Systems ♦ Managing and checking disk usage of a file system can be done using commands: ► Quotacheck ► repquota ► quota ♦ The reliability of the quota database is verified by using the quotacheck command ♦ The repquota command will make a summarized report of disk quota usage on the system ♦ The quota command is used to check quota usage on a system-wide Topic 4 – Managing Disk Quotas

Creating and Managing File Systems ♦ quota report of partition /dev/hda10 Topic 4 – Managing Disk Quotas

Creating and Managing File Systems ♦ Exercise - Implementing Disk Quota ♦ In this lab you have to create a partition and implement a disk quota on that partition. You have to perform the following steps: ► Create a partition and mount that partition with usrquota option ► Enable the quota on that partition ► Create a user test1 password test1 ► Set the (number of file ) soft and hard limit for user test1 to 3 and 5 Lab Exercise

Creating and Managing File Systems ♦ Summary ► File System Structure is the fundamental level of organization in an operating system ► File system is created using mkfs i.e. ‘make file system’ command. ► Mount and umount commands are used to mount and unmount file systems respectively ► The disk quota is a successful method of Linux for allotting disk space ♦ Question and Answer session Conclusion