Chinaunix首页 | 论坛 | 博客
  • 博客访问: 165410
  • 博文数量: 16
  • 博客积分: 2601
  • 博客等级: 少校
  • 技术积分: 430
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-22 13:16
文章分类

全部博文(16)

文章存档

2009年(12)

2008年(4)

我的朋友

分类: LINUX

2008-10-22 18:31:27

[root@fvfqg1x ~]# parted /dev/hdc        对/dev/hdc 进行操作
GNU Parted 1.8.1
Using /dev/hdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt                     转化为GPT磁盘
Warning: The existing disk label on /dev/hdc will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? y                                                                
New disk label type?  [msdos]? gpt       输入GPT进行确认                     
(parted) print                           查看磁盘信息
                          
Model: VMware Virtual IDE Hard Drive (ide)
Disk /dev/hdc: 2147MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number  Start  End  Size  File system  Name  Flags
(parted) mkpart primary 0 100             划分一个起始为0,终止为100M的主分区                               
(parted) print                                                           
Model: VMware Virtual IDE Hard Drive (ide)
Disk /dev/hdc: 2147MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number  Start   End    Size   File system  Name     Flags
 1      17.4kB  100MB  100MB               primary      
(parted) mkpart primary 100 200           划分一个起始为100M,终止为200M的主分区
(parted) print                                                           
Model: VMware Virtual IDE Hard Drive (ide)
Disk /dev/hdc: 2147MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number  Start   End    Size   File system  Name     Flags
 1      17.4kB  100MB  100MB               primary      
 2      100MB   200MB  100MB               primary      
(parted) mkpart primary 200 300            划分一个起始为200M,终止为300M的主分区                              
(parted) print                             查看磁盘分区信息
Model: VMware Virtual IDE Hard Drive (ide)
Disk /dev/hdc: 2147MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number  Start   End    Size   File system  Name     Flags
 1      17.4kB  100MB  100MB               primary      
 2      100MB   200MB  100MB               primary      
 3      200MB   300MB  100MB               primary      
(parted) rm 3                              删除磁盘分区3
(parted) print                                                           
Model: VMware Virtual IDE Hard Drive (ide)
Disk /dev/hdc: 2147MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number  Start   End    Size   File system  Name     Flags
 1      17.4kB  100MB  100MB               primary      
 2      100MB   200MB  100MB               primary      
(parted) q                                                               
[root@fvfqg1x ~]# mkfs.ext3 /dev/hdc1      格式化分区,剩下就是挂载了
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
24480 inodes, 97636 blocks
4881 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
12 block groups
8192 blocks per group, 8192 fragments per group
2040 inodes per group
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729
Writing inode tables: done                           
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@fvfqg1x ~]#
阅读(827) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~