vim /etc/fstab UUID=a5a8e148-8c6e-49c0-be74-dc1e61fc170f /data ext4 defaults 0 0
要挂载的分区设备号 挂载点 文件系统类型 挂载选项 是否备份 是否检测
fdisk单次分区不能超过2T, 超过2T需要使用parted
[root@iz5bg05ape183r0ipx22lrz ~]# part parted partprobe partx [root@iz5bg05ape183r0ipx22lrz ~]# parted /dev/vdc GNU Parted 3.1 Using /dev/vdc Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) p Model: Virtio Block Device (virtblk) Disk /dev/vdc: 3221GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags:
Number Start End Size Type File system Flags
(parted) mklabel gpt Warning: The existing disk label on /dev/vdc will be destroyed and all data on this disk will be lost. Do you want to continue? Yes/No? yes (parted) mkpart Partition name? []? vdc1 File system type? [ext2]? ext4 Start? 0 End? 3221GB Warning: The resulting partition is not properly aligned for best performance. Ignore/Cancel? ignore (parted) p Model: Virtio Block Device (virtblk) Disk /dev/vdc: 3221GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags:
Number Start End Size File system Name Flags 1 17.4kB 3221GB 3221GB vdc1
(parted) quit Information: You may need to update /etc/fstab.