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

Slides:



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

Linux+ Guide to Linux Certification, Second Edition
Chapter 9 Part III Linux File System Administration
System Administration Storage Systems. Agenda Storage Devices Partitioning LVM File Systems.
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.
A Guide to Unix Using Linux Fourth Edition
Introduction to Unix (CA263) File System
Exploring the UNIX File System and File Security
S.Ha.R.K. Workshop28/02/05 S.Ha.R.K. Installation HowTo Tullio Facchinetti University of Pavia - Italy.
1 Web Server Administration Chapter 3 Installing the Server.
GNU/Linux Filesystem 1 st AUT GNU/Linux Festival Computer Engineering & IT Department Bahador Bakhshi.
Lesson 5-Accessing Networks. Overview Introduction to Windows XP Professional. Introduction to Novell Client. Introduction to Red Hat Linux workstation.
Lesson 4-Installing Network Operating Systems. Overview Installing and configuring Novell NetWare 6.0. Installing and configuring Windows 2000 Server.
The UNIX File System.
Hands-On Microsoft Windows Server 2003 Chapter 2 Installing Windows Server 2003, Standard Edition.
Guide To UNIX Using Linux Third Edition
Hands-On Microsoft Windows Server 2003 Administration Chapter 6 Managing Printers, Publishing, Auditing, and Desk Resources.
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.
FDISK Partitioning Hard Disks. History We bought our new hard disk drive –Right size for BIOS and OS –Right connections (PATA/SATA) We installed our new.
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.
NETW-240 Linux Installation Last Update Copyright Kenneth M. Chipps Ph.D. 1.
1 Partitioning a Hard Drive ©Richard Goldman Revised January 8, 2001 Revised December 9, 2002.
Guide To UNIX Using Linux Fourth Edition
1 Web Server Administration Chapter 3 Installing the Server.
Introduction to Linux Installing Linux User accounts and management Linux’s file system.
Manage Directories and Files in Linux
Guide to Linux Installation and Administration, 2e1 Chapter 3 Installing Linux.
4 1 Operating System Activities  An operating system is a type of system software that acts as the master controller for all activities that take place.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
Unix Basics Chapter 4.
10/1/2015 Chapter 2 Installing Windows XP Professional.
1 Web Server Administration Chapter 3 Installing the Server.
Day 8 Exporting Displays Cronjobs Mount. Chapter 5 Chapter 5 talks about X windows. –You should read the chapter. –However, you do not need to pay particular.
W2K Server Installation It is very important that before you begin to install Windows 2000 Server, you must prepare for the installation by gathering specific.
11 INSTALLING AND MANAGING STORAGE DEVICES IN WINDOWS XP Chapter 8.
Chapter 6: Linux Filesystem Administration
Partitioning and Formatting drives The easy way, using Knoppix live CD By Carl Weisheit.
Installation Overview Lab#2 1Hanin Abdulrahman. Installing Ubuntu Linux is the process of copying operating system files from a CD, DVD, or USB flash.
Chapter Two Exploring the UNIX File System and File Security.
File System Management File system management encompasses the provision of a way to store your data in a computer, as well as a way for you to find and.
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.
1 Objectives Manage and install new file systems.
ITI-481: Unix Administration Meeting 3 Christopher Uriarte, Instructor Rutgers University Center for Applied Computing Technologies.
Chapter 3 Partitioning Drives using NTFS and FAT32 Prepared by: Khurram N. Shamsi.
Manage Directories and Files in Linux. 2 Objectives Understand the Filesystem Hierarchy Standard (FHS) Identify File Types in the Linux System Change.
Chapter Two Exploring the UNIX File System and File Security.
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.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop V Files and the File System Part B – File System.
Linux Filesystem WeeSan Lee. Roadmap Disk Partitions The Filesystem Filesystem Mouting & Umounting File Tree File Type File Permission.
Chapter 8: Installing Linux The Complete Guide To Linux System Administration.
File system In computing, a file system is a method of storing and organizing computer files and the data they contain to make it easy to find and access.
SUSE Linux Enterprise Desktop Administration Chapter 7 Manage Directories and Files.
Class Meeting 11 ITI-481 – UNIX ADMIN Chris Uriarte, Instructor ITI-481: Unix Administration Rutgers University Internet Institute Instructor: Chris Uriarte.
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
Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree.
Guide to Linux Installation and Administration, 2e
Welcome to Linux Chap#1 Hanin Abdulrahman.
Chapter 6 File Systems CSNB113 SYSTEM ADMINISTRATION
Exploring the UNIX File System and File Security
Linux File Systems Partitioning Mounting File Systems
Welcome to Linux Chap#1 Hanin Abdulrahman.
Welcome to Linux Chap#1.
Presentation transcript:

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

Todays Agenda Disk Partitioning Directories and File Systems Mounting Local File systems

Disk Partitions. A typical UNIX installation will divide one or more hard drives into multiple partitions. In Linux, each disk is given its own device name: /dev/hdX (X can range from a-z) – IDE disks /dev/sdX (X can range from a-z) – SCSI disks A partition number is added to the device name: /dev/hdXY (Y is the partition number) – IDE disks /dev/sdXY (Y is the partition number) – SCSI disks For example, the first partition on the first IDE drive on a system would be /dev/hda1. Disk partition information can be viewed using the df command.

Understanding File System Types Different operating systems use different file systems. A file system type is essentially the specification for how blocks of data are organized on disks. Some file systems have features that other file systems may not have, such as the ability to more easily handle corrupted data or system crashes.

Some Common File System Types: FAT – used with DOS, Windows 3.1, Windows95, Windows98 FAT32 – used with Windows98/SE, WindowsME an some Windows95 distributions. Can also be used on Windows NT,2000 and XP. NTFS – used on Windows NT, 2000 and XP UFS (Unix File System) – a generic UNIX file system used on many UNIX flavors. EXT2 – a Linux-specific file system used in most Linux distributions JFS, ReiserFS, EXT3 – next-generation advance file systems available as an option on some UNIX systems today. (actually, all are available for Linux)

Selecting a File System Type Linux is unusual, as it allows you to choose the file system type of a partition during setup. Most UNIXs use their default file system type during install (usually UFS). Linux, however, has the flexibility to create and mount many different file system types, although we generally use EXT2, as its the most Linux-compatible. (remember, EXT2 is the Linux default)

Partitions and File Systems: A Recap (From Class 1) Disk Partitioning is the concept of dividing your hard disk into logical partitions, making one hard drive appear as if its actually multiple drives. Theres several reasons why we partition disks: –Performance –Ease of storage management –Security

Disk Partitioning in UNIX In UNIX, a physical disk partition is associated with a directory path, sometimes referred to as a mount point. All files that are in directories associated with a mount point are stored on the mount points physical partition. If a directory path is not explicitly associated with a physical disk partition, its files are stored under the root ( / ) partition.

UNIX Partition Example /usr 2GB / (root) 1.5GB /home 4GB swapswap Example Partitioning Scheme: Total Hard Drive Space: 8GB Contains all files under the /usr directory (I.e. /usr/local/bin/pico, /usr/bin/vi, etc.) Contains all files under the /home directors (I.e. /home/chrisjur, /home/iti1234) Contains all other files and directors, such as /var, /opt, /sbin, etc. [HARD DRIVE]

Disk Partitioning: Rules to Live By Making disk partitions is easy; Changing them can be hard. Its not often easy to expand or shrink disk partitions (in fact, its impossible to do on many operating systems), so make sure you have adequate space for your data storage. You can always create partitions from new hard drive. You can always create partitions from un- partitioned space on existing, in-use hard drives.

Example: Adding a Partition Using Un-partitioned Space /dev/hda1 Mounted on /home (Unused) /dev/hda1 Mounted on /home /dev/hda2 Mounted on /home2 You can easily take unused hard disk space, format it, partition it and mount is as a new file system.

Steps Required Make a New Partition Partition empty space on the hard drive Format the newly created partition Create a mount point for the partition Mount the partition

Partitioning Empty Hard Drive Space Empty hard drive space can be partitioned using a utility called fdisk. –Fdisk allows you to create, delete and modify partitions, as well as to set their partition types. –Allows you to print the partition table for a particular hard drive. Can be started with: /sbin/fdisk –e.g. /sbin/fdisk /dev/hda

Fdisk: Sample of Help Menu # /sbin/fdisk /dev/hda Command (m for help): m Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only)

Example: Creating a New Partition with Fdisk Launch fdisk – edit hard disk /dev/hda: > /sbin/fdisk /dev/had Type p to print the current partition table. You can now create a new partition, specify the size of the partition and then specify its file system type. The n option will allow you to add a new partition. You are prompted to specify whether you want to use a primary partitions 1 to 4) or logical partition (partitions 5 and above). You should choose p for primary partition. You will be asked to specify a partition number. Refer back to the partition table -You can choose a partition number that is not used from 1-4.

Creating Partitions, cont You will then be asked to specify the starting cylinder – simply choose the default. You will then be asked to specify the size of your new partition. You can specify this size in cylinders, kilobytes or megabytes (e.g M makes the partition 1500MB). You must now specify the partitions file system type by using the t option. Typing L will list the partition type codes. You want to use type 83 – Linux native. Finally, type w to write the new partition table and exit – you may have to reboot.

Step 2: Formatting the new File System Assuming you just created partition #3 on /dev/hdb, the partition you just created is now called /dev/hdb3. You must now format that partition. Partitions are formatted using the mkfs command. There is a special mkfs, called /sbin/mkfs.ext2, used to format Linux EXT2 file systems. –Usage: /sbin/mkfs.ext2 –e.g. /sbin/mkfs.ext2 /dev/hdb3

Step 3: Choosing and Creating a Mount Point Now that you have a fresh chunk of useable disk space, you need to decide how you will access it. You must choose a unique and empty directory path to be associated with your partition – this is referred to its mount point. For example, if youve created a partition /dev/hdb2, and you want to access its disk space via the path /newdisk, you must first create the path /newdisk (mkdir /newdisk) and we must then mount the partition on that path.

Step 4: Mounting the New Partition After choosing and creating a mount point, you can mount the partition using the UNIX mount command: –mount [options] For example: mount –t ext2 /dev/hdb3 /newdisk –( -t specifies file system type) After mounting the file system, you are now ready to use it!

Viewing Mounted File Systems You can view mounted file systems using the df –k command: Filesystem 1k-blocks Used Available Use% Mounted on /dev/hda % / /dev/hdb % /home

Unmounting File Systems File systems are unmounted with the umount command: –umount –For example: umount /newdisk File systems should only be unmounted when they are not in use.

Typical Directory Structure Note: Not all directory paths have their own partitions – in fact, a system may only have 1 partition! / - begins the file system structure (root) /boot - kernel files /usr – scripts and binary applications /sbin – basic system tools /home – user home directories /var – log files and other time sensitive data /etc – configuration files /dev – device drivers /opt – typical install location for some commercial software /tmp – temporary storage /mnt – mount points for floppy disks and CD-ROMS swap – swap space

Sample Directory Tree with Mount Points

/etc/fstab Specifies what partitions to mount automatically during boot time. Entry format: Sample entry: /dev/hda3 /newdisk ext2 defaults1 2 –*These fields are usually set to defaults, 1 and 2, respectively. For entries in /etc/fstab, you can run mount command with just mount point: > mount /tmp To mount all file systems in /etc/fstab: > mount -a

Exercises/Problems How do you rename a the mount point associated with a partition? (I.e. change the mount point for /dev/hdb3 from /newdisk to /home?) What do you do if youre running out of disk space on a new partition? What do you need to do after youve added a new hard drive?

Homework As Assigned in class…