1. Selesaikan
Saya juga menghadapi masalah ini, dan ini adalah bagaimana saya menekan peringatan yang mengganggu!
Titik kunci adalah: set the start to any logical sector, which is a multiple of 8
.
Saya menetapkan 204800
(karena saya hanya dapat memilih dari 65535-976773167).
step1 fdisk
$ fdisk /dev/sdf
The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.
欢迎使用 fdisk (util-linux 2.23.2)。
更改将停留在内存中,直到您决定将更改写入磁盘。
使用写入命令前请三思。
命令(输入 m 获取帮助):d
已选择分区 1
分区 1 已删除
命令(输入 m 获取帮助):p
磁盘 /dev/sdf:500.1 GB, 500107862016 字节,976773168 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 4096 字节
I/O 大小(最小/最佳):4096 字节 / 33553920 字节
磁盘标签类型:dos
磁盘标识符:0xa2254a70
设备 Boot Start End Blocks Id System
命令(输入 m 获取帮助):n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
分区号 (1-4,默认 1):1
# the key point
# ⏬⏬⏬⏬⏬⏬⏬⏬⏬⏬⏬⏬⏬⏬⏬⏬⏬⏬⏬⏬⏬⏬⏬⏬⏬⏬
起始 扇区 (65535-976773167,默认为 65535): 204800 (chose a multiple of 8)
Last 扇区, +扇区 or +size{K,M,G} (204800-976773167,默认为 976773167):
将使用默认值 976773167
分区 1 已设置为 Linux 类型,大小设为 465.7 GiB
# 🔼🔼🔼🔼🔼🔼🔼🔼🔼🔼🔼🔼🔼🔼🔼🔼🔼🔼🔼🔼🔼🔼🔼🔼🔼🔼
命令(输入 m 获取帮助):w
The partition table has been altered!
Calling ioctl() to re-read partition table.
正在同步磁盘。
step2 memformat disk
$ mkfs.ext4 /dev/sdf1
mke2fs 1.42.9 (28-Dec-2013)
文件系统标签=
OS type: Linux
块大小=4096 (log=2)
分块大小=4096 (log=2)
Stride=0 blocks, Stripe width=8191 blocks
30523392 inodes, 122071046 blocks
6103552 blocks (5.00%) reserved for the super user
第一个数据块=0
Maximum filesystem blocks=2271215616
3726 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
Allocating group tables: 完成
正在写入inode表: 完成
Creating journal (32768 blocks): 完成
Writing superblocks and filesystem accounting information: 完成
step3 hasilnya
Dan, akhirnya peringatan itu hilang.
$ fdisk -l /dev/sdf
磁盘 /dev/sdf:500.1 GB, 500107862016 字节,976773168 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 4096 字节
I/O 大小(最小/最佳):4096 字节 / 33553920 字节
磁盘标签类型:dos
磁盘标识符:0xa2254a70
设备 Boot Start End Blocks Id System
/dev/sdf1 204800 976773167 488284184 83 Linux
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 223.6G 0 disk
├─sda1 8:1 0 500M 0 part /boot/efi
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 170G 0 part
├─centos--sda-root 253:0 0 100G 0 lvm /
├─centos--sda-swap 253:1 0 20G 0 lvm
└─centos--sda-home 253:2 0 50G 0 lvm /home
sdb 8:16 0 1.8T 0 disk /data2
sdc 8:32 0 1.8T 0 disk
sdd 8:48 0 1.8T 0 disk /data1
sde 8:64 0 1.8T 0 disk /home
sdf 8:80 0 465.8G 0 disk
└─sdf1 8:81 0 465.7G 0 part
2. Bagaimana masalah ini terlihat
Tampilkan disk
[root@dt120 data1]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 223.6G 0 disk
├─sda1 8:1 0 500M 0 part /boot/efi
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 170G 0 part
├─centos--sda-root 253:0 0 100G 0 lvm /
├─centos--sda-swap 253:1 0 20G 0 lvm
└─centos--sda-home 253:2 0 50G 0 lvm /home
sdb 8:16 0 1.8T 0 disk /data2
sdc 8:32 0 1.8T 0 disk
sdd 8:48 0 1.8T 0 disk /data1
sde 8:64 0 1.8T 0 disk /home
sdf 8:80 0 465.8G 0 disk
└─sdf1 8:81 0 465.7G 0 part
fdisk
$ fdisk /dev/sdf
欢迎使用 fdisk (util-linux 2.23.2)。
更改将停留在内存中,直到您决定将更改写入磁盘。
使用写入命令前请三思。
Device does not contain a recognized partition table
使用磁盘标识符 0xff020bf0 创建新的 DOS 磁盘标签。
The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.
命令(输入 m 获取帮助):p
磁盘 /dev/sdf:500.1 GB, 500107862016 字节,976773168 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 4096 字节
I/O 大小(最小/最佳):4096 字节 / 33553920 字节
磁盘标签类型:dos
磁盘标识符:0xff020bf0
设备 Boot Start End Blocks Id System
命令(输入 m 获取帮助):n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
分区号 (1-4,默认 1):1
起始 扇区 (65535-976773167,默认为 65535):
将使用默认值 65535
Last 扇区, +扇区 or +size{K,M,G} (65535-976773167,默认为 976773167):
将使用默认值 976773167
分区 1 已设置为 Linux 类型,大小设为 465.7 GiB
命令(输入 m 获取帮助):p
磁盘 /dev/sdf:500.1 GB, 500107862016 字节,976773168 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 4096 字节
I/O 大小(最小/最佳):4096 字节 / 33553920 字节
磁盘标签类型:dos
磁盘标识符:0x2b6ce6ea
设备 Boot Start End Blocks Id System
/dev/sdf1 65535 976773167 488353816+ 83 Linux
Partition 1 does not start on physical sector boundary.
命令(输入 m 获取帮助):w
The partition table has been altered!
Calling ioctl() to re-read partition table.
正在同步磁盘。
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 223.6G 0 disk
├─sda1 8:1 0 500M 0 part /boot/efi
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 170G 0 part
├─centos--sda-root 253:0 0 100G 0 lvm /
├─centos--sda-swap 253:1 0 20G 0 lvm
└─centos--sda-home 253:2 0 50G 0 lvm /home
sdb 8:16 0 1.8T 0 disk /data2
sdc 8:32 0 1.8T 0 disk
sdd 8:48 0 1.8T 0 disk /data1
sde 8:64 0 1.8T 0 disk /home
sdf 8:80 0 465.8G 0 disk
└─sdf1 8:81 0 465.7G 0 part
format
$ mkfs.ext4 /dev/sdf1
mke2fs 1.42.9 (28-Dec-2013)
/dev/sdf1 alignment is offset by 512 bytes.
This may result in very poor performance, (re)-partitioning suggested.
文件系统标签=
OS type: Linux
块大小=4096 (log=2)
分块大小=4096 (log=2)
Stride=0 blocks, Stripe width=8191 blocks
30523392 inodes, 122088454 blocks
6104422 blocks (5.00%) reserved for the super user
第一个数据块=0
Maximum filesystem blocks=2271215616
3726 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
Allocating group tables: 完成
正在写入inode表: 完成
Creating journal (32768 blocks): 完成
Writing superblocks and filesystem accounting information: 完成
masalah
Partition 1 does not start on physical sector boundary.
$ fdisk -l /dev/sdf
磁盘 /dev/sdf:500.1 GB, 500107862016 字节,976773168 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 4096 字节
I/O 大小(最小/最佳):4096 字节 / 33553920 字节
磁盘标签类型:dos
磁盘标识符:0xa2254a70
设备 Boot Start End Blocks Id System
/dev/sdf1 65535 976773167 488353816+ 83 Linux
Partition 1 does not start on physical sector boundary.