华南俳烁实业有限公司

考試首頁(yè) | 考試用書(shū) | 培訓(xùn)課程 | 模擬考場(chǎng) | 考試論壇  
  當(dāng)前位置:Linux認(rèn)證 > 紅帽認(rèn)證 > 紅帽認(rèn)證輔導(dǎo) > 文章內(nèi)容
  

RHCE7認(rèn)證學(xué)習(xí)筆記:磁盤(pán)、分區(qū)和文件系統(tǒng)管理

來(lái)源:Linux社區(qū) [ 2016年2月24日 ] 【

2、gdisk命令

使用gdisk劃分磁盤(pán),默認(rèn)劃分為GPT格式的磁盤(pán)
[root@linuxidc ~]# gdisk /dev/sdb                                             
GPT fdisk (gdisk) version 0.8.6
Partition table scan:

Command (? for help): n
Partition number (1-128, default 1): 
First sector (34-10485726, default = 2048) or {+-}size{KMGTP}: 
Last sector (2048-10485726, default = 10485726) or {+-}size{KMGTP}: +1G
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): 8e00
Changed type of partition to 'Linux LVM'

Command (? for help): p
Disk /dev/sdb: 10485760 sectors, 5.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): DFDD30F8-C2A3-45BE-95B0-37A2CABBCF89
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 10485726
Partitions will be aligned on 2048-sector boundaries
Total free space is 8388541 sectors (4.0 GiB)
Number  Start (sector)    End (sector)  Size      Code  Name
  1            2048        2099199  1024.0 MiB  8E00  Linux LVM

3、parted命令:可以自行選擇劃分格式

parted命令可以將MBR結(jié)構(gòu)修改為GPT結(jié)構(gòu),但是要慎重,因?yàn)榉謪^(qū)表會(huì)丟失:

[root@linuxidc ~]# parted /dev/sdb
GNU Parted 3.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) help                                                             
  align-check TYPE N                        check partition N for TYPE(min|opt) alignment
  help [COMMAND]                          print general help, or help on COMMAND
  mklabel,mktable LABEL-TYPE              create a new disklabel (partition table)
  mkpart PART-TYPE [FS-TYPE] START END    make a partition
  name NUMBER NAME                        name partition NUMBER as NAME
  print [devices|free|list,all|NUMBER]    display the partition table, available devices, free space, all found partitions, or a
        particular partition
  quit                                    exit program
  rescue START END                        rescue a lost partition near START and END
  rm NUMBER                                delete partition NUMBER
  select DEVICE                            choose the device to edit
  disk_set FLAG STATE                      change the FLAG on selected device
  disk_toggle [FLAG]                      toggle the state of FLAG on selected device
  set NUMBER FLAG STATE                    change the FLAG on partition NUMBER
  toggle [NUMBER [FLAG]]                  toggle the state of FLAG on partition NUMBER
  unit UNIT                                set the default unit to UNIT
  version                                  display the version number and copyright information of GNU Parted

使用mklabel轉(zhuǎn)換分區(qū)類(lèi)型:

(parted) mklabel                                                         
New disk label type?                                                     
aix    amiga  bsd    dvh    gpt    loop  mac    msdos  pc98  sun   
New disk label type? gpt
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?

本文糾錯(cuò)】【告訴好友】【打印此文】【返回頂部
將考試網(wǎng)添加到收藏夾 | 每次上網(wǎng)自動(dòng)訪問(wèn)考試網(wǎng) | 復(fù)制本頁(yè)地址,傳給QQ/MSN上的好友 | 申請(qǐng)鏈接 | 意見(jiàn)留言 TOP
關(guān)于本站  網(wǎng)站聲明  廣告服務(wù)  聯(lián)系方式  站內(nèi)導(dǎo)航  考試論壇
Copyright © 2007-2013 中華考試網(wǎng)(Examw.com) All Rights Reserved
湖南省| 德安县| 漳平市| 田阳县| 扶绥县| 日照市| 公安县| 东兴市| 洪湖市| 龙南县| 阿巴嘎旗| 札达县| 淮阳县| 柯坪县| 云和县| 台中县| 鄂州市| 米脂县| 沁源县| 鱼台县| 丹寨县| 济宁市| 淮滨县| 江安县| 嘉黎县| 得荣县| 桐柏县| 新泰市| 满城县| 怀仁县| 民丰县| 玉树县| 剑川县| 增城市| 苗栗市| 茶陵县| 蒲城县| 松桃| 永吉县| 郯城县| 息烽县|