Can I reclaim the swap partition?

  • I notice OMV created this partition on the SSD it is installed on:



    Code
    Device     Boot     Start       End   Sectors  Size Id Type
    /dev/sda1  *         2048 191244287 191242240 91.2G 83 Linux
    /dev/sda2       191246334 195371007   4124674    2G  5 Extended
    /dev/sda5       191246336 195371007   4124672    2G 82 Linux swap / Solaris

    Since I am using the FlashMemory plugin that comments out the swap partition from /etc/fstab, how can I get that 2G back as I would like it to use for the backup plugin?

  • Yes, it is possible to remove the swap partition. I did so using GParted, but I believe that you can do directly from the terminal while booted into OMV. I'm not sure how to though. Perhaps @ryecoaaron or @votdev would know?

    Did you have to manually change /etc/fstab to mount that new partition that replaced the swap one or did OMV automatically changed the /etc/fstab after detecting it?

  • OK, I used fdisk to delete the partitions sda5 and sda2.


    Created a new sda2 partition:


    Code
    Device     Boot     Start       End   Sectors  Size Id Type
    /dev/sda1  *         2048 191244287 191242240 91.2G 83 Linux
    /dev/sda2       191246336 195371007   4124672    2G 83 Linux


    Ran:

    Code
    mkfs.ext4 /dev/sda2


    Edited /etc/fstab (SEE POST #8 instead of this last step:(
    /dev/sda2 /backup ext4 defaults,noatime 0 1

  • Did you have to manually change /etc/fstab to mount that new partition that replaced the swap one or did OMV automatically changed the /etc/fstab after detecting it?

    After I added the new partition, it was available in the "File Systems" list in OMV. I believe you would want to add the new partition to fstab this way because if you don't, I'm pretty sure that your change will get overwritten by OMV if you change settings in your control panel later.

  • I believe OMV has their own section in /etc/fstab that they change, anything outside these shouldn't be touch:


    Code
    # >>> [openmediavault]
    # <<< [openmediavault]


    The issue I am now having is OMV ui wouldn't let me make a share folder on this partition, like it is trying to protect the same physical device the OS is on.

  • I believe OMV has their own section in /etc/fstab that they change, anything outside these shouldn't be touch:


    Code
    # >>> [openmediavault]
    # <<< [openmediavault]

    The issue I am now having is OMV ui wouldn't let me make a share folder on this partition, like it is trying to protect the same physical device the OS is on.

    I just looked at the fstab file and I see what you mean about that. To make it possible to use the partition to make a shared folder, you may have to add the partition using the method I provided. I can tell you that OMV does not care about not allowing you to use disk partitions that reside on the same disk as the OS. I have a partition on my boot disk that I have a shared folder set up in, so it is possible.

  • I just looked at the fstab file and I see what you mean about that. To make it possible to use the partition to make a shared folder, you may have to add the partition using the method I provided. I can tell you that OMV does not care about not allowing you to use disk partitions that reside on the same disk as the OS. I have a partition on my boot disk that I have a shared folder set up in, so it is possible.

    Yes, letting OMV add it to its "area" of fstab made it available to create a shared folder which then the Backup plugin was able to use.



    Code
    # >>> [openmediavault]
    /dev/disk/by-id/ata-<id of disk>-part2 /srv/dev-disk-by-id-ata-<id of disk>-part2 ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,discard,acl 0 2
    # <<< [openmediavault]


    Thanks for the encouragement and help in resolving this.

Jetzt mitmachen!

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