Once in fdisk, you'll be greeted with a prompt that looks like this: Doing so will generally cause data on the disk to be lost. You should not save or make any changes to a disk's partition table if any of its partitions contain filesystems that are in use or contain important data. We can take a look at a disk's partition table by running fdisk, specifying a block device that represents a full disk as an argument. The partition table defines exactly how to split up the full disk. Partitions are created using a tool called fdisk, which is used to create and edit the partition table that's stored on each disk. Instead, full disk block devices are split up into smaller, more manageable block devices called partititons. However, although it is theoretically possible to use a "whole disk" block device (one that represents the entire disk) like /dev/hda or /dev/sda to house a single filesystem, this is almost never done in practice. Under Linux, we create filesystems by using a special command called mkfs (or mke2fs, mkreiserfs, etc.), specifying a particular block device as a command-line argument. The program can simply address the storage on the disk as a bunch of contiguous, randomly-accessible 512-byte blocks. User programs can use these block devices to interact with your disk without worrying about whether your drivers are IDE, SCSI, or something else. The block devices above represent an abstract interface to the disk. If your system uses SCSI drives, then your first hard drive will be: The most famous block device is probably the one that represents the first IDE drive in a Linux system: To begin, I'll introduce "block devices". Once you're familar with the ins and outs of disks and filesystems, we'll guide you through the process of setting up partitions and filesystems on Linux. In this section, we'll take a good look at disk-oriented aspects of Linux, including Linux filesystems, partitions, and block devices. The LPI logo is a trademark of Linux Professional Institute.įilesystems, partitions, and block devices Introduction to block devices For some, much of this material will be new, but more experienced Linux users may find this tutorial to be a great way of "rounding out" their foundational Linux system administration skills and preparing for the next LPI certification level.īy the end of this series of tutorials (eight in all covering the LPI 101 and 102 exams), you will have the knowledge you need to become a Linux Systems Administrator and will be ready to attain an LPIC Level 1 certification from the Linux Professional Institute if you so choose. If you are new to Linux, we recommend that you start with Part 1 and work through the series from there. This tutorial is particularly appropriate for someone who may be serving as the primary sysadmin for the first time, since we cover a lot of low-level issues that all system administrators should know. In this tutorial (Part 4), we'll bolster your knowledge of advanced Linux administration skills by covering a variety of topics including Linux filesystems, the Linux boot process, runlevels, filesystem quotas, and system logs. Welcome to "Advanced administration," the last of four tutorials designed to prepare you for the Linux Professional Institute's 101 (release 2) exam. Get an awesome Funtoo container and support Funtoo! See Funtoo Containers for more information.
0 Comments
Leave a Reply. |