我通过parted远程ssh'd并调整了我的主分区大小(重新启动并更新了/ etc / fstab)以增加空间。
为什么我的主要ext4分区不能反映可用空间?
~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 985M 0 985M 0% /dev
tmpfs 200M 3.5M 197M 2% /run
/dev/sda1 7.8G 7.5G 0 100% /
tmpfs 999M 0 999M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 999M 0 999M 0% /sys/fs/cgroup
tmpfs 200M 0 200M 0% /run/user/0
~# fdisk -l
Disk /dev/sda: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x010920b9
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 41943039 41940992 20G 83 Linux
有什么想法吗?我一定忘记了一些非常简单的事情。
答案 0 :(得分:0)
执行public static T GetPage<T>(Type pageInterface) where T : Helpers
{
// maybe you need to scan different assemblies, depending on your usecase
var allTypes = Assembly.GetExecutingAssembly().GetTypes();
foreach (var pageType in allTypes)
{
if (pageInterface.IsAssignableFrom(pageType) && pageType.Name.Contains(String.Format(".%1$s.", GetTargetPlatform())))
{
return (T)Activator.CreateInstance(pageType);
}
}
return (T)Activator.CreateInstance(pageInterface);
}
,然后执行parted
。这将打印系统的可用空间。