我将 Debian 7 安装到一个 1 TB 的驱动器上,让 Debian 自动设置分区,还选择了 LVM,然后安装了 OwnCLoud。一切都工作正常,直到我收到消息根磁盘空间不足,只有 35mb 空闲,我无法再访问云存储,另外 Apache2 必须重新启动吗?它自动启动。重启Apache后可以访问云端,但是云端无法访问数据库?肯定是由于空间限制,程序无法运行。我怎样才能增加这个音量?我厌倦了使用 Gpart live,但无法增加任何卷> 这是我的 fdisk -l 清单!
Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 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 identifier: 0x8de4adf7
Device Boot Start End Blocks Id System
/dev/sda1 63 2930272064 1465136001 7 HPFS/NTFS/exFAT
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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 identifier: 0x00048b84
Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 499711 248832 83 Linux
/dev/sdb2 501758 1953523711 976510977 5 Extended
/dev/sdb5 501760 1953523711 976510976 8e Linux LVM
Disk /dev/mapper/debian-root: 348 MB, 348127232 bytes
255 heads, 63 sectors/track, 42 cylinders, total 679936 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 identifier: 0x00000000
Disk /dev/mapper/debian-root doesn't contain a valid partition table
Disk /dev/mapper/debian-swap_1: 4273 MB, 4273995776 bytes
255 heads, 63 sectors/track, 519 cylinders, total 8347648 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 identifier: 0x00000000
Disk /dev/mapper/debian-swap_1 doesn't contain a valid partition table
Disk /dev/mapper/debian-usr: 8996 MB, 8996782080 bytes
255 heads, 63 sectors/track, 1093 cylinders, total 17571840 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 identifier: 0x00000000
Disk /dev/mapper/debian-usr doesn't contain a valid partition table
Disk /dev/mapper/debian-var: 2998 MB, 2998927360 bytes
255 heads, 63 sectors/track, 364 cylinders, total 5857280 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 identifier: 0x00000000
Disk /dev/mapper/debian-var doesn't contain a valid partition table
Disk /dev/mapper/debian-tmp: 398 MB, 398458880 bytes
255 heads, 63 sectors/track, 48 cylinders, total 778240 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 identifier: 0x00000000
Disk /dev/mapper/debian-tmp doesn't contain a valid partition table
Disk /dev/mapper/debian-home: 982.9 GB, 982926753792 bytes
255 heads, 63 sectors/track, 119500 cylinders, total 1919778816 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 identifier: 0x00000000
Disk /dev/mapper/debian-home doesn't contain a valid partition table
root@debian:/home/dmsigala#
编辑
pvscan
和的输出df
:
root@debian:/home/dmsigala# pvscan
PV /dev/sdb5 VG debian lvm2 [931.27 GiB / 0 free]
Total: 1 [931.27 GiB] / in use: 1 [931.27 GiB] / in no VG: 0 [0 ]
ot@debian:/home/dmsigala# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 322M 294M 11M 97% /
/dev/mapper/debian-root 322M 294M 11M 97% /
/dev/sdb1 228M 17M 199M 8% /boot
答案1
您应该减小其他卷之一的大小。可能有很多可用空间debian/home
;您可以将其从 982.9 GB 减少到例如 950 GiB,以获得一些可用空间以实现灵活性。减少文件系统后(对于resize2fs
ext3/ext4),您可以减少 LV:
lvresize --size 950G debian/home
然后你可以增加根LV:
lvresize --size 1G debian/root
最后一步是调整根卷文件系统的大小(仅在引导另一个系统后才有可能)。