3TB的硬盘使用fdisk分区最大2.2T
解决:单个分区3TB
系统:ubuntu12.04 serverX64
botwave@bwa135:~$ sudo parted /dev/sdb //选择硬盘
GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt //类型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?Yes/No? y //确定
(parted) mkpart prinmary 1 -1 //将硬盘分成一个分区
(parted) print //查看
Model: ATA ST3000DM001-9YN1 (scsi)
Disk /dev/sdb: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size Filesystem Name Flags
1 1049kB 3001GB 3001GB ext4 prinmary
(parted) quit //退出
Information: You may need to update /etc/fstab.
botwave@bwa135:~$ sudo mkfs.ext4 /dev/sdb1 //格式化文件系统为ext4
botwave@bwa135:~$ sudo mkfs.ext4 -F /dev/sdb1 //格式化
botwave@bwa135:~$ sudo parted /dev/sdb print //查看
Model: ATA ST3000DM001-9YN1 (scsi)
Disk /dev/sdb: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 3001GB 3001GB ext4 prinmary
botwave@bwa135:~$ sudo mkdir /home/Disk01 //创建挂载目录
botwave@bwa135:~$ sudo chmod 755 /home/Disk01 //给权限
botwave@bwa135:~$ sudo mount /dev/sdb1 /home/Disk01 //挂载分区
botwave@bwa135:~$ sudo df –Hl //查看分区
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 66G 3.2G 59G 6% /
udev 4.2G 4.1k 4.2G 1% /dev
tmpfs 1.7G 898k 1.7G 1% /run
none 5.3M 0 5.3M 0% /run/lock
none 4.2G 156k 4.2G 1% /run/shm
/dev/sda6 66G 1.2G 62G 2% /tmp
/dev/sda7 66G 1.5G 61G 3% /var
/dev/sda8 66G 1.2G 62G 2% /usr/local
/dev/sda9 214G 3.3G 200G 2% /home
/dev/sdb1 3.0T 45G 2.9T 2% /home/Disk01
botwave@bwa135:~$ sudo vi /etc/fstab //开机自动挂载
/dev/sdb1 /home/Disk01 ext4 defaults 0 0