今天在进行linux环境搭建的时候遇到一个问题
attempt to access beyond end of device
在网上查了很多,中文网页都没有好的解决方法,倒是在外国网站上找到了正确的解决方法。
详情可以参考:
http://www.cyberciti.biz/tips/fdisk-unable-to-create-partition-greater-2tb.html
http://en.wikipedia.org/wiki/GUID_Partition_Table
这两个链接第一个是解决方法,第二个是背景知识,感兴趣的可以自己看看。
解决方法是:
这个问题是关于
Frankly speaking, you cannot create a Linux partition larger than 2 TB using the fdisk command. The fdisk won't create partitions larger than 2 TB. This is fine for desktop and laptop users, but on server you need a large partition. For example, you cannot create 3TB or 4TB partition size (RAID based) using the 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).
Linux GPT内核的支持
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. SetCONFIG_EFI_PARTITION to y to compile this feature.
在内核配置中选择
File Systems Partition Types [*] Advanced partition selection [*] EFI GUID Partition support (NEW) ....