Page 1 of 1

Embedded install USB with 32GB RAM

Posted: 27 Apr 2017 18:56
by machasm
Hi all,
I am new to NAS4Free but am enjoying playing around with it and trying some installs out.
You can see in my sig what my setup looks like.
I have been thinking about doing an embedded install onto the USB stick and then having an identical USB stick as a failover.
The problem is when running the setup, due to the largish amount of RAM I have the installer is trying to allocate 32GB of swap on the USB stick and the USB sticks that I have bought are both 32GB so not large enough for this purpose.
Is there a better way of doing this?
I could, of course, do an embedded install onto the 2.5" drive and run a mirror on the other but was hoping I could use the sticks to make things a little easier to fire up on another machine in case of emergency.
Your thoughts?

Re: Embedded install USB with 32GB RAM

Posted: 27 Apr 2017 19:48
by raulfg3
For your pourpouse, better to do a new ZFSRoot install. last and new option in the install menu

You can choose to do a mirror install ( eg: using two identical USB ) and still you can upgrade from WebGUI like a embeded install.

see screen captures: viewtopic.php?p=75523#p75523


Of course you can select in the install menu the size of swap and reduce to 12GB that is more rasonable.

I have it installed on 2 production machines, and I'm very happy & secure.

Re: Embedded install USB with 32GB RAM

Posted: 27 Apr 2017 21:31
by machasm
Thank you for that, however after running through the install that you pointed to I get an invalid partition table message when the machine next tries to boot.
This is what I have done
1) Installed LiveUSB image to one of the USB stick
2) Entered machine BIOS and set boot to USB stick
3) connected both USB sticks
4) Powered on machine then booted to Live USB stick
5) Ran through the instructions you pointed to and created a 12GB swap partition and a zfs mirror using the two USB drives.
6) Rebooted the server and I then get the invalid partition table message.

Be gentle with me as I am quite new to NS4Free :-)

Re: Embedded install USB with 32GB RAM

Posted: 27 Apr 2017 23:49
by machasm
Figured out what the problem was.
I was booting from a live usb and not a live CD. I was then trying to install onto the same usb stick that I had booted from.
Since I didn't have a CD drive I found a third USB stick then put the live USB on that and then ran the installer and installed onto the other two usb sticks as a mirror.
Thanks for your help.

Re: Embedded install USB with 32GB RAM

Posted: 24 May 2017 03:52
by JoseMR
machasm wrote:
27 Apr 2017 23:49
Figured out what the problem was.
I was booting from a live usb and not a live CD. I was then trying to install onto the same usb stick that I had booted from.
Since I didn't have a CD drive I found a third USB stick then put the live USB on that and then ran the installer and installed onto the other two usb sticks as a mirror.
Thanks for your help.

Hello and sorry for late reply, I just wanted to tell that you don't really need "12GB swap partition" regarding your system specs and the 32GB ECC RAM, I just allocate about 4 or 8GB if I where you and let more space for Zroot and Boot environments for a pair of 32GB drives.

While I strongly recommend SSD's to anyone running NAS4Free RootOnZFS installs, I'm like you running RootOnZFS on a pair of Samsung Flash Drive Fit 32GB USB3.0 NAND flash drives, and I manually set 2GB Swap to a separate 2.5" HDD since I just have 16GB ECC RAM, however if you are using USB3.0 flash drives the Swap can be allocated there as well, note that the Swap will be also mirrored for maximum redundancy/stability by the installer by default.

Regards

Re: Embedded install USB with 32GB RAM

Posted: 24 May 2017 08:08
by doktornotor
Wouldn't use any swap on USB, at all. (IIRC if you leave the swap field empty there won''t be any swap.) If you really insist, you can later create a swap using a file or volume on one of the pools.

Image

Re: Embedded install USB with 32GB RAM

Posted: 24 May 2017 15:55
by JoseMR
doktornotor wrote:
24 May 2017 08:08
Wouldn't use any swap on USB, at all. (IIRC if you leave the swap field empty there won''t be any swap.) If you really insist, you can later create a swap using a file or volume on one of the pools.

I would not recommend a ZFS Volume for Swap at all, ZFS relies on RAM, performance will be affected on the pool holding the zvol during high usage, on burst memory exhaustion you can end up with a non responsive system, also cannot be used as dump device, the proper solution is to create a dedicated raw Swap partition on a separate HDD/SSD on production environments.

Swap on USB3(if quality NAND flash device) is just a last resort.

Regards

Re: Embedded install USB with 32GB RAM

Posted: 24 May 2017 16:09
by doktornotor
I guess we'll agree to disagree. I'd prefer swap on ZFS to swap on crappy USB media any time. The alternative is to not use any swap at all.

Re: Embedded install USB with 32GB RAM

Posted: 24 May 2017 16:27
by JoseMR
You stated a good point actually, a server with low RAM plus swapping of a USB device can slow down to a crawl especially on USB 2.0, personally I always used a dedicated 2.5" disk for such purpose and general write intensive tmp data.

Regards

Re: Embedded install USB with 32GB RAM

Posted: 24 May 2017 18:28
by doktornotor
Agreed, some dedicated drive is much better... I'd really rather live w/o swap that trying to use USB for that, afraid that swap on slow USB media is worse than letting OOM killer do the dirty job if required.

Re: Embedded install USB with 32GB RAM

Posted: 27 May 2017 03:40
by machasm
Decided to not use any swap at all and so far things seem to be running just fine.
Thanks for the replies