我目前正在使用Centos 7,并且正在尝试释放其中一个磁盘上的一些空间,以便可以在Ubuntu的侧面安装它(双引导)。我有一个2TB的磁盘,容量不足一半。这不是主磁盘,而是全部备份。当我启动到Centos时,磁盘是/dev/sdc
,并且只是一个分区(后面没有数字/dev/sdc
)。我创建了一个带有Ubuntu 18.04的可启动USB,从USB启动,该磁盘在该系统中被识别为/dev/sda
。我跑了,然后告诉它将分区缩小约400GB:
在我看来,这是正确的,因此我继续进行更改。它完成没有问题。然而,当有人做过仍有只有1分,与未分配空间里面的它,而不是分区本身萎缩。甚至还有一个警报图标,当我单击它时,它告诉我分区中有390.63GB,询问我是否要扩展它:
我知道,如果我在其他地方有足够的磁盘空间,可以复制数据并从头开始对该驱动器重新分区。但是,我实际上没有足够的空间来执行此操作,并且机箱内现在只有5个驱动器,事情非常紧张。有什么方法可以将驱动器拆分为多个分区,而无需执行该路由?
Not sure if this is relevant, but when I was still booted into Ubuntu the first time I did this I ran Check on it from gparted, and when it did that it automatically resized it back. I don't know if that means that it detected the wrong size as being an actual error, or if it is normal for gparted to just make use of extra space like that when you run check. I re-ran the resizing operation again before booting back into CentOS and it still currently looks like the second screenshot, and df
says that the partition is 1.5TB with 882GB used and 494G available.
When I am booted into Centos the disk is
/dev/sdc
, and is just a single partition (no numbers after/dev/sdc
).
/dev/sdc
不是分区,而是磁盘本身未分区,您直接在磁盘上具有ext4文件系统而没有分区表,因此无法将分区添加到磁盘。
通过缩小驱动器,您实际上只缩小了文件系统,这就是为什么看到其中的可用空间的原因。
我知道,如果我在其他地方有足够的磁盘空间,可以复制数据并从头开始对该驱动器重新分区
不幸的是,这是您现在只能做的事情,不能将分区表添加到磁盘,因为没有足够的空间,您需要向前移动文件系统几个扇区来为pt腾出空间。从理论上讲可能但非常复杂,并且丢失数据的风险很高。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句