1 / 10

Chapter 10

Chapter 10. Managing the File System. The File System and Disk storage . The file system is the structure and organization of data on a data storage device. The good file system support provide Linux users to access files on file system used by other operating systems.

janae
Download Presentation

Chapter 10

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 10 Managing the File System

  2. The File System and Disk storage • The file system is the structure and organization of data on a data • storage device. • The good file system support provide Linux users to access files on • file system used by other operating systems. • The Kernel document for file system is at /usr/arc/linux-2.4/ • Documentation/filesystems/. • The Starting block is special block containing boot sector. Refer to page 276-277 for file system Support and partition

  3. The Main Categories of File System • Network File System- This file system is physically stored somewhere other than your local computer but appear as if they are mounted on your local machine. E.g NFS, Coda,InterMezzo, NCP,SMB…. • Local File System-This is found on a physical device, they are the hard drive in your • desktop or laptop computer.E.g FAT,ext2,ext3…. To check and fix a File System • fsck • fsck /dev/hdc • By default the system will run fsckafter a number of reboots. To View Your System’s File Systems Support cat /proc/filesystems All the file systems will be shows that your system support

  4. Advantages of file system ext3 • Easy transition form ext2 to ext3 by the command • tune2fs /dev/hdxn -j. • Its possible to recover a deleted file from an ext3. • Ext3 can accommodate files larger as 2TB. • Directories are large as 2TB. • Maximum file name length of 255 characters, but can be increased. • Ext3 can allocate and use empty space in a very efficient manner. • The use of space is so efficient that ext3 does not need de-fragmenting. • When a file is deleted , its inode is erased and the data blocks associated • with it are freed. • Ext3 file systems were designed to follow UNIX design concepts. • The disk fix command fsckis not necessary in ext3.

  5. Some other file system • (ReiserFS)- It offers similar features toext3, but there is no easy migration path from an already existing ext2 to ReiserFS. • JFS and XFS- IBM has provided its journaled file system (JFS) that is used • with its commercial UNIX named AIX. Silicon Graphics has provided its • XFS file system used by its commercial UNIX named IRIX. • DOS- window FAT and FAT32. • CD-ROM file system • iso9660 • universal Disk Format (UDF)

  6. Creating and to view a File System • fdisk /dev/hda • It will show the file system information of hard disk naming hda • By the key ‘m’ you can see complete help how to use fdiskcommand. • By the key ‘n’ you can create new partition, and in different steps you will give relevant • input e.g the size and name of partition … • sfdisk /dev/hda • same like fdiskcommand but it offers relaxation for you , it offers a script support file in • which you can set the rules of partition and then the system will automatically do the • partition according to the rules . • prevent accidents caused by inexperienced users like me  . • Some more commands are: • parted • mke2fs • dumpe2fs • to examine the structure of your ext3 file system • mkfs.ext3 • to create ext3 partition type • e2fsck • to check the bad blocks and mark them as bad

  7. Installing a new Drive • There might comes a situation when the physical disk become full, adding • another drive and moving part of the filesystem there is not that much daunting • task. • JUMPER SETTINGS • BIOS • THE fdisk COMMAND • FORMATTING • CREATING DIRECTORIES FOR NEW HARD DISK • MOUNTING • COPYING THE DATE INTO NEW HARD DISK cp • PERMANENT MOUNTING etc/fstab

  8. Mounting Automatically • The super user only can mount file system permanently by editing a file • /etc/fstab/ • GUI tool to mount • kwikdisk &

  9. Mounting a Partition as Read and Write • mount -o ro, /hda2 /home (mounted as read only) • mount -o rw, /hda2 /home(mounted as read only) To set and Tune the Settings of Hard Disk • hdparm(used by super user) • hdparm command device

  10. The /dev/null Mistery • more mybigfile > /dev/null (this big file having 5GB approx data will vanish) Redirecting standard out put The sign > is used for redirecting standard output. The sign 2> is used for redirecting standard error. standard output standard error Redirecting output on a file Redirecting error on a file

More Related