Linux_004 _ disk and File System

Source: Internet
Author: User

Linux_004 _ disk and file system Linux_003 _ system settings and Vimhttp: // www.bkjia.com/ OS /201304/205465.html 1. the basic concept of a disk is in the cylinder (cylindrical) sector (sector) head/dev directory. The IDE device starts with hd, usb, sata, SCSI, SAS, and other devices start with sd./dev/sda, first disk, first partition,/dev/sda1, MBR, supports 32-bit and 64-bit systems. the maximum number of partitions supported is 2 tb mbr partition concept: primary partition extended partition logic partition GPT is more advanced, used in uEFI-supported computers: supports space larger than 2 TB backward compatible MBR must use 64 bit system 2. fdisk is an MBR-based partitioning tool, the GPTfdisk command cannot be used. Only the Super User permission can be used to run fdisk-l to list all the installed disks and their partition information. fdisk/dev/sda can be used to partition 1st disks after partprobe partitioning. kernel updates partition information, otherwise, restart the/proc/partions file to view partition information. format the mke2fs-t ext4/dev/sda1 parameter in the file system: -B blocksize specify file system block size-c Create File System Time check bad block-L label specify the volume label-j Create File System Log mkfs. compared with mke2fs, ext4/dev/sda1 supports fewer parameters, and quickly dumpe2fs/dev/sda1 to view the partition File System Information (learn more) e2label/dev/sda1: display the system label e2label/dev/sda1 study of sda1 to set the system label of sda1 to STUDY, in general, the capital fsck checks and repairs the damaged file system-y does not prompt to directly repair the default fsck will automatically determine the file system type, if the file system is seriously damaged, use the-t parameter to specify the file system type for corrupted data identified as files (the file system has no records ), fsck will put the file into the lost + found directory. The system will perform the fsck operation on the disk when it is started. 4. file System Mount Management (1 ). mount/dev/sdb1 (partition to be mounted)/mnt (mount point) to remount and set it to read-only mount-o remount, ro/dev/sdb1/mnt mount display all mounted file system parameters-t specifies the type of the file system (automatically recognized by default if not specified)-o specifies the mounting option ro, rw read-only, read/write, rw sync by default, async does not use cache, use cache, by default, async noatime does not update the file access time when accessing files. atime updates the file access time when accessing files. remout remounting (2 ). unmount umount/dev/sdb1 = umount/mnt if it is occupied fuser-m/mnt, view the processes using the file system lsof/mnt to view the files being used (3 ). the/etc/fstab configuration file is automatically mounted. Each row has one mounting configuration and five columns, which indicate the devices, mount points, file systems, and mount options to be mounted, you can also use LABEL = STUDY to replace/dev/sdb1mount-a to mount all automatic Mount items defined in fstab.

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.