ITPub博客

首页 > Linux操作系统 > Linux操作系统 > linux超大硬盘分区工具parted

linux超大硬盘分区工具parted

原创 Linux操作系统 作者:jcq0 时间:2012-02-24 11:56:51 0 删除 编辑

linux超大硬盘分区工具parted
[root@node132 ~]# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          25      200781   83  Linux
/dev/sda2              26        4104    32764567+  82  Linux swap / Solaris
/dev/sda3            4105       60801   455418652+  83  Linux

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


WARNING: The size of this disk is 6.0 TB (5999532441600 bytes).
DOS partition table format can not be used on drives for volumes
larger than 2.2 TB (2199023255040 bytes). Use parted(1) and GUID
partition table format (GPT).


Disk /dev/sdb: 5999.5 GB, 5999532441600 bytes
255 heads, 63 sectors/track, 729401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      267350  2147483647+  ee  EFI GPT
[root@node132 ~]# parted /dev/sdb
GNU Parted 1.8.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) m                                                               
  check NUMBER                             do a simple check on 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 file system 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 NUMBER as NAME
  print [free|NUMBER|all]                  display the partition table, a partition, or all devices
  quit                                     exit program
  rescue START END                         rescue a lost partition near START and END
  resize NUMBER START END                  resize partition NUMBER and its file system
  rm NUMBER                                delete partition NUMBER
  select DEVICE                            choose the device to edit
  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                                  displays the current version of GNU Parted and copyright information
(parted) p                                                               

Model: Dell VIRTUAL DISK (scsi)
Disk /dev/sdb: 6000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      17.4kB  6000GB  6000GB  ext3                   

(parted) mklabel 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?
parted: invalid token: gpt
Yes/No? yes                                                              
New disk label type?  [gpt]?                                             
(parted) print                                                           

Model: Dell VIRTUAL DISK (scsi)
Disk /dev/sdb: 6000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End  Size  File system  Name  Flags

(parted) mkpart primary 0% 100%
(parted) print                                                           

Model: Dell VIRTUAL DISK (scsi)
Disk /dev/sdb: 6000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      17.4kB  6000GB  6000GB  ext3         primary      

(parted) quit                                                            
Information: Don't forget to update /etc/fstab, if necessary.            

[root@node132 ~]# mkfs.ext3 /dev/sdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
732364800 inodes, 1464729591 blocks
73236479 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
44700 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000, 214990848, 512000000, 550731776, 644972544

Writing inode tables: done                           
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 35 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@node132 ~]# du -h
16K     ./.gconfd
16K     ./.gconf/apps/gnome-session/options
28K     ./.gconf/apps/gnome-session
40K     ./.gconf/apps
48K     ./.gconf
184K    .
[root@node132 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3             421G  3.5G  396G   1% /
/dev/sda1             190M   12M  169M   7% /boot
tmpfs                  16G     0   16G   0% /dev/shm
/dev/sdb1             5.4T  187M  5.1T   1% /opt
[root@node132 ~]#

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/14130873/viewspace-717069/,如需转载,请注明出处,否则将追究法律责任。

上一篇: AIX调优之IO篇-pbuf
请登录后发表评论 登录
全部评论

注册时间:2008-11-25

  • 博文量
    93
  • 访问量
    341753