Jean - 记录成长历程

  • 关于
  • Language
  • RSS Feed
  • 微博
  • 豆瓣
18
Sep

用parted对大于2TB的硬盘分区

By admin|Linux系统|4 Comments

Linux的桌面用户通常使用小型的硬盘和分区,但服务器需要一个大的分区。例如,使用fdisk命令您不能创建4TB的分区,它不会允许您创建的分区大于2TB。在本教程中,您将了解如何创建更大Linux文件系统分区。

本文转载自: http://www.cyberciti.biz/tips/fdisk-unable-to-create-partition-greater-2tb.html

Linux desktop user generally uses small hard disk and partition, but on server you need a large partition. For example, you cannot create 4TB partition size (RAID based) using fdisk command. It will not allow you to create a partition that is greater than 2TB. In this tutorial, you will learn more about creating Linux filesystems greater than 2 Terabytes to support enterprise grade operation under any Linux distribution.

To solve this problem use GNU parted command with GPT. It supports Intel EFI/GPT partition tables. Partition Table (GPT) is a standard for the layout of the partition table on a physical hard disk. It is a part of the Extensible Firmware Interface (EFI) standard proposed by Intel as a replacement for the outdated PC BIOS, one of the few remaining relics of the original IBM PC. EFI uses GPT where BIOS uses a Master Boot Record (MBR).

GUID Partition Table
(Diagram illustrating the layout of the GUID Partition Table scheme. Each logical block (LBA) is 512 bytes in size. LBA addresses that are negative indicate position from the end of the volume, with −1 being the last addressable block. Imaged Credit Wikipedia)

GPT Kernel Support

EFI GUID Partition support works on both 32bit and 64bit platforms. You must include GPT support in kernel in order to use GPT. If you don’t include GPT support in Linux kernelt, after rebooting the server, the file system will no longer be mountable or the GPT table will get corrupted. By default Redhat Enterprise Linux / CentOS comes with GPT kernel support. However, if you are using Debian or Ubuntu Linux, you need to recompile the kernel. Set CONFIG_EFI_PARTITION to y to compile this feature.

File Systems
   Partition Types
     [*] Advanced partition selection
     [*] EFI GUID Partition support (NEW)
....

Linux create 3TB partition size

One of my clients has Raid 5 Array -7x500GB hard disks to store large data. To create partition start GNU parted as follows:
# parted /dev/sdx
Output:

GNU Parted 1.8.1
Using /dev/sdx
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)

Creates a new GPT disklabel i.e. partition table:
mklabel gpt
Create 3TB partition size:
mkpart primary 0 3001G
Quit and save the changes:
quit
Use mkfs to format file system:
# mkfs.ext3 /dev/sdx1

Note: Replace /dev/sdx with actual RAID or disk name or block Ethernet device such as /dev/etherd/e0.0 . Don’t forget to update /etc/fstab, if necessary.

Further readings:

  • How Basic Disks and Volumes Work (little outdated but good to understand basic concept)
  • GUID Partition Table from the Wikipedia

Continue reading rest of the Multi-Terabytes Linux Filesystems series.

Contents
  1. Linux Creating a Partition Size Larger than 2TB
  2. Linux: Boot a 2TB+ partition or Larger Array Using Grub

无觅相关文章插件,快速提升流量

Tagged as: 入门, 基础
Add your comment →

4 Comments

  1. 我现在也在想着买个国外的空间了,等我的到期了就用国外的

    [回复]

    admin 回复:
    09月 23rd, 2009 at 09:49

    1,2百能买个不错的,老外天天搞活动,每天都是节日。

    [回复]

    By: ABitNo
    2009-09-23 at 08:51
  2. 怪不得动不动就不限空间不限流量,几T几T的盘,真是装不满啊~

    [回复]

    admin 回复:
    09月 20th, 2009 at 11:23

    可是会限制cpu用量,即使不限空间和流量但只给你一个连接的cpu,那么理论上也绝对不可能产生非常大的流量。

    [回复]

    By: kangzj
    2009-09-19 at 09:01

Leave your comment below! Cancel Reply

点击取消回复

View More Posts:
  • ←
  • →

分类

  • Linux系统 (61)
  • Linux集群 (4)
  • Web服务器 (26)
  • 创业相关 (6)
  • 工作笔记 (34)
  • 我爱折腾 (16)
  • 日记 (46)
  • 网络 (3)
  • 脚本编程 (49)

最新日志

  • 使用w3 total cache给wordpress提速
  • 从零开始,我的创业感悟
  • 为大众创造更美好的日常生活
  • 我的站立式工作平台
  • 阿里云计算使用简评

最新评论

  • admin on 从零开始,我的创业感悟
  • Kovlala on 从零开始,我的创业感悟
  • jean on 从零开始,我的创业感悟
  • Kovlala on 从零开始,我的创业感悟
  • ElmaByrd35 on 解决Fedora 11中文字体难看问题

博客互联

  • HackLog
  • leapsoul
  • Myredhat
  • Ninth element
  • Ti’blog
  • William Hua
  • young001
  • 懒人运维
  • 曙光博客
  • 月夜
  • 月影
  • 杂货店一号铺
  • 王先进’s blog
  • 疯中舞步
  • 菜鸟的技术站
  • 运维进行时

技术

  • DBA BLOG
  • 回忆未来[张宴]
  • 扶凯
  • 王炜's Blog
  • 百变贝贝

Powered by the inLine Minimal WordPress Theme