1、关机更换硬盘
2、格式化硬盘
[root@BigDataHadoopDN2PRD data2]# parted -s /dev/sdc mklabel gpt
[root@BigDataHadoopDN2PRD data2]# parted -s /dev/sdc mkpart primary ext2 0 100%
Warning: The resulting partition is not properly aligned for best performance.
[root@BigDataHadoopDN2PRD data2]# mkfs.ext4 /dev/sdc1 --此处格式化时间较长,大约30-40分钟
mke2fs 1.41.12 (17-May-2010)
/dev/sdc1 alignment is offset by 3072 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=0 blocks
366288896 inodes, 1465130637 blocks
73256531 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
44713 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information:此处直接回车,等待时间较长,大约1小时
done
This filesystem will be automatically checked every 34 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
3、挂载新硬盘
原文件 /etc/fstab中有/dev/sdc1的挂载,直接mount -a即可
或者mount /dev/sdc1 /data2
文章评论