Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Linux Filesystem Administration: Devices, File Systems, and Maintenance, Slides of Advanced Operating Systems

An overview of linux filesystem administration, focusing on the /dev directory, common device files, file systems, floppy disks, cd-roms, and maintenance commands. It covers topics such as device representation, file system types, mounting, and maintenance tools.

Typology: Slides

2012/2013

Uploaded on 04/24/2013

banani
banani 🇮🇳

4.3

(3)

93 documents

1 / 12

Toggle sidebar

Related documents


Partial preview of the text

Download Linux Filesystem Administration: Devices, File Systems, and Maintenance and more Slides Advanced Operating Systems in PDF only on Docsity! Chapter 6: Linux Filesystem Administration Docsity.com 2 The /dev directory • Each device is represented as files in /dev • Devices are divided into two types – Character – Block • The first character in the long listing indicates the type of the device • Major and minor numbers replace the size. Major for the type of the device and minor for the device itself • If a device file is corrupted or deleted you can use mknod to re-create it if you know the type, major and minor numbers. $mknod /dev/fd10 b 2 10 • Otherwise, you can use: $/dev/MAKEDEV fd0 • The file /proc/devices contains a list of used devices Docsity.com Common File Systems bo essary for system startup; it is c ble filesystem used to hold the files nec- rmimanty used on UNIX systems cdfs Compact Dise filesystem—A filesystem used to view all tracks and data on a CD-ROM as normal files ext2 Second extended filesystem—The traditional filesystem used on Linum, it supports access control lists (individual user permissions). In addition, it retains its name from being the new version of the original extended file- system, based on the nix filesystem ext3 Third extended filesystem — A variation on ext2 that allows for journaling and, thus, has a faster startup and recovery time hfs Hierarchical File System—A filesystem native to Apple Macintosh computers: hpts High Performance File System—An IBM. proprietary OS/2 filesystem that provides long filename support ane! is optimized to manipulate data on large disk volumes iso9660 The CD-ROM filesystem—A filesystem that originated from the Interna- tional Standards Organization recommendation 9660 and is used to access data stored on CD-ROMs minix The MINIX filesystem—the filesystem used by Linus Torvalds in the early days of Linux development. mscdos The DOS FAT filesystem. ntfs New Technology File System—A Microsoft proprietary filesystem devel- oped for its NT 4.0 and Windows 2000 operating systems; currently available as_a read-only filesystem under Linux. reiserfs The REISERFS filesystem—A journalizing filesystem similar to ext3, and more suited for use with databases. udt The Universal Disk Format filesystem—A filesystem used by software programs that write toa CD-R, CD-R, or DVD. what The DOS FAT filesystem with long filename support. wets The Veritas filesystem—A jouralizing filesystem that offers large file sup- port and supports access control lists (individual user permissions) and is commonly used by major versions of UNIX. 5 Docsity.com 6 Floppy Disks • To format a floppy disk (i.e. creating a file system) you use the mkfs commands • mkfs takes a –t option to specify the file system type and you need to specify the device file to be used • $ mkfs –t ext3 fd4 • The default file system is ext2 • A list of variant to mkfs is given in Table 6-3 • A disk should be mounted to be accessible • The command mount lists currently mounted file systems • Similar effect can be achieved by viewing the mount table. $cat /etc/mtab • After mounting, use the mount point as the root dir. Docsity.com 7 Floppy Disks (cont.) • When an ext2 is created on a device, a directory called lost+found is created by default • To check if a mounted directory is not used by any users, you use the fuser: $fuser –u /mnt/floppy • You need to unmount the floppy disk before ejecting it. To do so, use $unmount /mnt/floppy • The unmount commands accepts the device to be un-mounted or the mount point directory • You can use the fuser to check if any process is using the mount directory which will prevent the device from being un-mounted • The file-systems table is used to mount devices at boot time and in case the mount command does not have enough arguments Docsity.com 10 Hard Disks • They are usually partitioned with different FS why – Separate different data types – Use of more than FS – Improve system reliability (FS corruption) – Enhance system performance • The MBR stores info about all partitions • Hard disk structure: Tracks, sectors, cylinder • Physical and logical partitions • Partitioning hard disks: – During installation: using Druid – After installation: Using fdisk • The machine might need to be rebooted to manually reload the new partition info Docsity.com 11 Maintenance Commands • Monitoring disk usage using disk free space (df) • It gives results in terms of block numbers • The –h option prints results measured in MB & GB • It only views mounted file systems • To get info about a specific directory use du (Directory Usage) • It, du, gives results in KB • The option –s give summary and can be used with –h • To view total number of i-nodes and the number of free ones use: dumpe2fs –h /dev/sda0 Docsity.com 12 Maintenance Commands (cont) • Disk quotas • Soft limit and hard limit • Setting quotas (quotaon/quotaoff) • Editing quota (edquota) • List quota values for all users (repquota) • Checking quota values for individual users (quota –v <user>) Docsity.com
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved