Page 1 of 1

Problem with TOS 6 and system partition smaller than 8Gbyte

Posted: 27 Mar 2024, 18:10
by fabry68
Hello.
I had an issue trying to update TOS from last 5.x to 6.0beta, because system partition was too small (I had 2.9Gb, but 8Gbyte system partition is required).

I want to explain how I solved (now I am running 6 beta) without any data loss:

My system partition was only 2.6Gbyte; using ssh, i checked with "df -h"
Then, I have checked raid devices with: "cat /proc/mdstat"

/dev/md9 is a raid-1 and is the system (root) partition; raid menbers are all the 5 drives (sda2, sdb2, sdc2, sdd2, sde2)
/dev/md8 is a raid-1 and is the swap partition; raid menbers are all the 5 drives (sda3, sdb3, sdc3, sdd3, sde3)
/dev/md0 is a raid-5 and is the data partition (/dev/sda4, /dev/sdb4, /dev/sdc4, /dev/sdd4, /dev/sde4)

With fdisk -l I see that only /dev/sda has the second partition (sda2) of 7.6 Gbyte; the other 4 drives have a smaller partition.
But all the 5 drives have the 4th partition starting from the same sector, so there is free space on the 4 drives (sdb -- sde).

What I have done ?

For every drive, starting from sdb through sde:

mdadm --fail /dev/md8 /dev/sdb3
mdadm --remove /dev/md8 /dev/sdb3

mdadm --fail /dev/md9 /dev/sdb2
mdadm --remove /dev/md9 /dev/sdb2

fdisk /dev/sdb
delete partitions 2 and 3
create again partitions 2 and 3; on second partition use the first sector available, and use the same ending sector of the sda2 partition.
create partition 3 using first and last sector available.

Insert again devices on raid units:
mdadm --add /dev/md8 /dev/sdb3
mdadm --add /dev/md9 /dev/sdb2

Wait some seconds for rebuild, and then procede with sdc/sdd/sde

A the end:
mdadm --grow /dev/md9 --size=max
resize2fs /dev/md9

now your system partition is 7.6Gbyte and you can successfully install TOS 6 :)

Hope that can help someone.
Fabrizio

I had no data loss or similar, but you will choose to make a backup copy or not.