Disk-Space-Utilization
伺服器磁碟已滿 - /dev/mapper/system-lv_dados
我試圖在我的伺服器上用 MySQL 替換 MariaDB。但是由於空間不足,它不會讓我完成任務。
pxl0hosp0048:/ # df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/system-lv_root 9.8G 9.6G 0 100% / devtmpfs 7.8G 0 7.8G 0% /dev tmpfs 7.8G 0 7.8G 0% /dev/shm tmpfs 7.8G 8.7M 7.8G 1% /run tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup /dev/sda1 478M 116M 334M 26% /boot /dev/mapper/system-lv_dados 276G 63M 276G 1% /dados /dev/mapper/system-lv_var 27G 330M 26G 2% /var /dev/mapper/system-lv_opt 4.8G 11M 4.6G 1% /opt /dev/mapper/system-lv_tmp 4.8G 11M 4.6G 1% /tmp 172.16.12.98:/dados/compartilhados 276G 63M 276G 1% /mnt/dados98
並且…
pxl0hosp0048:/ # fdisk -l Disk /dev/sdb: 300 GiB, 322122547200 bytes, 629145600 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: A9FE2C95-8600-4ACB-A15D-82418B3A2216 Device Start End Sectors Size Type /dev/sdb1 2048 629143551 629141504 300G Microsoft basic data Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 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: dos Disk identifier: 0x000f3ea7 Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 1028095 1026048 501M 83 Linux /dev/sda2 1028096 62914559 61886464 29.5G 8e Linux LVM Disk /dev/mapper/system-lv_root: 10 GiB, 10737418240 bytes, 20971520 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/system-swap: 2 GiB, 2147483648 bytes, 4194304 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/system-lv_opt: 5 GiB, 5368709120 bytes, 10485760 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/system-lv_tmp: 5 GiB, 5368709120 bytes, 10485760 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/system-lv_var: 27.5 GiB, 29532094464 bytes, 57679872 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/system-lv_dados: 280 GiB, 300647710720 bytes, 587202560 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
我怎樣才能在這裡釋放一些空間?歡迎任何幫助…
首先,我會
system
使用 , 查看卷組,看看卷組中vgs
是否還有更多空間system
。如果有 10-20G 將其添加到lv_root
邏輯卷 (lvextend
) 並調整文件系統的大小 (resize2fs if ext$$ 34 $$),因為 10G 對於 rootfs 來說有點小,即使安裝了其他卷也是如此。 如果沒有空間
vgs
,則解除安裝並調整另一個文件系統的大小,然後是下面的捲。然後將其分配給lv_root
.第三個也是最不喜歡的選項,刪除軟體包或通常嘗試在 rootfs 上查找不需要的程序/文件。