Expand root system to use all of SD card

  • Hi


    Installed OMV 3 on banana pi using the official image from here.


    Used Etcher to burn the image to SD card.
    After first boot up it says need to wait up to 15 minutes and the system will reboot. Been waiting up to 1 hour still no reboot. However logged into the GUI and rebooted from there just to be on the safe side.


    Problem is the system SD card where OMV resides only has 2 small partitions
    Looking at other peoples posts everyone seems to get 3 partitions. I'm not bothered about that but i want the use most of the 8GB sd card for the omv system files so i used the guide here to expand the 2nd partiton to get this shown by "fdisk -l"


    /dev/mmcblk0p1 2048 133119 131072 64M 83 Linux
    /dev/mmcblk0p2 133120 13000000 12866881 6.1G 83 Linux


    Only part i couldn't get working was entering after a reboot the command
    "sudo resize2fs /dev/mmcblk0p2" it came up with error
    " Couldn't find valid filesystem superblock."


    Is that because the filesystem is showing as btrfs format in the gui? Terminal ssh shows the above size but in the GUI it only shows 863Mb of which shows 95% usage already!
    Also "df -h" shows
    "/dev/mmcblk0p2 863M 683M 41M 95% /"


    How can I Expand the filesystem to use all the space allocated to the second partition?
    Also on a side question, how do you change the terminal ssh password from the default openmediavault?

  • card for the omv system files so i used the guide here to expand the 2nd partiton to get this shown by "fdisk -l"

    Please never follow Raspberry Pi tutorials if you're not trapped in the Raspberry world (where many limitations exist that not apply to any other SBC around).


    Please provide output from 'armbianmonitor -u' first so I can tell what went wrong, the fix then later is easy as long as you did not destroyed partitioning already.


    Password changes as usual: 'passwd' as executed by the user in question.

  • I try not to use raspberry pi guides but I couldn't find any guides for the banana pi.


    After about 5 succesful reboots I can't now login in via the GUI nor SSH. In fact it looks like the banana pi doesn't even have an ip address. I usually search for available devices on my network by logging into the router & looking at the routing table. Also in windows my Eset smart security shows devices on my network but nothing shows for the banana now. The red power light & the blue network light still come on but no ip address is visible & hence cannot connect to omv.


    Going to reflash the SD card & start from scratch again.

  • Hi
    What banana pi do you have

    The basic first Banana Pi, NOT pro or m2 m3 etc.
    I have been running it for the last 2 years with omv2 and a single disk which was running out of space so wanted to install a bigger harddrive and upgrade the operating system to omv3 while i was at it.

  • I have just re-downloaded reflashed the sd card with etcher. How long should i wait for it to do its auto reboots on first startup? I never see it rebooting itself so should 30 minutes be enough time?


    Also should I reboot it manually from the gui or shutdown then press the power button to wake it again?

  • Hi
    You still have the old img. by Bananian das is no longer developing.
    I would like the new img. from OMV or you take Armbian and install OMV itself.

    I used then img on this page, the one at the very bottom. I thought this was a fairly recent img dated 1st September 2017. it has Armbian 4.12.9 & OMV 3.0.87?


    I am looking for stability rather than nightly builds.


  • Please provide output from 'armbianmonitor -u' first so I can tell what went wrong, the fix then later is easy as long as you did not destroyed partitioning already.


    Password changes as usual: 'passwd' as executed by the user in question.

    /var/log/armhwinfo.log has been uploaded to http://sprunge.us/BiEK
    Please post the URL in the Armbian forum where you've been asked for.

  • /var/log/armhwinfo.log has been uploaded to sprunge.us/BiEK

    Thank you. This is the culprit:


    Code
    179        0    7598080 mmcblk0

    Your SD card is 'small' (just 15196160 sectors while the current resize rule assumes at least 15500000 available -- that's 7.25 GB vs. 7.3GB). We discussed this recently and increased the minimum SD card size from 4GB (~3.6 in reality) to 8GB (~7.3 in reality).


    I've no idea how your SD card manages to show just 7.25GB real capacity (maybe shrinked due to defective sectors?) and I would replace it **NOW** anyway or only use it for the bootloader and transfer the installation to a connected HDD using the contained nand-sata-install tool.


    Reasons: https://github.com/armbian/doc…igration_from_Bananian.md


    In case you want to continue with this card it's just deleting one single file (containing the resize rule) and rebooting: Building OMV automatically for a bunch of different ARM dev boards

  • Tried via SSH: rm /root/.rootfs_resize && reboot. Still no change as system partition only shows only 863Mb big. I havent even setup my nas disk and shares yet as Im scared i will run out of space.


  • Solved.


    I used a new 16gb microSD card and did a fresh install of the same fresh img. Now its showing the 2nd partition as 7.33gb. Strange how it doesn't use up 16GB or thereabouts.


    Thanks Tkaiser for all your time and help.

  • Now its showing the 2nd partition as 7.33gb. Strange how it doesn't use up 16GB or thereabouts.

    That's the resize rule defined in /root/.rootfs_resize -- a 3rd partition should be there with the remaining capacity you can use now for data after you created a filesystem manually on it as the readme.txt explains.

  • Output from 'armbianmonitor -u' first please :)


    http://sprunge.us/ZhJP


    Ok i see it now in the readme.txt


    The readme.txt says
    "The last partition for data use will be automatically resized on
    first boot to use all available SD card space. Though you need to
    put your filesystem of choice on it (eg mkfs.btrfs /dev/mmcblk0p3)"


    I implemented mkfs.btrfs /dev/mmcblk0p3 and can see the drive in the GUI under the storage/file systems section. However after I mount it and click on the Create button, nothing comes up under the "device - select a device" section so I cant create a file system on it.

  • Well, what about mmcblk0p3? This is the 3rd partition you were asking for. Has been created and waits for you creating your filesystem of choice on it. Afterwards it's accessible from the web UI and can be used for data (since OMV doesn't allow to use the OS partition / rootfs for this). So everything as expected, simply choose a filesystem as the readme explains.

  • Well, what about mmcblk0p3? This is the 3rd partition you were asking for. Has been created and waits for you creating your filesystem of choice on it. Afterwards it's accessible from the web UI and can be used for data (since OMV doesn't allow to use the OS partition / rootfs for this). So everything as expected, simply choose a filesystem as the readme explains.

    Ok i see it now in the readme.txt


    The readme.txt says
    "The last partition for data use will be automatically resized on
    first boot to use all available SD card space. Though you need to
    put your filesystem of choice on it (eg mkfs.btrfs /dev/mmcblk0p3)"


    I implemented mkfs.btrfs /dev/mmcblk0p3 and can see the drive in the GUI under the storage/file systems section. However after I mount it and click on the Create button, nothing comes up under the "device - select a device" section so I cant create a file system on it.

Jetzt mitmachen!

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