I work in a video site company, often encounter server data disk more than 2T, this article has a lot of online, is not what high-end technology, here is a record and combined with the real online environment, appears more intuitive.
Original blog from: www.51niux.com bo: Busy Firewood less
1. View the size of the hard disk space you want to mount, command fdisk-l
Well, show that I have a 10T hard drive that has no partition mounted, just a 500G system disk itself.
2. Use the parted command to separate a 2T partition, the following is the operation.
Comments:
[Email protected] ~]# Parted/dev/sdb #选定要分区的盘符
Mklabel GPT #设置GPT分区表, because the MBR partition table only supports 2T disks, disks larger than 2T must use the GPT partition table, supporting the largest volume: 18EB, (E:EXABYTES,1EB=1024TB)
Mkpart primary 0% 20% #primary制定分区为主分区, followed by the starting and ending positions of the set partition
Print #查看自己的分区大小
Quit #退出
3. We will partition the rest of the space, because the first step has already developed a partition type, there is no need to specify.
Attention:
The partitioning step can also be set up like this:
Unit TB #制定分区单位为TB
Mkpart Primary 0 2 #分配2T空间, but the personal feeling is to use the form of the% to assign better
4. Format the hard drive
Mkfs.ext3/dev/sdb1
MKFS.EXT3/DEV/SDB2 #将分区好的硬盘格式化
Be aware of:
The problem occurs when formatting into ext3. EXT3 the default block size is 4k and can only support 8T of space. When formatting, specify the block size to 8K so that it can support up to 16T of space. corresponding command: Mkfs.ext3-b 8192/DEV/SDB2
5. Mount the data disk
[Email protected] ~]# mount/dev/sdb1/data1
[Email protected] ~]# mount/dev/sdb2/data2 #要挂载的目录要提前创建好
6. See if successful df-h is mounted and add mount command to boot
At this point, the partition mount is complete. Relatively simple, do not write too detailed.
Original blog from: www.51niux.com bo: Busy Firewood less
This article from "Technology in the progress of sharing" blog, declined reprint!
Linux format and mount a data disk larger than 2T