Thread: PostgreSQL server embedded in NAS firmware?
Hi
I currently run a modest streaming replication target on a cheap, single disk ASUS media center; replicating a 100GB PG database.
I want to add RAID via a consumer grade NAS device.
As far as I can tell consumer grade NAS devices these days appear to be fairly rich & flexible embedded lniux/freebsd systems.
Has anyone had any experience with running postgresql on the NAS device itself? Which products? Any traps or pitfalls or integrity concerns about such an arrangement?
Andrew
I currently run a modest streaming replication target on a cheap, single disk ASUS media center; replicating a 100GB PG database.
I want to add RAID via a consumer grade NAS device.
As far as I can tell consumer grade NAS devices these days appear to be fairly rich & flexible embedded lniux/freebsd systems.
Has anyone had any experience with running postgresql on the NAS device itself? Which products? Any traps or pitfalls or integrity concerns about such an arrangement?
Andrew
Scratch that. An immediate show stopping pitfall occurs to me: the necessity to match CPU/OS Architecture between primary server and replicate target. Doubtful that there are any consumer NAS products out there running linux on 64bit/intel
On Fri, Sep 7, 2012 at 8:23 AM, Andrew Barnham <andrew.barnham@gmail.com> wrote:
Hi
I currently run a modest streaming replication target on a cheap, single disk ASUS media center; replicating a 100GB PG database.
I want to add RAID via a consumer grade NAS device.
As far as I can tell consumer grade NAS devices these days appear to be fairly rich & flexible embedded lniux/freebsd systems.
Has anyone had any experience with running postgresql on the NAS device itself? Which products? Any traps or pitfalls or integrity concerns about such an arrangement?
Andrew
Andrew Barnham <andrew.barnham@gmail.com> writes: > Scratch that. An immediate show stopping pitfall occurs to me: the > necessity to match CPU/OS Architecture between primary server and replicate > target. Doubtful that there are any consumer NAS products out there > running linux on 64bit/intel Maybe not, but there are with 32-bit Intel ... if you really want to do this, there's nothing to stop you from running a 32-bit build on your primary machine and then replicating to the NAS. This would limit what you could crank shared_buffers up to, but otherwise should work fine. regards, tom lane
That shouldn't really matter. Either the db is just on the NAS in which case as long as pg compiles on it then the client on the main unit shouldn't matter, or the data is just stored there and the db is on the main unit, client and all and again it wouldn't matter. But the client and server do NOT have to be the same architecture to work for sure. On Thu, Sep 6, 2012 at 4:40 PM, Andrew Barnham <andrew.barnham@gmail.com> wrote: > Scratch that. An immediate show stopping pitfall occurs to me: the necessity > to match CPU/OS Architecture between primary server and replicate target. > Doubtful that there are any consumer NAS products out there running linux on > 64bit/intel > > > On Fri, Sep 7, 2012 at 8:23 AM, Andrew Barnham <andrew.barnham@gmail.com> > wrote: >> >> Hi >> >> I currently run a modest streaming replication target on a cheap, single >> disk ASUS media center; replicating a 100GB PG database. >> >> I want to add RAID via a consumer grade NAS device. >> >> As far as I can tell consumer grade NAS devices these days appear to be >> fairly rich & flexible embedded lniux/freebsd systems. >> >> Has anyone had any experience with running postgresql on the NAS device >> itself? Which products? Any traps or pitfalls or integrity concerns about >> such an arrangement? >> >> Andrew > > -- To understand recursion, one must first understand recursion.
On 09/06/2012 04:19 PM, Scott Marlowe wrote: > That shouldn't really matter. Either the db is just on the NAS in > which case as long as pg compiles on it then the client on the main > unit shouldn't matter, or the data is just stored there and the db is > on the main unit, client and all and again it wouldn't matter. > > But the client and server do NOT have to be the same architecture to > work for sure. If I understood the OP, it is not client <--> server, it is: main server <--> replication server In that case architecture would matter. > > On Thu, Sep 6, 2012 at 4:40 PM, Andrew Barnham <andrew.barnham@gmail.com> wrote: >> Scratch that. An immediate show stopping pitfall occurs to me: the necessity >> to match CPU/OS Architecture between primary server and replicate target. >> Doubtful that there are any consumer NAS products out there running linux on >> 64bit/intel >> >> >> On Fri, Sep 7, 2012 at 8:23 AM, Andrew Barnham <andrew.barnham@gmail.com> >> wrote: >>> >>> Hi >>> >>> I currently run a modest streaming replication target on a cheap, single >>> disk ASUS media center; replicating a 100GB PG database. >>> >>> I want to add RAID via a consumer grade NAS device. >>> >>> As far as I can tell consumer grade NAS devices these days appear to be >>> fairly rich & flexible embedded lniux/freebsd systems. >>> >>> Has anyone had any experience with running postgresql on the NAS device >>> itself? Which products? Any traps or pitfalls or integrity concerns about >>> such an arrangement? >>> >>> Andrew >> >> > > > -- Adrian Klaver adrian.klaver@gmail.com
On Fri, Sep 7, 2012 at 4:10 AM, Andrew Barnham <andrew.barnham@gmail.com> wrote:
Scratch that. An immediate show stopping pitfall occurs to me: the necessity to match CPU/OS Architecture between primary server and replicate target. Doubtful that there are any consumer NAS products out there running linux on 64bit/intel
FreeNAS is based on FreeBSD 8.2 and is available in 64 bit arch.
Amitabh
On Thu, Sep 6, 2012 at 6:06 PM, Adrian Klaver <adrian.klaver@gmail.com> wrote: > On 09/06/2012 04:19 PM, Scott Marlowe wrote: >> >> That shouldn't really matter. Either the db is just on the NAS in >> which case as long as pg compiles on it then the client on the main >> unit shouldn't matter, or the data is just stored there and the db is >> on the main unit, client and all and again it wouldn't matter. >> >> But the client and server do NOT have to be the same architecture to >> work for sure. > > > If I understood the OP, it is not client <--> server, it is: > main server <--> replication server > > In that case architecture would matter. Ahh I thought he'd be moving both ends of the replication onto embedded nas.
On 6 September 2012 23:40, Andrew Barnham <andrew.barnham@gmail.com> wrote: > Scratch that. An immediate show stopping pitfall occurs to me: the necessity > to match CPU/OS Architecture between primary server and replicate target. > Doubtful that there are any consumer NAS products out there running linux on > 64bit/intel Hi I have a super cheapskate rig along those lines at home, doing replication among other things: I used an HP Microserver (not marketed as a 'consumer NAS' exactly, but the same general idea: a low cost black cube with drives bays, SATA ports, a small amount of ECC RAM and a low power dual core amd64 CPU). I run Debian GNU/Linux and have a bunch of PostgreSQL databases, backups and virtual machines on it. My goals were: cheap to buy, cheap to run, reasonably reliable, quiet, small, inoffensive to the eye. I filled it up with 'green' 5400RPM drives that I had spare from another project, configured software RAID arrays with XFS on top, and put it on a shelf to run headless. A friend has the same box but runs FreeNAS on it so he can use ZFS and swears by it (he also added a 4 x 2.5" adaptor to be able to reach the maximum of 8 drives, which I think requires adding a controller card, whereas I used the 5.25" bay for a 5th 3.5" drive). The machines were going for around 150 GBP when I bought, and I added some RAM. Last time I measured it it was drawing around 50W (a bit more when busy, a bet less when idle), which works out to under 50 quid a year to run at London retail electricity prices, comparable to a light bulb. This is surely about the slowest database hardware money can buy, but handles my hobbiest databases (~1TB for the largest) and a bunch of streaming replicas and backups from remote servers just fine. I haven't checked, but I would expect it to be the slowest build farm member... Thomas Munro