quantum / esos

An open source, high performance, block-level storage platform.
http://www.esos-project.com/
Other
287 stars 58 forks source link

ESOS requires at least 3.5 GB of usable RAM #276

Closed bobafetthotmail closed 2 years ago

bobafetthotmail commented 2 years ago

So, I've been trying to repurpose some old hardware and long story short I only have 2GB of RAM on this system.

I'm not sure why ESOS requires so much RAM to function, I can boot Debian/OpenMediaVault or OpenWRT and do RAID/LVM/iSCSi on that with this hardware and runs fine with web interface and all.

I've found where this check is done and I can easily remove it and rebuild the image https://github.com/quantum/esos/blob/3.x.x/misc/initramfs_init#L85

From a very quick look it seems that this is only required for the 3 "brave" in-place upgrading procedure I can upgrade using other methods, is there anything else that breaks with 2GB of RAM?

msmith626 commented 2 years ago

Yeah, you can try making it smaller. It's big because by default the root image is extracted into a tmpfs image so it has to hold the whole data set. There is a new "esos_persist" boot option you can use which does NOT extract it to tmpfs, and instead mounts the squashfs image (like a "live" Linux CD/DVD). Maybe lower it in the initramfs file, build, and then use the "esos_persist" kernel parameter in GRUB.

On Wed, Feb 16, 2022 at 7:18 PM Alberto Bursi @.***> wrote:

So, I've been trying to repurpose some old hardware and long story short I only have 2GB of RAM on this system.

I'm not sure why ESOS requires so much RAM to function, I can boot Debian/OpenMediaVault or OpenWRT and do RAID/LVM/iSCSi on that with this hardware and runs fine with web interface and all.

I've found where this check is done and I can easily remove it and rebuild the image https://github.com/quantum/esos/blob/3.x.x/misc/initramfs_init#L85

From a very quick look it seems that this is only required for the 3 "brave" in-place upgrading procedure I can upgrade using other methods, is there anything else?

— Reply to this email directly, view it on GitHub https://github.com/quantum/esos/issues/276, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMQXXWWKH732KWDGDDJKZLU3Q5DVANCNFSM5OTEQ32A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

bobafetthotmail commented 2 years ago

ok thanks. I did dthat and and I've rebuilt from source a master snapshot.

Now it's booting correctly, and if I check the amount of RAM actually used now it's around 100MB which is ok.

for the sake of helping others that need to do this change for themselves, this is what I did:

I edited the initramfs_init file to not check RAM size if esos_persist kernel parameter was used

# Make sure we have enough physical memory
if [ `cat /proc/meminfo | grep MemTotal | awk '{print $2}'` -lt 3500000 ]; then
    echo "ESOS requires at least 3.5 GB of usable RAM!"
#   rescue_shell
fi

added esos_persist in the grub.cfg file

source /PRIMARY-version
menuentry "Primary   -> @@short_prod@@ ${slot_ver} <Production>" {
    linux /PRIMARY-bzImage-esos.prod slot=PRIMARY \
    crashkernel=0M-2G:128M,2G-6G:256M,6G-8G:512M,8G-:768M \
    consoleblank=600 console=tty0 raid=noautodetect noiswmd nodmraid esos_persist
    initrd /PRIMARY-initramfs.cpio.gz
}
if [ -e "/PRIMARY-bzImage-esos.debug" ]; then
    menuentry "Primary   -> @@short_prod@@ ${slot_ver} <Debug>" {
        linux /PRIMARY-bzImage-esos.debug slot=PRIMARY \
        crashkernel=0M-2G:128M,2G-6G:256M,6G-8G:512M,8G-:768M \
        consoleblank=600 console=tty0 raid=noautodetect noiswmd nodmraid esos_persist\
        kgdboc=kms,kbd
        initrd /PRIMARY-initramfs.cpio.gz
    }
fi

if [ -e "/SECONDARY-version" ]; then
    source /SECONDARY-version
    menuentry "Secondary -> @@short_prod@@ ${slot_ver} <Production>" {
        linux /SECONDARY-bzImage-esos.prod slot=SECONDARY \
        crashkernel=0M-2G:128M,2G-6G:256M,6G-8G:512M,8G-:768M \
        consoleblank=600 console=tty0 raid=noautodetect noiswmd nodmraid esos_persist
        initrd /SECONDARY-initramfs.cpio.gz
    }
    if [ -e "/SECONDARY-bzImage-esos.debug" ]; then
        menuentry "Secondary -> @@short_prod@@ ${slot_ver} <Debug>" {
            linux /SECONDARY-bzImage-esos.debug slot=SECONDARY \
            crashkernel=0M-2G:128M,2G-6G:256M,6G-8G:512M,8G-:768M \
            consoleblank=600 console=tty0 raid=noautodetect noiswmd nodmraid esos_persist\
            kgdboc=kms,kbd
            initrd /SECONDARY-initramfs.cpio.gz
        }
    fi
fi
bobafetthotmail commented 2 years ago

this was fixed in master with https://github.com/quantum/esos/commit/e4d7852a7b91e7775c1330d9b107b04992a70cb7

msmith626 commented 2 years ago

Thank you!

On Mon, Mar 7, 2022 at 4:41 PM Alberto Bursi @.***> wrote:

this was fixed in master with e4d7852 https://github.com/quantum/esos/commit/e4d7852a7b91e7775c1330d9b107b04992a70cb7

— Reply to this email directly, view it on GitHub https://github.com/quantum/esos/issues/276#issuecomment-1061165065, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMQXXWHC7WT3QVUJVC534DU6ZZYTANCNFSM5OTEQ32A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>