当前位置: 技术问答>linux和unix
df -k 看到的 文件系统的分配不符
来源: 互联网 发布时间:2016-12-10
本文导语: [root@sheng ~]# fdisk -l Disk /dev/sda: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda...
[root@sheng ~]# fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 6 48163+ 83 Linux
/dev/sda2 7 2000 16016805 83 Linux
/dev/sda3 2001 2500 4016250 83 Linux
/dev/sda4 2501 4200 13655250 5 Extended
/dev/sda5 2501 4200 13655218+ 83 Linux
Disk /dev/sdb: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 261 2096451 83 Linux
[root@sheng ~]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 3960348 2421252 1334672 65% /
/dev/sda5 13440516 164552 12593204 2% /home
/dev/sda1 46633 10516 33709 24% /boot
tmpfs 275812 0 275812 0% /dev/shm
/dev/sdb1 2063504 35880 1922804 2% /app
我重新分区后, / 目录的 /dev/sda2 下有16016805 blocks ,可是我是不是应该 格式化/dev/sda2 ,可是那样,我/ 下的数据就会被破坏的。
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 6 48163+ 83 Linux
/dev/sda2 7 2000 16016805 83 Linux
/dev/sda3 2001 2500 4016250 83 Linux
/dev/sda4 2501 4200 13655250 5 Extended
/dev/sda5 2501 4200 13655218+ 83 Linux
Disk /dev/sdb: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 261 2096451 83 Linux
[root@sheng ~]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 3960348 2421252 1334672 65% /
/dev/sda5 13440516 164552 12593204 2% /home
/dev/sda1 46633 10516 33709 24% /boot
tmpfs 275812 0 275812 0% /dev/shm
/dev/sdb1 2063504 35880 1922804 2% /app
我重新分区后, / 目录的 /dev/sda2 下有16016805 blocks ,可是我是不是应该 格式化/dev/sda2 ,可是那样,我/ 下的数据就会被破坏的。
|
先把/dev/sda2的数据备份,然后格式化,然后再把备份的数据拷贝回去。