Welcome 微信登录

首页 / 操作系统 / Linux / Linux下分区详解之—Parted

通常我们用的比较多的一般都是fdisk工具来进行分区,但是现在由于磁盘越来越廉价,而且磁盘空间越来越大;而fdisk工具他对分区是有大小限制的,它只能划分小于2T的磁盘。但是现在的磁盘空间很多都已经是远远大于2T了,甚至达到2.5T和3T,那要怎么办能,有两个方法,其一是通过卷管理来实现,其二就是通过我们今天谈到的Parted工具来实现对GPT磁盘进行分区操作。GPT格式的磁盘相当于原来MBR磁盘中原来保留4个partition table的4*16个字节,只留第一个16个字节,类似于扩展分区,真正的partitiontable在512字节之后,GPT磁盘没有四个主分区的限制。 1、            Parted工具详解:1.1    进入Parted的方法(在命令行输入Parted命令即可)[root@jetsen ~]# partetWarning: Unable to open/dev/hdc read-write (Read-only file system). /dev/hdc has beenopened read-only.GNU Parted 1.8.1Using /dev/hdcWelcome to GNU Parted! Type"help" to view a list of commands.(parted) 1.2    获取parted工具帮助的方法:(只需输入help即可)(parted) help                                                              check NUMBER                             do a simple checkon the file system  cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER   copy file system to another partition  help [COMMAND]                           prints general help,or help on COMMAND  mklabel,mktable LABEL-TYPE               create a new disklabel(partition table)  mkfs NUMBER FS-TYPE                      make a FS-TYPE filesystem on partititon        NUMBER  mkpart PART-TYPE [FS-TYPE] START END     make a partition  mkpartfs PART-TYPE FS-TYPE START END     make a partition with a file system  move NUMBER START END                    move partition NUMBER  name NUMBER NAME                         name partition NUMBERas NAME  print [free|NUMBER|all]                  display the partition table,a partition, or        all devices  quit                                     exit program  rescue START END                         rescue a lostpartition near START and END  resize NUMBER START END                  resize partition NUMBER andits file system  rm NUMBER                                deletepartition NUMBER  select DEVICE                            choose the deviceto edit  set NUMBER FLAG STATE                    change the FLAG onpartition NUMBER  toggle [NUMBER [FLAG]]                   toggle the state of FLAG onpartition NUMBER  unit UNIT                                set the defaultunit to UNIT  version                                  displays thecurrent version of GNU Parted        and copyright information(parted) [root@jetsen ~]# parted--helpUsage: parted [OPTION]...[DEVICE [COMMAND [PARAMETERS]...]...]Apply COMMANDs withPARAMETERS to DEVICE.  If no COMMAND(s)are given, run ininteractive mode. OPTIONs:  -h, --help                    displays this help message  -i, --interactive             where necessary, prompts for userintervention  -l, --list                    lists partition tables ofall detected devices  -s, --script                  never prompts for userintervention  -v, --version                 displays the version COMMANDs:  check NUMBER                             do a simple checkon the file system  cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER   copy file system to another partition  help [COMMAND]                           prints general help,or help on COMMAND  mklabel,mktable LABEL-TYPE               create a new disklabel(partition table)  mkfs NUMBER FS-TYPE                      make a FS-TYPE filesystem on partititon NUMBER  mkpart PART-TYPE [FS-TYPE] START END     make a partition  mkpartfs PART-TYPE FS-TYPE START END     make a partition with a file system  move NUMBER START END                    move partition NUMBER  name NUMBER NAME                         name partition NUMBERas NAME  print [free|NUMBER|all]                  display the partition table, apartition, or all devices  quit                                     exitprogram  rescue START END                         rescue a lostpartition near START and END  resize NUMBER START END                  resize partition NUMBER andits file system  rm NUMBER                                deletepartition NUMBER  select DEVICE                            choose the deviceto edit  set NUMBER FLAG STATE                    change the FLAG onpartition NUMBER  toggle [NUMBER [FLAG]]                   toggle the state of FLAG onpartition NUMBER  unit UNIT                                set the defaultunit to UNIT  version                                  displays thecurrent version of GNU Parted and copyright information[root@jetsen ~]#1.3    退出parted工具(只需输入quit即可)(parted) quit                                                            Information: Don"t forget toupdate /etc/fstab, if necessary.                           并且同时会提示及时更新/etc/fstab文件
  • 1
  • 2
  • 3
  • 4
  • 下一页
Amazon EC2 Linux实例定制内核Linux中Workqueue机制分析相关资讯      Linux系统教程 
  • Linux系统教程:修复“ImportError  (08/17/2015 07:50:43)
  • 正在经历变革的 Linux 系统管理员  (08/14/2014 09:49:42)
  • Linux系统教程:定制5M的RedHat 5.  (05/18/2013 14:49:49)
  • Linux系统教程:Ubuntu桌面上禁用  (06/07/2015 14:01:48)
  • 新电脑+旧系统:教你在不同机器间  (07/04/2013 06:51:32)
  • Linux系统教程:自动删除n天前日志  (03/25/2013 19:10:16)
本文评论 查看全部评论 (0)
表情: 姓名: 字数