LINUX parted支持T级分区_第1页
LINUX parted支持T级分区_第2页
LINUX parted支持T级分区_第3页
LINUX parted支持T级分区_第4页
LINUX parted支持T级分区_第5页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、rootabintel # parted help用法:parted 选项:.设备命令参数.选项:-h,-i,-s,-v,helpinteractivescriptversion将带有“参数”的命令应用于“设备”。如果没有给出“命令”,则以交互模式 运行。显示此求助信息在必要时,提示用户从不提示用户显示版本对文件系统进行一个简单的检查将文件系统复制到另一个分区 打印通用求助信息,或关于COMMAND的信息、 创建新的磁盘标签(分区表)在MINOR创建类型为“文件系统类型”的文件移动编号为MINOR的分区将编号为MINOR的分区命名为“名称”打印分区表,或者分区退出程序挽救临近“起始点”、“终止

2、点”的遗失的分改变位于编号为MINOR的分区中文件系统的大删除编号为MINOR的分区选择要编辑的设备改变编号为MINOR的分区的标志命令: 检查 MINOR cp FROM-DEVICE FROM-MINOR TO-MINOR help COMMAND mklabel 标签类型 mkfs MINOR文件系统类型 系统 mkpart分区类型文件系统类型起始点终止点 创建一个分区 mkpartfs分区类型文件系统类型起始点终止点创建一个带有文件系统的分 区 move MINOR起始点终止点 name MINOR 名称 print MINOR quit rescue起始点终止点 区 resize M

3、INOR起始点终止点 小 rm MINOR select 设备 set MINOR标志状态大于1T的磁盘进行分区遇到一个问题,大磁盘的超过1T的时候fdisk无法分区,到网上找了半天才知道是用parted可以作,有网络真好啊.:D下面一块有3T RAID的硬盘的分区情况#parted /dev/sdcGNU Parted 1.6.19Copyright (C) 1998 - 2004 Free Software Foundation, Inc.This program is free software, covered by the GNU General Public License.Thi

4、s program is distributed in the hope that it will be useful, but WITHOUTANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.Using /dev/sdc (parted) m check MINOR do a simple check on the filesystem

5、 cp FROM-DEVICE FROM-MINOR TO-MINOR copy filesystem to another partition help COMMAND prints general help, or help on COMMAND mklabel LABEL-TYPE create a new disklabel (partition table) mkfs MINOR FS-TYPE make a filesystem FS-TYPE on partititon MINOR mkpart PART-TYPE FS-TYPE START END make a partiti

6、on mkpartfs PART-TYPE FS-TYPE START END make a partition with a filesystem move MINOR START END move partition MINOR name MINOR NAME name partition MINOR NAME print MINOR display the partition table, or a partition quit exit program rescue START END rescue a lost partition near START and END resize

7、MINOR START END resize filesystem on partition MINOR rm MINOR delete partition MINOR select DEVICE choose the device to edit set MINOR FLAG STATE change a flag on partition MINOR (parted) pDisk geometry for /dev/sdc: 0000 megabytes Disk label type: gpt Minor Start End Filesystem Name Fl

8、ags0.017 1000.000 ext31000.000 2000.000 ext32000.000 3000.000 ext3 (parted) rm 3(parted) rm 2 (parted) rm 1 (parted) mkpartfs primary ext3 0 1000000No Implementation: Support for creating ext3 file systems is not implemented yet. (parted) mkpart primary 0 1000000 (parted) mkpart primary 1000000 2000

9、000 (parted) mkpart primary 2000000 3000000 Error: Cant have a partition outside the disk! (parted) mkpart primary 2000000 2800000 (parted) q Information: Dont forget to update /etc/fstab, if necessary. #mkfs.ext3 /dev/sdc1 mke2fs 1.35 (28-Feb-2004) Filesystem label=OS type: LinuxBlock size=4096 (lo

10、g=2)Fragment size=4096 (log=2)128008192 inodes, 255999995 blocks12799999 blocks (5.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=2600468487813 block groups32768 blocks per group, 32768 fragments per group16384 inodes per groupSuperblock backups stored on blocks:32768, 9

11、8304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 102400000, 214990848Writing inode tables: doneCreating journal (8192 blocks): doneWriting superblocks and filesystem accounting information: doneThis filesystem will be

12、 automatically checked every 20 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.背景:构建图书馆光盘管理系统FTP, 6块硬盘,每个1TB,用一块硬盘做raid0, 安装系统,剩余5块做raid5。由于ext3文件系统不支持大于2TB的分区,所以 考虑使用GPT首先以root身份登录系统,查看硬盘信息:fdisk -l 复制内容到剪贴板代码:rootlibftp # fdisk -lDisk /dev/cciss/c0d0: 1000.1 GB, 100017

13、1331584 bytes 255 heads, 63 sectors/track, 121597 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice BootStartEndBlocksId System/dev/cciss/c0d0p1 Linux/dev/cciss/c0d0p23411610593234834083 Linux/dev/cciss/c0d0p31161061186552048287583 Linux/dev/cciss/c0d0p41186561215972363161

14、55 Extended/dev/cciss/c0d0p511865612056715358108+ 83 Linux/dev/cciss/c0d0p61205681215878193118+82 Linux swap/ SolarisWARNING: GPT (GUID Partition Table) detected on,/dev/cciss/c0d1! The util fdisk doesnt support GPT. Use GNU Parted.Disk /dev/cciss/c0d1: 4000.6 GB, 4000684662784 bytes 255 heads, 63 s

15、ectors/track, 486388 cylinders Units = cylinders of 16065 * 512 = 8225280 bytesDevice Boot StartEnd Blocks Id System/dev/cciss/c0d1p11267350 2147483647+ ee EFI GPT使用parted命令: 复制内容到剪贴板 代码: rootlibftp # parted /dev/cciss/c0d1 GNU Parted 1.8.1 Using /dev/cciss/c0d1 Welcome to GNU Parted! Type help to v

16、iew a list of commands. (parted) mklabel gptWarning: The existing disk label on /dev/cciss/c0d1 will be destroyed and all data on this disk will be lost. Do you want to continue?Yes/No? yNew disk label type? gpt? gpt 下一步:由MBR转为GPT磁盘 复制内容到剪贴板 代码: (parted) mkpart primary 0 4000GB print: 复制内容到剪贴板 代码: (

17、parted) printModel: Compaq Smart Array (cpqarray) Disk /dev/cciss/c0d1: 4001GB Sector size (logical/physical): 512B/512B Partition Table: gptNumber Start End Size File system Name Flags 117.4kB 4001GB 4001GBprimary (parted)quitInformation: Dont forget to update /etc/fstab, ifnecessary.下一步:格式化复制内容到剪贴

18、板代码:rootlibftp # mkfs.ext3 -F /dev/cciss/c0d1mke2fs 1.39 (29-May-2006)Filesystem label=OS type: LinuxBlock size=4096 (log=2)Fragment size=4096 (log=2)488374272 inodes, 976729654 blocks48836482 blocks (5.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=029808 block groups32

19、768 blocks per group, 32768 fragments per group16384 inodes per groupSuperblock backups stored on blocks:32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 102400000, 214990848, 512000000, 550731776, 644972544Writing inode tables: doneCreating journal (32768 blocks): doneWriting superblocks and filesystem accounting information: doneSize Used Avail Use% Mounted on15G 1.8G12G19G 173M18

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论