1 / 22

Interface

Interface. Two most common types of interfaces SCSI: Small Computer Systems Interface (servers and high-performance desktops) IDE/ATA: Integrated Drive Electronics (PC workstation). Physical Hard Drive. Computer Disk. Track Each platter is divided into concentric rings called tracks Sector

penn
Télécharger la présentation

Interface

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. Interface • Two most common types of interfaces • SCSI: Small Computer Systems Interface (servers and high-performance desktops) • IDE/ATA: Integrated Drive Electronics (PC workstation)

  2. Physical Hard Drive

  3. Computer Disk • Track • Each platter is divided into concentric rings called tracks • Sector • Track are further divided to sectors • Cluster • A combination of one or more sectors

  4. Disks and Filesystems • One of the most important jobs of the SA is to ensure that users have access to files and data that they need and that these files and data remain uncorrupted and secure. This entails tasks such as the following: –Making local and remote files available to users –Monitoring and managing the systems disk resources –Protecting against disk corruption and hardware failures –Ensuring data confidentiality by limiting file and system access –Checking for and correcting file system corruption –Connecting and configuring new storage devices when needed

  5. Adding a new Disk • Adding a new disk consists of a number of steps: –The disk must be physically attached to the system –Create device files in order to access the disk –Format the disk –Partition the disk –Make a new filesystem for each new partition –Check the integrity of the filesystem –Mount the new filesystem – Setting up automatic mounting –Setting up swapping on swap partitions

  6. Separating the FileSystem • There are many reasons to separate the file system into different partitions. –Different directories need different permissions –Some directories tend to get filled up real fast –When upgrading a system, things become easier. –Size of a partition makes it easier to do backups.

  7. Linux Native FileSystem • Linux has had several native file systems. Originally it was minix, which supported file systems of up to 64 mb and 14 character file names. With the advent of VFS (virtual file system) and support for multiple file systems, linux currently uses the ext2/ext3 file system. • ext2 can support longer filenames (255 characters), larger file sizes (2GB) and bigger file system support (4 TB).

  8. Partitions and file systems • Every partition has an associated file system. The file system is actually created by the mkfs command. In DOS systems, it is customary to devote the entire file system to the FAT (File Allocation Table) based file system. • In UNIX, it is normal to use multiple partitions in the file system structure, and for the file system structure to spread over many partitions and devices from different type of file systems. • UNIX recognizes many types of file systems including minix, ext, ext2, umsdos, msdos, proc, nfs, phfs etc.

  9. Partitions • In Unix, every disk must be partitioned. Partitions divide up the disk, and each segment acts as a complete disk by itself. Once a partition is full, it cannot (without special software) automatically flow into another partition. • Under Linux, each disk is given its own device name. IDE disks start with the name /dev/hdX, where X can range from a through z. When partitions are created, new devices are created. They take the form /dev/hdXY, where now Y is the partition number. • When installing the OS, it created partitions for you. A command that exists that can create partitions for you is, the fdisk command. fdisk can be used at anytime by root to partition the hard-drives.

  10. Creating a file system • Once a partition is created, before it can be used, it must first have a file system installed on it. This is similar to formatting the partition. • mke2fs /dev/hdb3 –to make ext2 filesystems • mkswap /dev/hdb2 –to make swap filesystems • Be aware that creating a file system on a device with an existing file system will cause all data on the old file system to be erased.

  11. Partitions and Blocks • The smallest unit of information that can be read from or written to a disk is a block. • When partitions are created, the first block of every partition is reserved as the boot block. However, only one partition may act as a boot partition. BIOS checks the partition table of the first hard disk at boot time to determine which is the boot partition. In the boot block of the boot partition there exists a small program called the bootstrap loader. On Linux, this is called the lilo.

  12. Partitions and Blocks • The second block on the partition is called the superblock. It contains all the information about the partition, including –size of the partition –physical address of the first data block –number and list of free blocks –info about the file system –when the partition was last modified. • The remaining blocks are data blocks. • In order to use these partitions and file systems, they are logically attached (mounted) to the directory structure.

  13. Mounting the filesystem • Mounting is the process that makes the disk’s contents available to the system, merging it into the system directory tree. A file system can be mounted or dismounted except for the root filesystem, that is always mounted on the root directory while the system is up and cannot be dismounted. • Once a filesystem is mounted on a directory, any files that were originally in the mount directory, disappear. They become accessible again only when the filesystem is unmounted.

  14. Disk Space Management • Space shortage becomes a problem at some point or the other. The df command produces a report that describes all the filesystems, their total capacities and the amount of free space available on each one. Systems administrators often put a df command in root’s login initialization file.

  15. Disk Space Management • The du command reports the amount of disk space used by all files and subdirectories underneath one or more specified directories, listed on a per-subdirectory basis. It reports disk usage in blocks. (512 byte or –k for kilobytes) du /users • To generate a list of the system’s directories in order of size: du /users |sort -rn

  16. Validate the Filesystem • A number of problems, ranging from operator errors to hardware failures can corrupt a filesystem. The fsck utility checks the filesystem consistency, reports any problems it finds, and optionally repairs them. • fsckcan find the following filesystem problems: –one block belonging to several inodes –blocks marked as free but in use –incorrect link counts in inodes (indicating missing or excess directory entries)

  17. Validate the Filesystem –Illegal blocks within files –inconsistent data in the filesystem’s table –lost files –illegal or unallocated inode numbers in directories • fsck’s scope is limited to repairing the structure of the filesystem and not the data in the corrupted files.

  18. VFS

  19. ext2 Inode http://www.tldp.org/LDP/tlk/fs/filesystem.html

  20. Ext2fs Physical Structure • Filesystem • Block Group • Super Block: Contains basic information such as the block size, total number of blocks, the number of blocks per block group, total number of inodes, etc.

  21. Ext3fs • Ext3fs = Ext2fs + File System Journaling

  22. Basic Commands • mkfs • fdisk • mke2fs • mkswap • du • df • fsck

More Related