Raspberry Pi 2 - OwnCloud - How to create another partition on Micro SD card?

    • OMV 1.0
    • Resolved

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Raspberry Pi 2 - OwnCloud - How to create another partition on Micro SD card?

      Hello,

      I downloaded and installed "omv_1.17_rpi_rpi2.img" on a Raspberry Pi 2 with Owncloud plugin. Installations were ok.

      However, I saw that only a part of the size of the micro SD card is used. So, I would like to use the free space to store Owncloud data, etc.

      On "http://sourceforge.net/projects/openmediavault/files/" page, it is mentionned that we "Can create another partition on SD card or use usb hard drive for data storage".
      I tried to find information on the forum but nothing on it (unless I am mistaken)

      I have tried the raspi-config to expand the partition 2 but it did not work because "root partition is not the last one" (if I remenber well. Maybe due to the SWAP partition?).
      Then, I tried to manually rezise partitions (using the below link) but it did not work:
      elinux.org/RPi_Resize_Flash_Pa…e_SD_card_on_Raspberry_Pi

      Is there a simple way to create this new partition and make it accessible for Owncloud? Or should I tried the following method?
      elinux.org/RPi_Easy_SD_Card_Se…partitions_.28Optional.29

      Regards
    • It is good that raspi_config didn't work. Expanding the OS partition will not let you use it for plugins. Boot gparted_live on the system you wrote the sd card with. Add a 4th partition at the beginning of the free space. You will then be able to mount that new partition in the Filesystems tab and use it for plugins.
      omv 4.0.14 arrakis | 64 bit | 4.13 backports kernel | omvextrasorg 4.1.1
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • Hello,

      Thanks for your answers.

      Actually, I succeeded to create a partition using this method:
      elinux.org/RPi_Easy_SD_Card_Se…partitions_.28Optional.29

      In File Systems, following information are displayed:

      DeviceLabelFile System
      CapacityAvailableUsedMountedReferencedStatus

      /dev/mmcblk0p1
      Bootvfat
      55.95 MiB

      36.99 MiB

      18.95 MiD
      YesNoOnline

      /dev/mmcblk0p2
      omvext4
      3.18 GiB

      1.71 GiB

      1.31 GiD
      YesYesOnline

      /dev/mmcblk0p3
      rrdcacheext4
      119.96 MiB

      109.48 MiB

      1.51 MiD
      YesNoOnline

      /dev/mmcblk0p4
      dataext4
      25.71 GiB

      24.34 GiB

      43.93 MiD
      YesNoOnline


      However, the volume cannot be selected when trying to add a Shared folder (only 'rrdcache' is available in the list).

      Any reason why this volume cannot be selected?

      PS: I also use information of the link below for comparison to what I see on mine
      en.jose-crispim.pt/artigos/arm…penmediavault.html#p2_3_3

      Regards,
    • That is the problem with following some instructions on other sites that aren't meant for OMV. I assume you added the entry to fstab manually like the elinux site instructed? If so, you need to remove the fstab entry, unmount that partition (if it is mounted), and mount that partition using the web interface.
      omv 4.0.14 arrakis | 64 bit | 4.13 backports kernel | omvextrasorg 4.1.1
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • Hi,

      Thanks for your answer.

      I would prefer to say that is the problem when this cannot be done directly via the GUI directly for lambda users. Indeeed, this should be more user-friendly instead of using Gparted (even if it is a very good tool).
      I have only tried to find information, and I guess you would agree that it is better than asking without trying something by ourself.

      Anyway, I tried to mount the partition /dev/mmcblk0p4 via the web interface before using

      Source Code

      1. nano /etc/fstab


      However, the partition was not mounted. A message was displayed (sorry, I did not keep a record of it).

      Maybe I can do another fresh install to get this message again.
    • coucoun wrote:

      Hi,
      I would prefer to say that is the problem when this cannot be done directly via the GUI directly for lambda users. Indeeed, this should be more user-friendly instead of using Gparted (even if it is a very good tool).

      Lambda users?? The reason it cannot be done via the GUI is that using the OS drive/media for data is not supported by core OMV. You can mount the partition if it exists and it works. The rrdcache partition is just to eliminate logging of errors that happen only when no data volume is found. You could just expand that partition instead of creating a new one. I suppose I could add a boot script that expands that partition to fill the rest of the media...

      coucoun wrote:

      I have only tried to find information, and I guess you would agree that it is better than asking without trying something by ourself.

      That depends on how much you value your setup :)


      I would remove the partition 4 and just expand partition 3 instead of reinstalling. Partition 3 is already mounted in the web interface.
      omv 4.0.14 arrakis | 64 bit | 4.13 backports kernel | omvextrasorg 4.1.1
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • Go idea for the boot script to expand the partition to fill the rest of the MicroSD card.

      After doing the following command via SSH:

      Source Code

      1. sudo su -
      2. apt-get install parted
      3. parted /dev/mmcblk0
      4. unit s
      5. print
      6. mkpart primary 7290880 62333951
      7. print
      8. quit
      9. mkfs.ext4 /dev/mmcblk0p4
      10. e2label /dev/mmcblk0p4 data
      Display All


      Then, I was able to mount the partition and create a Shared folder :)

      Thanks for your help
    • I wrote the script. Now, I just need to add it to the images. People may not like the few minutes it takes to resize though.
      omv 4.0.14 arrakis | 64 bit | 4.13 backports kernel | omvextrasorg 4.1.1
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • hi guys,

      i would like also make some new partition that was not used on my SD card, i think there will be available 3-4GB...

      here is some info about my file systems:

      Source Code

      1. root@raspberrypi:~# df -h
      2. Filesystem Size Used Avail Use% Mounted on
      3. rootfs 3.2G 1.5G 1.6G 50% /
      4. /dev/root 3.2G 1.5G 1.6G 50% /
      5. devtmpfs 484M 0 484M 0% /dev
      6. tmpfs 98M 820K 97M 1% /run
      7. tmpfs 5.0M 0 5.0M 0% /run/lock
      8. tmpfs 195M 0 195M 0% /run/shm
      9. /dev/mmcblk0p1 56M 19M 37M 34% /boot
      10. /dev/mmcblk0p3 120M 1.6M 110M 2% /media/fa36508a-b3c4-4499-b30a-711dd5994225
      11. /dev/sda1 29G 18G 9.2G 67% /media/137eb0e6-afd1-44db-a7c2-95e8f6ec3b51
      12. /dev/sdb1 1.8T 332G 1.5T 19% /media/ec9a4e2e-d53c-4bed-bb61-1d97a044595f
      13. tmpfs 488M 41M 448M 9% /var/cache
      14. tmpfs 488M 4.6M 483M 1% /var/log
      15. tmpfs 488M 0 488M 0% /var/tmp
      16. tmpfs 488M 496K 487M 1% /var/lib/openmediavault/rrd
      17. tmpfs 488M 1.5M 486M 1% /var/spool
      18. tmpfs 488M 26M 462M 6% /var/lib/rrdcached
      19. tmpfs 488M 8.0K 488M 1% /var/lib/monit
      20. tmpfs 488M 8.0K 488M 1% /var/lib/php5
      21. root@raspberrypi:~# parted -l
      22. Model: Kingston DataTraveler 3.0 (scsi)
      23. Disk /dev/sda: 31.0GB
      24. Sector size (logical/physical): 512B/512B
      25. Partition Table: msdos
      26. Number Start End Size Type File system Flags
      27. 1 1049kB 31.0GB 31.0GB primary ext4
      28. Model: Samsung D3 Station (scsi)
      29. Disk /dev/sdb: 2000GB
      30. Sector size (logical/physical): 512B/512B
      31. Partition Table: gpt
      32. Number Start End Size File system Name Flags
      33. 1 1049kB 2000GB 2000GB ext4
      34. Model: SD SU08G (sd/mmc)
      35. Disk /dev/mmcblk0: 7948MB
      36. Sector size (logical/physical): 512B/512B
      37. Partition Table: msdos
      38. Number Start End Size Type File system Flags
      39. 1 4194kB 62.9MB 58.7MB primary fat16 lba
      40. 2 62.9MB 3599MB 3536MB primary ext4
      41. 3 3599MB 3733MB 134MB primary ext4
      Display All


      so i would like use the unalocated space for mysql, owncloud...

      should i use the mentioned script on running system? or use the gparted? when use gparted, how to boot there on RPi2?

      also how to disable rrdcache partition, do i need it on raspberry?

      thanks for help
      omv 2.2 on lenovo thinkpad R61 :thumbup:
    • You don't need to disable the rrdcache partition. It is just there so a data drive exists and the log doesn't fill up with error messages. You can just expand it. The next image will do that for you at first boot.
      omv 4.0.14 arrakis | 64 bit | 4.13 backports kernel | omvextrasorg 4.1.1
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • i ment something like trough terminal or putty directly on RPi2...

      but its done, SD card resized on another computer.

      thanks for help :)

      PS: i will create a new thread this weekend about my findnings about OMV running on raspberry pi 2, some OMV features not working like all of the graphs, from cpu to memory and disk usages, I/O info ...
      omv 2.2 on lenovo thinkpad R61 :thumbup: