Resize filesystem after raid-grow doesn't work

  • Hi,
    My OMV was running with 5x3TB as raid5.
    Now I've added 2 more 3TB HD's and growed the raid.
    After that I tried to resize the ext4 filesystem, but got the following error:


    Code
    Failed to execute command 'sudo resize2fs /dev/md127': 
    Fehler #4000:
    exception 'OMVException' with message 'Failed to execute command 'sudo resize2fs /dev/md127': ' in /var/www/openmediavault/rpc/filesystemmgmt.inc:574
    Stack trace:
    #0 [internal function]: FileSystemMgmtRpc->resize(Array)
    #1 /usr/share/php/openmediavault/rpc.inc(265): call_user_func_array(Array, Array)
    #2 /usr/share/php/openmediavault/rpc.inc(98): OMVRpc::exec('FileSystemMgmt', 'resize', Array)
    #3 /var/www/openmediavault/rpc.php(44): OMVJsonRpcServer->handle()
    #4 {main}


    I also tried to execute the command in the ssh-shell, but got the following error:

    Code
    root@nas:~# sudo resize2fs /dev/md127
    resize2fs 1.41.12 (17-May-2010)
    resize2fs: Die Datei ist zu groß beim Bestimmen der Dateisystemgröße
    root@nas:~#


    Anyone got an idea how to gro my filesystem ?

    • Offizieller Beitrag

    You can't have a raid that large with ext4 and omv because the version ext user tools in OMV don't support over a 16tb filesystem. You could do one more drive but not two. If you switch to xfs, you can.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Hmmm, ok.
    Is there a way to switch to xfs without loosing data ?
    Or can I "shrink" the 10,72 tb ext4 filesystem to 8tb, so that I can create a 8tb xfs filesystem to move the data ?
    And after that delete the ext4 and grow the xfs.
    Or is it planed to support >16TB fs in future OMV-versions ?


    Thx


    Tschensie

  • You could shrink the ext4 filesystem, I would suggest to use gparted for it.


    OMV 0.6 should be able to support Filesystems larger than 16TB.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • Ich schreibe jetzt mal auf deutsch weiter, dann muss ich nicht so viel überlegen.


    Kann man kein 2. Dateisystem auf dem gleichen Raid anlegen ?
    Mein Raid ist jetzt 16,37 TB, das ext4-Dateisystem 10,74TB.
    Beim Versuch ein xfs-Dateisystem mit der Restkapazität des Raid anzulegen habe ich im Dialogfenster keine Auswahl für "Laufwerk".


    Wie soll ich jetzt anfangen meine Daten vom ext4 nach xfs zu migrieren ohne wieder alles auf externe Platten auszulagern ?


    Gruß


    Tschensie

  • Kein Problem, ich helf dir auch gerne auf Deutsch ;)


    OMV unterstützt über die GUI nur die Möglichkeit eine einzige Partition pro Festplatte anzulegen, deshalb erhältst du auch keine Auswahl unter "Laufwerk".
    -> Du kannst gparted oder parted magic verwenden um eine zweite Partition zu erstellen, ist einfacher als auf der Kommandozeile.


    Ist dein RAID denn randvoll? Ich würde es nicht unbedingt empfehlen jetzt eine zweite XFS Partition auf dem RAID zu erstellen und diese dann nach rüberschaufeln der ersten daten zu vergrößern bzw. das EXT4 zu verkleinen.
    Ich würde es eher so machen dass ich ein neues array erstelle mit 3 Platten und XFS, dort die daten draufschaufel und dann immer zwei platten die leer geworden sind (nach EXT4 shrink - ist das eigentlich stabil möglich? XFS kann eh kein shrink, darum hab ich mir über ein shrink noch nie gedanken gemacht...) usw.


    Möglich wären also verschiedene Varianten, welche du wählst musst du entscheiden.


    Gruß
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • Nein, das Raid ist nicht randvoll.
    Ursprünglich waren knapp 7 TB von den 10,72 TB belegt.
    Dann habe ich ja weitere 2 Platten dem Raid hinzugefügt, kann ja aber leider jetzt das ext4 nicht auf 16,37 TB vergrößern.
    Um ein 2. Array anzulegen müsste ich erst die Platten wieder aus dem Raid entfernen und eine weitere Platte kaufen.
    Daher jetzt mein Plan:


    1. ext4-Partition auf ca. 8 TB verkleinern
    2. xfs-Partition mit etwas mehr als 8 TB zusätzlich anlegen
    3. alle Daten von ext4 nach xfs verschieben
    4. ext4-Partition löschen
    5. xfs-Partition auf 16,37 TB vergrößern.


    Sollte doch hoffentlich so funktionieren ?


    Gruß


    Tschensie

  • Wenn knapp 7TB von 10,72TB belegt sind/waren kannst du doch noch eine zusätzlich aus dem RAID nehmen?


    Gruß
    David


    PS: Sollte so funktionieren...

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • Zitat von "davidh2k"

    Wenn knapp 7TB von 10,72TB belegt sind/waren kannst du doch noch eine zusätzlich aus dem RAID nehmen?


    Ja, aber dann wäre das neue Raid5 Array nur 6TB groß, und damit zu klein um alle Daten auf einen Rutsch zu verschieben.


    Aber ich denke, ich werde nächste Woche nach dem Urlaub noch eine weitere HD kaufen und dann ein 2. Raid mit 4 Platten einrichten.
    Wie entferne ich eigentlich die Platten wieder aus dem Raid-Verbund (nachdem ich das Filesystem mit GParted verkleinert habe) ?

  • Das kann ich dir nicht erklären aber Ryeco sollte das wissen.


    @Ryeco, how to remove the disks from the Raid array after shrinking the filesystem with gparted?


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

    • Offizieller Beitrag

    In this example, the raid 5 array (/dev/md127) of 5 drives (8 GB each) went to size = 23G and 4 drives. Skip first two steps if you used gparted.


    Code
    1.  fsck.ext4 -f /dev/md127
    2.  resize2fs /dev/md127 23G
    
    
    3.  mdadm /dev/md127 --grow --array-size=23G
    4.  mdadm /dev/md127 --grow --raid-devices=4 --backup-file=/tmp/backup
    
    
    5.  wait :)

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Ok, thx.
    I'll give it a try next week when I'm back from holliday.


    in your example, are you shure with the new arraysize of 23G ? Or did you mean 32G (4 Disks, each 8 GB) ?


    So, in my case mdadm --detail /dev/md127 shows the following:



    Resize will be done with gparted.
    So I have to do the following 3 steps:


    1. mdadm /dev/md127 --grow --array-size=8790795264 (3*used dev size 2930265088)
    2. mdadm /dev/md127 --grow --raid-devices=4 --backup-file=/tmp/backup
    3. wait :)


    Is this correct ?

    • Offizieller Beitrag

    I reduced the size by a little more than one drive. It started as a 5 by 8gb raid 5 array which would be 32 gb. If I want to take a drive away, the biggest it could be would be 24 gb. So, I set it a little smaller at 23 gb.


    Your steps look ok to me. I assume you won't have any problems removing 3 devices instead of 1 in my example.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Ok, shrinking worked.


    But I can't ceate a new array with the removed drives.
    After shrinking the array the 3 removed drives were shown as spare drives.
    so I removed them manually with mdadm --manage /dev/md127 --remove /dev/sdX


    After this the drives were not shown in the old array, but I also couldn't create a new array, because the removed drives are not shown in the gui.
    After a reboot the 3 removed drives are shown as spare drives again.
    How can I now remoe the drives from array 1 and create a second array ?

    • Offizieller Beitrag

    Those three drives need to be wiped and have the superblock removed.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • OK, wiping worked.
    But I can't shrink the ext4 with gparted.
    The partition editor says it can't find the fs-superblock, so some options are not avaiable (e.g. change fs-size).


    So I wanted to try your option:


    1. fsck.ext4 -f /dev/md127
    2. resize2fs /dev/md127 xxTB


    But OMV warns not to run fsck.ext4 because md127 is mounted and the fs would be damaged.
    I can't unmount the fs via gui.


    So, how can I shrink my ext4-partition ????

    • Offizieller Beitrag

    The following will umount the drive:


    umount /dev/md127

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!