Linux partition Format view

Source: Internet
Author: User
Tags uuid

Linux partition Format view

Two files/etc/fstab and/etc/mtab

/etc/fstab is a file that is used to store static information about the file system when the system is started.

The system automatically reads the information from this file and automatically mounts the file system specified in this file to the specified directory.

/etc/mtab Displays the manifest file for the FS that is already mounted.

Whenever mount Mount partition, Umount unload partition, will dynamically update mtab,mtab always maintain the current system mounted partition information, FDISK, DF Such programs, must read the mTAB file, in order to obtain the current system in the partition mount situation.

Domain Description:

Reprinted from:http://www.linuxidc.com/Linux/2012-04/59111.htm

The six fields of the file, respectively:

<file system>, <mount point>, <type>, <options>, <dump>, <pass>. The detailed meanings of these six fields are described in more detail below.

1, <fie sysytem>. This is used to specify the device name or block information of the file system you want to mount, or it can be a remote file system. Friends who have done embedded Linux development may know the meaning of the Mount 192.168.1.56:/home/nfs/mnt/nfs/-o nolock (which can be other IP) commands. Its task is to mount the/home/nfs/directory on the remote host with IP 192.168.1.56 to the/MNT/NFS/directory on this machine. If you want to write it into the/etc/fstab file, this part of the filesystem system should be filled in as:/192.168.1.56:/home/nfs/.

If you want to mount a device on this machine, such as:/DEV/SDA1,/dev/hda2, or/dev/cdrom, where/dev/sda1 represents the first partition of the first serial drive, or the first partition of the first SCSI hard disk,/ DEV/HDA1 represents the first partition of the first IDE hard disk, and/dev/cdrom represents the optical drive.

In addition, the label (volume label) or UUID (universally unique identifier globally unique identifier) can also be represented. Before you use a label, you e2label create a volume label, such as: e2label/dir_1/dir_2, which means to use/dir_2 to represent the name of the/dir_1. Then, add the following form under/etc/fstab: label=/dir_2/dir_2 <type> <options> <dump> <pass>. After reboot, the system will mount the/dir_1 to the/dir_2 directory. For UUID, it can be obtained by Blkid-o Value-s uuid/dev/sdxx. For example, I want to mount the 11th partition of the first hard drive, first using the command Blkid-o value-s uuid/dev/sda11 to get the UUID, for example: 5dc08a62-3472-471b-9ef5-0a91e5e2c126, and then in < File system> This field to fill in: uuid=5dc08a62-3472-471b-9ef5-0a91e5e2c126, you can represent/DEV/SDA11. Red Hat Linux generally uses labels, while Ubuntu Linux uses UUID.

2, <mount point>. Mount point, that is, you find one or create a dir (directory), and then the file system <fie sysytem> to this directory, and then you can access from this directory to mount the file system. For a swap partition, this field should be filled in: none, indicating no mount point.

3, <type>. This is used to specify the type of file system. The following file systems are currently supported by Linux: ADFS, BEFs, CIFS, ext3, ext2, ext, iso9660, Kafs, Minix, Msdos, VFAT, Umsdos, Proc, ReiserFS, swap, SQUASHFS, NFS, HPFS, NCPFS, NTFS, affs, UFS.

4, <options>. This is used to fill in the setup options, with each option separated by commas. Because there are a lot of options, and this space is limited, so no more details, if you want to know, please use the command man mount to view. But here's a very important keyword to look at: defaults, which represents the option Rw,suid,dev,exec,auto,nouser and async.

5, <dump>. If this is 1, it means to back up the contents of the entire <fie sysytem>, or 0 to indicate that it is not backed up. The dump tool is rarely used now, and is typically selected here in 0.

6, <pass>. This is used to specify how FSCK can be used to check the hard disk. If you fill 0 here, then do not check, the mount point is/(that is, the root partition), must be filled in here 1, the other can not fill 1. If there is more than 1 of the partition fill, then after the root partition is checked, and then the number of completed from small to large in order to check down. Check with the same number. For example, the first and second partitions fill in 2, and the third and fourth partitions fill 3, then the system checks the first and second partitions at the same time after the root partition is checked, and then checks the third and fourth partitions at the same time.

Linux partition Format view

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.