我使用的是ubuntu20.04,我想要创建新的分区磁盘,正好有500 MB。但是,fdisk将其调整为512 can,是否有任何方法可以创建准确的500 it磁盘大小?

ric@Eric:~/Downloads$ sudo fdisk /dev/sda
Welcome to fdisk (util-linux 2.34).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): n
All primary partitions are in use.
Adding logical partition 7
First sector (2359260-10288994, default 2359260): 2359260
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2359260-10288994, default 10288994): +500M
Created a new partition 7 of type 'Linux' and of size 512 MiB.
Command (m for help): p
Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: Portable SSD T5
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33553920 bytes
Disklabel type: dos
Disk identifier: 0xd13fa933
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 1952501760 1953523711 1021952 499M ef EFI (FAT-12/16/32)
/dev/sda2 1950453760 1952501759 2048000 1000M 83 Linux
/dev/sda3 1704693760 1950453759 245760000 117.2G 83 Linux
/dev/sda4 65536 10288994 10223459 4.9G 5 Extended
/dev/sda5 131071 1179629 1048559 512M 83 Linux
/dev/sda6 1245165 2293724 1048560 512M 83 Linux
/dev/sda7 2359260 3407819 1048560 512M 83 Linux
Partition table entries are not in disk order.
Command (m for help): 发布于 2021-01-03 08:13:04
这可以用数学解决!扇区大小为512字节,这意味着需要100万字节才能拥有500 to。
First sector (2359260-10288994, default 2359260): 2359260
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2359260-10288994, default 10288994): 3359260但是,如果以下情况下,请为不完全为500 if的数字做好准备:
多年来,很多数学都在研究数据是如何在存储设备上编写和组织的,有些情况对于设备的长期使用来说是不太理想的。
https://askubuntu.com/questions/1304677
复制相似问题