![如何将磁盘重新分配给文件系统?](https://linux22.com/image/117299/%E5%A6%82%E4%BD%95%E5%B0%86%E7%A3%81%E7%9B%98%E9%87%8D%E6%96%B0%E5%88%86%E9%85%8D%E7%BB%99%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F%EF%BC%9F.png)
我用设备搞乱了目录的安装:
lorancechen@schan:~$ sudo df -hl
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 790M 9.0M 781M 2% /run
/dev/mapper/schan--vg-root 226G 6.6G 208G 4% /
tmpfs 3.9G 4.0K 3.9G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda2 473M 463M 0 100% /boot
/dev/sda1 511M 3.4M 508M 1% /boot/efi
tmpfs 100K 0 100K 0% /run/lxcfs/controllers
tmpfs 790M 0 790M 0% /run/user/1000
/home/lorancechen/.Private 226G 6.6G 208G 4% /home/lorancechen
显然,对于家庭用户来说226G。我不知道这意味着什么/home/lorancechen/.Private
?
另外,sudo fdisk -l
显示Linux LVM使用237.5G:
lorancechen@schan:/boot/grub$ sudo fdisk -l
Disk /dev/sda: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B9F1D7BF-5BE5-4457-8589-B7BA73C5298E
Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 2050047 999424 488M Linux filesystem
/dev/sda3 2050048 500117503 498067456 237.5G Linux LVM
Disk /dev/mapper/schan--vg-root: 229.6 GiB, 246503440384 bytes, 481452032 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/schan--vg-swap_1: 7.9 GiB, 8489271296 bytes, 16580608 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/cryptswap1: 7.9 GiB, 8488747008 bytes, 16579584 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
我确信我的文件系统有问题,现在我无法使用sudo apt-get --fix-broken install
安装任何东西,因为
cannot copy extracted data for './boot/vmlinuz-4.4.0-93-generic' to
'/boot/vmlinuz-4.4.0-93-generic.dpkg-new':
failed to write (No space left on device)
磁盘分配有什么问题?如何重新分配磁盘?
谢谢
答案1
/home/lorancechen/.Private
对我来说看起来像是文件加密。看看输出
cat /proc/mounts | grep lorancechen
您的问题apt-get
是由于您的/boot
分区已满。某些 Linux 发行版不会删除旧内核。因此,您必须为此安装一些脚本或不时手动执行。转到/boot
并删除一些旧的内核和 initrd。