Learn from the learning of Linux (7)--linux disk and file system management

Source: Internet
Author: User
Tags disk usage

1. Disks are an important part of the Linux system. One of the most important tasks for system administrators is to manage their own file systems. First introduce some basic concepts of the following disks:

1) sector is the smallest physical storage unit with 512 bytes per sector

2) The sector is composed of a circle, which is the magnetic column, the magnetic column is the smallest unit of separation groove

3) The first sector is the most important, with the main boot-area MBR and the partition table, where the MBR accounts for 446 bytes, while the partitioned table accounts for 64 bytes.

2. After the partition is also formatted, then the operating system can use this slot, why do you want to format it? This is because each operating system sets the file attributes/permissions are not the same, in order to store the data required for these files, so need to be formatted. The Orthodox file format for Linux is EXT2

3. There are several disk instructions still need to understand, the first is DF, this command can call out the current mounted device, listing the total disk usage of the file system, du can evaluate the file system disk usage. Df-h words can be displayed in a human capacity format, H is human.

4. If we want to add a disk in the system, we need to take the following steps: 1) partition the disk, set up an available partition 2) To format the section, the system has been established file System 3) If you want to be careful, you can test the newly established file System 4) on the Linux system , you need to set up a mount point (directory) and hang it up.

5. Fdisk: Check the relevant information on the hard disk, usually use DF to find the hard disk, and then use FDISK to consult. No matter how many actions are performed, all operations will not take effect as long as you do not enter Q when you leave Fdisk. Pressing W is the save. Fdisk can only be executed with root.

6. If you want to remove the divider, you should do the following steps: 1) fdisk/dev/hdc into the Fdisk screen 2) p--First look at the information of the divider, assuming to kill/dev/hdc13) d--assuming the choice partition) W or q to leave Fdisk

7. If you want to format the disk, you can use the MKFS directive, meaning that make filesystem,mkfs-t ext3/dev/hdc6 is the HDC6 format ext3 file system

8. Fsck is used to query the file system for errors, and FSCK-CFT ext3/dev/hdc6 is a mandatory check.

9. All users need to access the hard disk or floppy disk, first of all to mount them up, the commonly used instructions are mount, such as MOUNT/DEV/HDC6/MNT/HDC6, so you can. The mount-l can display the current mount status. Of course, to remove the disk to use Umount.

Learn from the learning of Linux (7)--linux disk and file system management

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.