To operate a hard disk using the parted command

Source: Internet
Author: User

Fdisk-l #查看磁盘信息

Fdisk/dev/sdb #创建, Managing partitions

M Get help

P Print Partition Table

N New

P primary partition, E extension #在MBR这样的分区中, only one extended partition, up to 4 primary partitions

Logical Partitioning

Q exit

D Delete

W Save



Create an extended partition, and then create a logical partition

[Email protected] wang]# FDISK/DEV/SDA


Reboot #重启


format the hard drive :

#mkfs. Ext3/dev/sda5

#mkfs. Ext4/dev/sda5


To create a mount point :

Mkdir/sda5

mount/dev/sda5/sda5/

ls/sda5/


View:

Df-h


lsof: View those files whose commands open the current system

Mount point of the LOSF file system



#fuser-M-u-v/sda5/

-m Display Process ID

-U Displays the name of the user executing the process

-V Detailed information


GFD partition Table :

GPT, globally unique identity partition table GUID


    1. Parted Disk Partitioning Tool

    2. installation :

      [Email protected] wang]# RPM-QF ' which parted '
      Parted-2.1-21.el6.x86_64


1.2 How to get the parted tool Help: Just enter


Exit:

To exit the parted tool, just enter quit


To view all disk statuses:

[Email protected] wang]# parted-l


to operate a disk by using the parted tool :

#parted/dev/sdb

P #查看磁盘分区状态

Mklabel #创建分区表类型为 GPT

Gpt

Mkpart #创建分区


Last formatted partition


Delete : #parted/DEV/SDC







This article is from the "11123555" blog, please be sure to keep this source http://11133555.blog.51cto.com/11123555/1885746

To operate a hard disk using the parted command

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.