Linux Classroom essay-day sixth

Source: Internet
Author: User

Partitioning and formatting of disks

What is a disk partition

Disk partitioning refers to the logical partitioning of physical media on a hard disk. Partitioning a hard disk into multiple partitions is not only beneficial for managing files, but different partitions can create different file systems.

There are three primary partitions, extended partitions, and logical drives in a disk partition.

What is formatting

After the disk is partitioned, the next step is to format the disk partition (that is, the work of creating the file system)

using fdisk disk partitioning

You can use the Fdisk command to divide a disk into partitions, and you can specify the type of partition for each partition.

Fdisk/dev/sdb

N input P 1 w Save exit

Introduction to File Systems

Ext3

Availability of   integrity of data  Speed Simple Conversion

Ext4

What's New in features   easy to improve performance  Reliability Enhancement Aspects compatibility

types of file systems supported by Linux

Uname-r

Creating a file system

Creating a File system using mkfs

Mkfs.ext4/dev/sdb1

Mount Mount

Mount/dev/sdb1/dir01

Df-h

You can also use yes>/dir01/fil01

then use rm-rf/dir01/fil01.

Disk

1 Partitioning

Single disk partitioning tool fdisk

Logical Volume Management LVM Multi-Disk Management

2 Creating the file system:Ext4/ntfs/fat32

Mkfs.ext4/dev/sdb1

A file system was created on this partition

Pvcreate/dev/sdb/dev/sdc/dev/sdd

Pvdisplay/dev/sdb

Pvscan

Vgcreate VG01/DEV/SDB/DEV/SDC

Vgdisplay vg01

Vgscan

Lvcreate-l 550m-n lv01 vg01

Lvdisplay/dev/vg01/lv01

Lvscan

Mkfs.ext4/dev/vg01/lv01

Mount/dev/vg01/lv01/dir01

Df-h

Lv Extension

Lvextend-l +1G/DEV/VG01/LV01

Lvdisplay/dev/vg01/lv01

Resize2fs-f/DEV/VG01/LV01

Df-h

Vgextend VG01/DEV/SDD

Vgdisplay vg01

Lvextend-l +1G/DEV/VG01/LV01

Lvdisplay/dev/vg01/lv01

Resize2fs-f/DEV/VG01/LV01

Linux Classroom essay-day sixth

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.