1 C1-UD 6-6 BASIC LINUX FILE MANAGEMENT. Part IV. File System Administration Academic Year 08-09 DAI. Credit 1 (Single and Multiuser Operating Systems)

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.
Linux+ Guide to Linux Certification, Second Edition
Chapter 9 Part III Linux File System Administration
Basic Unix system administration
Linux can be generally divided into four major components: 1. KERNEL – OS, ultimate boss The kernel is the core program that runs programs and manages.
Linux Installation LINUX INSTALLATION. Download LINUX Linux Installation To install Red Hat, you will need to download the ISO images (CD Images) of the.
A Guide to Unix Using Linux Fourth Edition
1 itec 400 Unix File Systems George Vaughan Franklin University.
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.
1 Administração de Sistemas (ASIST) TP 1 (English version) LINUX servers installation.
Linux Install. Resources Guide to Linux Installation and Administration, Nicholas Wells, Course Technology, 2000.
Guide to Computer Forensics and Investigations Fourth Edition Chapter 8 Macintosh and Linux Boot Processes and 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.
Chapter 8: Adding a Disk — Unix Hard Disk Basics Installation and Configuration Barry Kane CMSC-691X.
File System and Directory Structure in Linux. What is File System In a computer, a file system is the way in which files are named and where they are.
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)
Linux+ Guide to Linux Certification, Third Edition
CompTIA Linux+ Certification
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.
Guide to Linux Installation and Administration, 2e1 Chapter 3 Installing Linux.
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.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
Disks, Filesystems 1.  sudo and PATH (environment)  disks  partitioning  formatting file systems: mkfs command  checking file system integrity: fsck.
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.
The Linux Operating System Lecture 3: Becoming the Superuser and Users and Groups The Tonga Institute of Higher Education.
Sys Admin Course Physical Storage and File Systems Fourie Joubert.
More on file systems, Booting Todd Kelley CST8177– Todd Kelley1.
Guide to Computer Forensics and Investigations, Second Edition Chapter 8 Macintosh and Linux Boot Processes and File Systems.
Manage Directories and Files in Linux. 2 Objectives Understand the Filesystem Hierarchy Standard (FHS) Identify File Types in the Linux System Change.
More on file systems, Booting Todd Kelley CST8177– Todd Kelley1.
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.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop V Files and the File System Part B – File System.
VirtualBox: How to create a Linux Virtual Machine.
Linux file systems Name: Peijun Li Student ID: Prof. Morteza Anvari.
CSC414 “Introduction to UNIX/ Linux” Lecture 6. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
Hp education services education.hp.com hp education services education.hp.com 1 HP World/Interex 2002 Linux File System Support Chris Cooper (734)
Lecture 4 & 5: System Architecture  File systems  Devices  File system permissions  Review of Linux runlevels  In-class exercise.
System initialization Unit objectives A.Outline steps necessary to boot a Linux system, configure LILO and GRUB boot loaders, and dual boot Linux with.
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-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
Day 1 Tasks How do you backup the MBR (Master Boot Record) of a hard disk? How do you backup the primary partition table of an MBR type hard disk? How.
Chapter 10: Managing Software Packages and File Systems
Day 28 File System.
Chapter 8 Unix & Linux.
Chapter 8 Adding a Disk.
Configuring Disk Quotas
Filesystem Management and Backups
Guide to Linux Installation and Administration, 2e
Basic Commands ls cp ls –l (in detail format) echo ls –a
Unix System Administration
Adding New Users, Storage, File System
Operating System Module 1: Linux Installation
Linux File Systems Partitioning Mounting File Systems
OPS235: Week 5 Lab4: Investigations 1 – 3
COP 4343 Unix System Administration
Devices, Linux Filesystems,and the Filesystem Hirarchy standard
Configuring Disk Quotas
Presentation transcript:

1 C1-UD 6-6 BASIC LINUX FILE MANAGEMENT. Part IV. File System Administration Academic Year DAI. Credit 1 (Single and Multiuser Operating Systems) Ferran Chic PELE-08/09 (Pla Experimental Llengües Estrangeres).Potenciació de la llengua Anglesa a la FP) © Ferran Chic. DAI-1er- C1 (SO)

2 6-6 INDEX 1. What should we know now ? 2. Before starting … 3. File System Structure 4. Creating partitions 5. Creating file systems 1. Formatting 2. Mounting 1. Manually 2. Automatically 3. Recovering data 6. Creating swap space 7. Managing disk quotas

What should we know ? How to manage and organize disk space to users Which file systems do I need ? Which is the appropriate fs size? Where and how do I mount the fs ? How do I check fs integrity and how do I recover fs integrity from an eventual data loss ? How do I format a partition ? How do I partition a disk ? TO SUM UP WE SHOULD KNOW ADMINISTRATIVE DISK MANAGEMENT TASKS

Before starting We must be able to identify possible storage devices located in /dev directory First floppy disk IDE HD or CD/DVD configured as secondary master within an IDE channel IDE HD or CD/DVD configured as primary slave within an IDE channel IDE HD or CD/DVD configured as primary master within an IDE channel First primary partition of primary master HD First logical partition of primary master HD First serial ata or pendrive device (pluggable devices) /dev/fd0 /dev/hda /dev/hdb /dev/hdc /dev/hda1 /dev/hda5 /dev/sda ?????? /dev/cdrom

Before starting 4 primary partitions x disk From the fifth until the last one are extended and logical partitions Some devices are considered completely CD’s, DVD’s, pendrives Other devices are subdivided into partitions: hard disks basically

FS STRUCTURE : SYSTEM V

7 Each CG contains super block backup Block bitmap. Inode bitmap. A subset of the inode table Data blocks FS STRUCTURE : BSD

SYSTEM V / BSD comparison Write down the structure, performance and security differences between SYSTEM V and BSD fs. D1(STRUCTURE) : D2 (PERFORMANCE): D3 (SECURITY):

Creating partitions fdisk fdisk /dev/hda cfdisk cfdisk /dev/hda Once inside the specific partitioning tool, whe must move around the menus to set specific parameters. If our exit from fdisk, cfdisk includes a modification of MBD, is compulsory to reboot the system straightaway.

Formatting When we format a partition, the file system is created (all the structures shown in 6.6.3) The statement needed depends on the specific file system we want to create (ext2,ext3,reiser, fat )

11 Floppy disk format (low level) fdformat /dev/fd0 High level ext2 floppy disk format mkfs -c -v -t ext2 /dev/fd Commands to format specific file system types mkfs.ext2, (alias to mke2fs) mkfs.ext3, mkfs.vfat, mkfs.minix, mkfs.msdos, mkfs.xfs Formatting

12 ext3 format is the same as ext2 but with journaling added. mke2fs with -j is the same as a mkfs.ext3 mke2fs -c -j /dev/hda5 We can migrate ext2 to ext3 with tunefs command For reiser fs we must use mkreiserfs It is highly recommended to redirect the output of a format statement to a file, to have information about what had happened mke2fs –c /dev/hda5 > fitxer Formatting

MOUNTING FILESYSTEMS mount command mount –t -o dispositiu directori tipus = fat,iso9660,ext2,ext3 -o = ro,... Mounting automatically: /etc/fstab file We should add 1 record (line) for each fs to be mounted automatically To mount all the automatic fs included in /etc/fstab we must execute mount –a mount –a is executed during the linux startup process as well, therefore, all the known fs (/ /var /usr /opt /boot ) are available after linux boot process

/etc/fstab file format Field 1) Device Field 2) Mount point Field 3) fs type auto,vfat,ntfs,ext2,iso9600,ext3,reiser Field 4)Mount options auto, noauto, defaults, noexec, user, nouser... Field 5) Just for dump pourposes. 0 by default Field 6) Mount and check order of the fs /dev/hdc /mnt/cdrom auto nouauto,user 0 0 /dev/sda / ext3 defaults 0 1

15 /dev/hdc /mnt/cdrom auto nouauto,user 0 0 /dev/sda / ext3 defaults /etc/fstab file format examples Entry 1 : Will be mounted with mount –a defaults parameter includes : nouser auto rw Entry 2: Will not be mounted with mount –a allow users to easily mount using an easier version of mount mount /mnt/cdrom Or mount /dev/hdc

Other commands mount mount –a umount –a umount device umount folder_mount_point

Fs repair Fsck command fsck -t ext2 /dev/hda2 This command must be executed under the following conditions Single User init 1 Root fs in read only mode mount -o remount,ro / Important options in fsck : -c check bad blocks. -v verbose. -r ask for confirmation always -y always answer yes -f check forced (if not, just checks the dirty bit of the fs) Also works e2fsck (for ext2 and ext3) and reiserfsck for reiser fs What does e2fsck -c -f -b 8193 means ?

Managing Swap area Do you remember what is the reason why we need this swap area ? Do you remember where is it located ? Swap area configuration procedure Step 1 ) Create a new swap partition with fdisk Step 2) init 6 Step 3) “FORMAT” swap are with mkswap command : mkswap Step 4 ) Activate swap partition manually with swapon command : swapon Step 5) Activate automatically the swap area by adding a new entry on /etc/fstab file

Managing disk quotas It consists in setting the maximum growing space within a filesystem for every user or group Quotas can be established At block level (limit space ocupation) At i-node level (limit number of files creation) Quotas are established to control the occupied space of a filesystem, therefore quotas affect all the filesystem instead of specific folders.

20 We can set quotas to users or groups Two sort of quotas Soft limit : If a user or group reach the sort limit, a grace period begins. The user has the grace period to decrease his/her disk usage. If the time period is exceeded and the user keeps run out of quota, user account will be disabled until root user enables the account with usermod command Hard limit : If a user or group exceeds the hard limit of the fs, they will not be able to write more data there. Grace period : It’s a common parameter of the fs that affects equally to all users who exceed the soft limit Managing disk quotas

21 Configuring disk quotas Step 0: Verify that your kernel supports quotas Step 1) Alter fstab file: Modify every entry that requires quota Examples: /dev/hda5 /home ext3 defaults,usrquota /dev/hda5 /home ext3 defaults,grpquota Managing disk quotas

22 Step 2 )Prepare a quota database within the mount point of the f.s. cd /home touch quota.user touch quota.group chmod 600 quota.user chmod 600 quota.group Step 3) Create the database and check integrity quotacheck /home Step 4) Umount and mount /home to activate usrquota or grpquota param Managing disk quotas Step 5) Activate quotas quotaon

23 Root quota reports repquota User quota reports quota quota –v quota -g Quota edition (only root) : edquota –u usuari edquota –g grup edquota –u usuari –p usuari2 edquota –t Managing disk quotas