如何将磁盘重新分配给文件系统?

如何将磁盘重新分配给文件系统?

我用设备搞乱了目录的安装:

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。

相关内容