2011-11-14

如何在 linux 裡切出 2T 以上的 partition

上次做過一次,忘了筆記, 今天在使用 fdisk 的時候,才想起來 fdisk 沒辦法切超過 2T 的空間!找了好久,一看到 parted 這個關鍵字~我才想起來!就是它!


# parted /dev/md0
GNU Parted 2.1
Using /dev/md0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel                                                        
New disk label type? gpt                                                
Warning: The existing disk label on /dev/md0 will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? y                                                                
(parted) mkpart                                                          
Partition name?  []? primay                                              
File system type?  [ext2]? xfs                                          
Start? 0                                                                
End? -1                                                                  
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? i                                                        
(parted) p                                                              
Model: Unknown (unknown)
Disk /dev/md0: 33.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number  Start   End     Size    File system  Name    Flags
 1      17.4kB  33.0TB  33.0TB  xfs          primay
(parted) q                                                              
Information: You may need to update /etc/fstab.