About Linux disk partitioning, file system creation command, file system mount approximation

Source: Internet
Author: User
Tags uuid

    

Linux Disk Management

(1) Create a disk partition

Fdisk/dev/sda

Subcommand: P Print disk partition information

D Delete Partition

N New Partition

W Save and exit

T modify partition ID

L The partition ID of the list

(2) Create a file system on a new partition, a management tool for user space

MKFS.EXT2 Device

Mke2fs-t ext3-b 1024-m 3-l ' volume label '/dev/device Explanation:-T indicates file system

-j =-T ext3-b description block partition size

-N Create how many inode-m to reserve a percentage of space for administrative staff

-N data space each number of bytes created an inode, not less than Block-l indicated volume label

-O fearture[: Enable related attributes

-o ^fearture[...] close related features

   

Mkswap: Creating Swap partitions

Mkswap [Options] Device

-L ' LABEL '

Premise: adjust its partition ID to 82;

(3) File System mount fame

Mount [-FNRSVW] [-t vfstype] [-O options] Device dir

Device indicates which devices to mount and can use-u ' UUID ' or-l ' LABEL '

Dir mount point requires pre-existing, preferably empty directory. If the directory is not empty, the previously existing file is hidden

-T type indicates the type of file system being mounted

-U ' UUID ' indicates the device being mounted with a UUID

-L ' LABEL ' indicates the mounted device with a volume label

-R Read-only mount

-W Read-write Mount

-A auto mount so the device that supports automatic mounting is defined in the/etc/fstab file. And the Mount option has an ' Auto mount ' option

-N does not update/etc/mtab automatically

See what the kernel is tracking to mount the device cat/proc/mounts

Device file line selection-o option

Atime/noatime whether the access timestamp is updated automatically

Diratime/nodiratime If the directory access timestamp is automatically updated

ASYCN/SYCN asynchronous mode or synchronous mode high access efficiency for asynchronous mode

Exce/noexce whether the application on the file system is allowed to run as a process

Dev/nodev support for access to device files on this file system

Whether the Auto/noauto supports automatic mounting

Remount Re-mount

RO Read-only mount

RW Read-Write Mount

Suid/nosuid

User/nouser whether a normal user is allowed to mount this device

ACLs enable ACL functionality on the device

Defaults default mount option rw suid dev exec auto Nouser asycn

    

Umount Uninstall command

Umount Mount_point

View the process being accessed fuser-v Mount_point

End the process being accessed fuser-km Mount_point

Enable Swap space swapon-a enable all swap spaces

-P Prioroty

Disable swapoff [option] Device

Memory space usage free-m displayed in megabytes

Mounted File system usage df-h

-I view used inode status

-P output in POSIX-compatible format

View the usage status of a directory Du-h-s Dir

Attached: Cat/proc/filesystems View the file system of the current system

To see if the kernel has identified a new partition:

# cat/proc/partations

Notifies the kernel to re-read the hard disk partition table:

Partx-a/dev/device

-N m:n

Kpartx-a/dev/device

-f:force

Lsmod Viewing mounted file systems

Blkid Device View information for a partition

Blkid-u to view the specified device according to the set ID

  

     

  

  

    

    

   

About Linux disk partitioning, file system creation command, file system mount approximation

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.