我有一个 256GB 的 U 盘,里面有坏扇区,我使用以下命令获取它们:
sudo badblocks -wsvf -o 256GB.txt /dev/sdc
但是当我使用此文件(256GB.txt
)来格式化 pendrive 时,我会根据格式的类型获得不同的可用空间。
使用 fat32 我有 203 GB可用空间:
$ sudo mkfs.vfat -F 32 -v -n 256GB -l 256GB.txt /dev/sdc -I
mkfs.fat 3.0.26 (2014-03-07)
/dev/sdc has 255 heads and 63 sectors per track,
hidden sectors 0x0000;
logical sector size is 512,
using 0xf8 media descriptor, with 524288000 sectors;
drive number 0x80;
filesystem has 2 32-bit FATs and 64 sectors per cluster.
FAT size is 63985 sectors, and provides 8189999 clusters.
There are 32 reserved sectors.
Volume ID is 9029d4fa, volume label 256GB .
50098433 bad blocks
$ df -h /media/user/256GB/
Filesystem Size Used Avail Use% Mounted on
/dev/sdc 250G 48G 203G 20% /media/user/256GB
使用 ext4 我有 44 GB可用空间:
$ sudo mkfs.ext4 -v -l 256GB.txt -L 200GB /dev/sdc
mke2fs 1.42.9 (4-Feb-2014)
/dev/sdc is entire device, not just one partition!
Proceed anyway? (y,n) y
fs_types for mke2fs.conf resolution: 'ext4'
Filesystem label=200GB
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
16384000 inodes, 65536000 blocks
3276800 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
2000 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
...
Warning: the backup superblock/group descriptors at block 52297728 contain
bad blocks.
...
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
$ df -h /media/user/200GB/
S.ficheros Tamaño Usados Disp Uso% Montado en
/dev/sdc 246G 190G 44G 82% /media/user/200GB
你知道为什么吗?
谢谢
附言:由于有很多这样的警告,所以我...
之前和之后都写过。Warning: ...