Linux Learning notes-file system

Source: Internet
Author: User

First, the file system underLinux 1. Basic file System 1.1 ext1.2 ext2 2. log File system 3. extended Linux log file system 3.1 ext33.2 Ext43.3 JFS3.4 Reiser 3.5 XFS
second, the operation of the file systemcreate partition using:fdisk command 1 , you can use fdiskwhen the hard drive is less than or equal to 2T .
# Fdisk/dev/sdb  1, view Help.  input: M  2, new partition.  input: N  3, create logical partition  input: P  4, enter partition number and specify partition size  follow the prompts, the carriage return indicates the default.  5. Check the partition (the partition operation is not performed at this time)  Command (M for help): P   6, save exit  Command (M for help): W  
2, when the hard disk is greater than2Twhen, withpartedcommand.
Parted/dev/sdb   (Partition the 3T hard drive with the part command)  Mklabel GPT       (in GPT format you can get 3TB in a partition)  unit TB           (set in TB)  Mkpart Primary 0 3 (set to a primary partition, size 3TB, start is 0, end is 3)  print              (display set partition size)  quit               (exit parted program)  

iii. Creating a file system

To create a file system command-line program

Tools

Use

Mkefs

Create an Ext file system

Mke2fs

Create a ext2 file system

Mkfs.ext3

Create a Ext3 file system

Mkfs.ext4

Create a Ext4 file system

Mkreiserfs

Create a ReiserFS file system

Jfs_mkfs

Create a JFS file system

Mkfs.xfs

Create an XFS file system


The format partition uses:

Mkfs.ext4/dev/sdb1

The above command is a file system that formats partition /DEV/SDB1 into ext4 format


Iv. Mounting the file system

Mount: Using the Mount command

such as:mount–t ext4/dev/sdb1/mnt

Explanation: Mount a ext4 file system with a mount point of /mnt

Tip: Make sure that the folder has mnt under the root directory

Note: This method of mounting the file system only temporarily mounts the file system. When you restart the Linux system, the file system is not automatically mounted. To force Linux to mount the file system automatically at startup, you can add the file system to the/etc/fstab file.

If you join at the end:

/DEV/SDB1/DEV/SDB1 EXT4 Defaults 1 1

Warm tip: After modifying the /etc/fstab file, run the mount-a command to verify that the configuration is correct
Otherwise, the wrong configuration of the fstab file causes the system not to start properly. If the system does not start properly, enter the root password into repair mode. The key step is to re- Mount/(mount-n-o remount,rw/). Without this step, the file system is read-only, which prevents the configuration file from being modified and saved, fixing the problem.

v. Logical Volume Management Linux Logical Volume Manager LVM(Logical Volume manager). the core of logical volume management is how it handles hard disk partitions installed on the system. In the world of logical volume management, hard disks are called physical volumes (physical VOLUME,PV). Each physical volume is mapped to one of the weak partitions created on the hard disk.





Linux Learning notes-file system

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.