下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025荷兰食品加工产业市场供需合作关系及投资价值预测评估规划报告
- 2025荷兰电子商务平台销售行业市场消费动态研究分析及投资未来培育计划报告
- 2025英国箱包设计产业市场格局与品牌形象提升方案报告
- 2025英国智能儿童教育行业市场深度研究及竞争模式与个性化发展报告
- 2025英国医药行业市场全面调研及行业发展趋势与投资收益测定报告
- 2025航运行业市场现状及竞争格局深度分析研究报告
- 2025年12月广东东莞市招聘事业编制教师东北地区专场171人模拟笔试试题及答案解析
- 2025广西崇左市江州区消防救援大队政府专职消防员招聘模拟笔试试题及答案解析
- 食品工厂设计注意要点教例教案
- 2025云南剑川智慧物流产业园招聘园区副经理1人备考考试题库及答案解析
- (零模)2026届广州市高三年级调研测试数学试卷(含答案解析)
- 活动包干合同范本
- 2025辽宁近海产业发展集团有限公司招聘2人笔试历年常考点试题专练附带答案详解2套试卷
- 风电安规考试题库及答案
- 2025年轻人饮酒洞察报告-艺恩
- 北京市大兴区2024-2025学年九年级上学期语文期末试卷(含答案)
- 2025年创业信用贷款合同协议
- 《幼儿教师职业道德》学前教育高职全套教学课件
- 2025年考三轮车驾照科目一试题及答案
- 2025-2026学年苏科版(新教材)小学信息科技五年级上册期末综合测试卷及答案
- 房地产中介公司客户投诉应对制度
评论
0/150
提交评论