分区类型是GPT而不是LVM,文件系统是ext4.
现在,根分区占用1TB,主分区(raID / dev / md3上的sda4和sdb4)占用1.8TB,我想调整根分区的大小只需250GB,并将可用空间分配给主分区,所以它最终在md2中为250GB,在家中为2.5TB.
为此,我读到使用mdadm并调整数组卷的大小会实现这一点,但问题是它只调整了md2设备的大小,但sda3和sdb3中的可用空间未使用,我无法将其分配给sda4和sdb4所以我可以在md3中使用那个额外的空间,所以我有:
At the beginning:/dev/md2 with ext4,mounting / with quota of 1000GB sda3: 1000GB with ext4 using the full 1000GB sdb3: 1000GB with ext4 using the full 1000GB/dev/md3 with ext4,mounting /home with quota of 1800GB sda4: 1800GB with ext4 using the full 1800GB sdb4: 1800GB with ext4 using the full 1800GBI want:/dev/md2 with ext4,mounting / with quota of 250GB sda3: 250GB with ext4 using the full 250GB sdb3: 250GB with ext4 using the full 250GB/dev/md3 with ext4,mounting /home with quota of 2550GB sda4: 2550GB with ext4 using the full 2550GB sdb4: 2550GB with ext4 using the full 2550GBAnd ended up with:/dev/md2 with ext4,mounting / with quota of 250GB sda3: 1000GB with ext4 using only 250GB sdb3: 1000GB with ext4 using only 250GB/dev/md3 with ext4,mounting /home with quota of 1800GB sda4: 1800GB with ext4 using the full 1800GB sdb4: 1800GB with ext4 using the full 1800GB
为此,我按照本网站上的说明 *** 作:http://www.howtoforge.com/how-to-resize-raid-partitions-shrink-and-grow-software-raid
所以,我在救援模式下重新启动,并以root身份运行以下命令:
#configure everything to edit the raID devicesmodprobe linearmodprobe multipathmodprobe raID0modprobe raID1modprobe raID5modprobe raID6modprobe raID10cp /etc/mdadm/mdadm.conf /etc/mdadm/mdadm.conf_origmdadm --examine --scan >> /etc/mdadm/mdadm.confmdadm -A --scan### Shrink md2 from 1000GB to 250GB#check the raID diske2fsck -f /dev/md2#resize the file system from 1000GB to 245GB to leave room for the partition to shrink without issuesresize2fs /dev/md2 245G#resize the partition from 1000GB to 250GBmdadm --grow /dev/md2 --size=262144000#resize the file system to fit the whole 250GBresize2fs /dev/md2#do a disk check againe2fsck -f /dev/md2### Grow md3 to include md2 750GB free space#grow md3 to the max free spacemdadm --grow /dev/md3 --size=max#run a disk checke2fsck -f /dev/md3#resize the file systemresize2fs /dev/md3#check the file system againe2fsck -f /dev/md3
但事实证明,为了实际实现调整大小,我需要失败并从raID设备中删除分区,重新分区每个磁盘,添加回raID设备并同步.
所以我试过这个网站上的说明:
http://www.zedt.eu/tech/linux/resize-grow-mdadm-raid1-device/
并尝试从这个serverfault回答:
How to resize two RAID-1 partitions?
我已经尝试了所有这些,调整大小与分开,但没有,parted发送错误表明它不能识别分区的文件系统,我已经阅读其他地方分手不支持ext4但我没有小心,我已经使用resize2fs调整了文件系统的大小,所以我需要做的就是调整分区大小.
另外在一些样品上,我看到分开的打印输出到打印文件系统类型和所有,但是当我打印我的时,我没有得到任何这些信息:
sda和sdb磁盘输出:
Number Start End Size file system name Flags 5 1049kB 2097kB 1049kB bios_grub 1 2097kB 12.9GB 12.9GB raID 2 12.9GB 13.4GB 537MB raID 3 13.4GB 1113GB 1100GB raID 4 1113GB 3001GB 1888GB raID
正如您所看到的,我没有获得有关文件系统或名称的信息,如果我想调整分区3(sda3和sdb3)的大小,我会收到错误,同样我也无法增加分区4以适应可用空间.
任何人都可以帮助我如何调整我的磁盘大小,以便我的raID设备可以占用整个空间?
谢谢!
解决方法 使用这种方法我得到了很好的结果:http://www.howtoforge.com/how-to-resize-raid-partitions-shrink-and-grow-software-raid
问候
总结以上是内存溢出为你收集整理的linux – 调整RAID1磁盘阵列中的openSUSE 12.3 GPT ext4分区全部内容,希望文章能够帮你解决linux – 调整RAID1磁盘阵列中的openSUSE 12.3 GPT ext4分区所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)