Author Topic: Linux Print Server/Storage Server  (Read 8799 times)

0 Members and 1 Guest are viewing this topic.

Offline skillz21Topic starter

  • Frequent Contributor
  • **
  • Posts: 311
  • Country: au
Linux Print Server/Storage Server
« on: July 29, 2017, 02:31:30 am »
Hi
I want to set up a DIY print station/storage server. I read around online and I found CUPS for Raspberry Pi. The thing is though, raspberry pi seems pretty expensive. Then I found out about CHIP (www.getchip.com). So my questions are, how can I set up a print server as well as a storage server, as far as I know, CUPS is only for printers.... So is it possible to run CUPS and another program (for HDD sharing) at the same time? if so, can the CHIP actually run it? What program do you suggest I use for HDD sharing (if I can)?


*BTW if the Hard Drive sharing is not supported, will CHIP be sufficient enough to run CUPS
*I have a 2 TB Hard drive
*I don't  know much about Linux, does CUPS run as a program on an operating system, or does it run 'as' and operating system? might be a stupid question...
 

Offline gnif

  • Administrator
  • *****
  • Posts: 1677
  • Country: au
Re: Linux Print Server/Storage Server
« Reply #1 on: July 29, 2017, 02:43:50 am »
Depends on what you are sharing with...

Linux/Mac, NFS is best IMO
Windows, Samba
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3025
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Linux Print Server/Storage Server
« Reply #2 on: July 29, 2017, 02:51:13 am »
CUPS is a service (print server) running on your OS, I think it's probably defacto standard setup by now, any debian/ubuntu based distro should use CUPS by default I think and will have gui configurators for them.

For sharing you want either  SAMBA  (aka Windows File Sharing) or NFS (or some other network file system, but NFS more recognised).  SAMBA will be easier generally especially if Windows is in the mix.

Anyway, Google [your distro of choice] and CUPS or SAMBA to learn about how to set them up for your specific purposes.

~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline skillz21Topic starter

  • Frequent Contributor
  • **
  • Posts: 311
  • Country: au
Re: Linux Print Server/Storage Server
« Reply #3 on: July 29, 2017, 03:00:29 am »
Only windows machines will be accessing the server (and maybe Android)... So will CHIP be able to run CUPS and Ubuntu? and what software should I use for the storage server?


Edit: what about the sharing method that windows computers use? When you share a storage device or a folder to your network? Can you do that and what's it called?(is that what SAMBA is?)
« Last Edit: July 29, 2017, 03:05:19 am by skillz21 »
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3025
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Linux Print Server/Storage Server
« Reply #4 on: July 29, 2017, 03:33:46 am »
I'm not familiar with CHIP but a quick search indicates it's standard distro is Debian based, so yes, if it has a desktop I'd bet it already installs CUPS by default, and probably SAMBA.  Ubuntu is based on Debian.  Raspbian is based on Debian too.

Yes SAMBA = Windows Sharing.
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline skillz21Topic starter

  • Frequent Contributor
  • **
  • Posts: 311
  • Country: au
Re: Linux Print Server/Storage Server
« Reply #5 on: July 29, 2017, 03:36:08 am »
Apparently, it has like its own operating system or something... Is it possible for me to install Ubuntu on it?


Edit: it doesn't look like it has a microSD card slot, could I just install Ubuntu on it through USB?
« Last Edit: July 29, 2017, 03:38:08 am by skillz21 »
 

Offline skillz21Topic starter

  • Frequent Contributor
  • **
  • Posts: 311
  • Country: au
Re: Linux Print Server/Storage Server
« Reply #6 on: July 29, 2017, 03:40:55 am »
and also what program do you guys recommend for use for storage sharing/server with SAMBA. (remember, i need to try and run CUPS and well)
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3025
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Linux Print Server/Storage Server
« Reply #7 on: July 29, 2017, 04:08:21 am »
I think you should just get a Raspberry PI, set it up as a desktop and get a feel for how the Linux ecosystem works, it kinda sounds like you are trying to walk before you can crawl.  I suggest a PI because you will find it easier to find what you want using Google.

A quick search as indicated shows CHIP's standard disto is Debian based, the same as is Raspbian, or Ubuntu.

CUPS is just a printserver, it takes no resources worth mentioning to have it sitting there.  Same with SAMBA.  Neither of these things are resource intensive, the bottleneck will be your network not the computer.

SAMBA is configured via text files in /etc/samba/ - there are gui configurators but I've never used one

CUPS is configured via text files in /etc/cups - but I always use a gui configurator, or the built in web one ( http://localhost:631/ )
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline skillz21Topic starter

  • Frequent Contributor
  • **
  • Posts: 311
  • Country: au
Re: Linux Print Server/Storage Server
« Reply #8 on: July 29, 2017, 05:43:02 am »
I want to get a Raspberry Pi.... But at about $60 AUD it seems pretty expensive. The only experience I have of Linux is running Ubuntu off a USB drive on my computer..... can I use this to get familiar with CUPS and Samba?
 

Offline gnif

  • Administrator
  • *****
  • Posts: 1677
  • Country: au
Re: Linux Print Server/Storage Server
« Reply #9 on: July 29, 2017, 05:53:41 am »
Yeah, you can, and it is actually easier then using an embedded computer as you don't have to mess around with powering it, interfacing, etc... it allows you to concentrate on the task at hand.

As for OS, if it's a server (which it seems to be) I'd avoid Ubuntu like the plague. Run Debian, and do lots of reading. Samba will also interface with CUPS and share printers out.
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3025
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Linux Print Server/Storage Server
« Reply #10 on: July 29, 2017, 06:07:19 am »
Ubuntu runs just fine as a server, all my Amazon EC2 based servers are Ubuntu.  I've used from Slackware in the 90s to Ubuntu and everything in between, including Debian itself, Ubuntu is my preference.  I won't get further into a religious distro-war argument as it would derail the thread.

As for cost, a Pi Zero would do the job and stick within the official Raspberry Pi lineup.  Or go with any of the various similar chinese Single Board Computers, OrangePi, BananaPi, NanoPI.... just if you are starting out with Linux, or with Single Board Computers, I would suggest sticking with the solution with a larger user-base behind it, namely Raspberry.
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline skillz21Topic starter

  • Frequent Contributor
  • **
  • Posts: 311
  • Country: au
Re: Linux Print Server/Storage Server
« Reply #11 on: July 29, 2017, 06:23:59 am »
So I could get a Pi Zero for about $14 AUD... I'd have to use three extra adapters to use it though. So the mini HDMI to HDMI adapter, Micro USB to USB and a USB hub.... I don't have a HDMI to HDMI adapter so I'd have to get buy that.... Should I get a Pi Zero? It might be cheaper... I'm not even sure anymore. What do you guys think?


Edit: I had a look on eBay... then I realised the Pi Zero doesn't have wifi. :'( Ok, so basically, including postage, Using the Pi Zero, the whole thing is going to cost me about $20 AUD (always AUD) the CHIP I think will cost about $12 without postage...
« Last Edit: July 29, 2017, 06:46:23 am by skillz21 »
 

Offline skillz21Topic starter

  • Frequent Contributor
  • **
  • Posts: 311
  • Country: au
Re: Linux Print Server/Storage Server
« Reply #12 on: July 29, 2017, 06:47:39 am »
Also, a question about the Pi Zero. I need to use a Micro USB to USB OTG adapter (http://r.ebay.com/updOYP), won't I? A simple wifi dongle like this (http://r.ebay.com/YCQBv3) should work, right? And this (http://r.ebay.com/UTWkf0) for the HDMI?
« Last Edit: July 29, 2017, 06:52:11 am by skillz21 »
 

Offline Naguissa

  • Regular Contributor
  • *
  • Posts: 114
  • Country: es
    • Foro de electricidad, electrónica y DIY / HUM en español
Re: Linux Print Server/Storage Server
« Reply #13 on: July 29, 2017, 08:44:51 am »
I have prepared a NAS using a Banana Pi M1 (cheap board, with one sata and 1gb RAM).

It's spanish, but I wrote detailed instructions.

Enviado desde mi Jolla mediante Tapatalk


Offline alm

  • Super Contributor
  • ***
  • Posts: 2881
  • Country: 00
Re: Linux Print Server/Storage Server
« Reply #14 on: July 29, 2017, 09:25:23 am »
Do not expect fast I/O from SBCs that use a single USB 2.0 bus for both storage and networking (e.g. Raspberry Pi, presumably the CHIP). It will probably have trouble saturating a 100 MBit network connection, never mind supporting Gigabit. That is pretty pathetic compared to even an entry level consumer NAS, but might be enough if you use it for small files or are patient. Filling that 2 TB drive could easily take a week.
 
The following users thanked this post: Ian.M

Offline Naguissa

  • Regular Contributor
  • *
  • Posts: 114
  • Country: es
    • Foro de electricidad, electrónica y DIY / HUM en español
Re: Linux Print Server/Storage Server
« Reply #15 on: July 29, 2017, 09:38:37 am »
Do not expect fast I/O from SBCs that use a single USB 2.0 bus for both storage and networking (e.g. Raspberry Pi, presumably the CHIP). It will probably have trouble saturating a 100 MBit network connection, never mind supporting Gigabit. That is pretty pathetic compared to even an entry level consumer NAS, but might be enough if you use it for small files or are patient. Filling that 2 TB drive could easily take a week.

Banana Pi M1, around 30EUR:

  • Native Gigabit support, no usb chip
  • Native SATA port (old standard, but still no USB converter chip)
  • Dual core, 2x1GHz
  • 1 Gb DDR3 RAM
  • A lot of connections (HDMI, audio, IR, onboar mic, etc)
  • Typical R-PI GPIO
  • 3 USB 2.0 connectors (2 full size + 1 microUSB OTG + other microUSB only for power, no USB function there)

It's an old A20 chip, but still pretty good. Currently working as NAS + Leech box with:

1Tb SATA on SATA + other the same with an USB convertor in RAID1.
Old PATA disk for mldonkey downloads.
One USB disk; one that I used to carry data among PCs.

 
The following users thanked this post: Ian.M

Offline dave_k

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: au
Re: Linux Print Server/Storage Server
« Reply #16 on: July 29, 2017, 10:45:09 am »
Edit: I had a look on eBay... then I realised the Pi Zero doesn't have wifi.

The new Pi Zero W does  .. US$10 from AdaFruit :-+
I'm using one as a Air Play receiver, strapped to the back of my mini hifi.
 

Offline alm

  • Super Contributor
  • ***
  • Posts: 2881
  • Country: 00
Re: Linux Print Server/Storage Server
« Reply #17 on: July 29, 2017, 11:12:35 am »
Banana Pi M1, around 30EUR:
[...]

Yes, I specifically used a restrictive relative clause to indicate that my statement only applied to the subset of SBCs that connect the Ethernet interface (and any storage you might want to connect beyond an SD card) to the USB bus. I would expect a substantially better performance from something like a Banana PI or Orange Pi.

But as has already been stated, there is some advantage to picking a popular board with extensive documentation and community support if you are new to Linux. Searching for 'raspberry pi cups' gives dozens of hits on configuring the Raspberry Pi as print server. Searching for 'banana pi cups' gives information on how to make desert :P.

Dave touched on some of those issues in this video:
 
The following users thanked this post: Naguissa

Offline GarthyD

  • Regular Contributor
  • *
  • Posts: 85
  • Country: au
    • Adventures in Electronics
Re: Linux Print Server/Storage Server
« Reply #18 on: July 29, 2017, 12:00:35 pm »
I would personally recommend a Raspberry Pi 3 (or maybe a Pi 2 being sold cheap) if you are new to this area as they are widely supported. If you want wireless, get a Pi 3. Leave out the Zero and Zero W for now, they're not the best first single board computer.

If this is not to your liking, here are some starting points to locate something more suitable:

http://www.google.com/search?q=single+board+computer
https://en.wikipedia.org/wiki/Comparison_of_single-board_computers

Whatever you select, it will run an operating system. It will likely be Linux-based. Debian is a Linux-based operating system. Ubuntu, which you prefer, is based on Debian. Many of the operating systems you see on single board computers will frequently be based on Debian. So, with just two degrees of separation (Ubuntu to Debian to whatever they use), the system should be reasonably familiar to you, but not identical. A Raspberry Pi will run Raspbian, for example, which is based on Debian. The level of support and stability is usually tied to the popularity of the board. More sales means more time making sure their operating system is stable. So pick something popular as your first board as it'll be easier. Hence the Pi suggestion.

Upon this operating system, you can run software. CUPS is software that will manage printing. Samba is software that will manage file sharing. You could use Kodi to turn it into a media centre. ssh for secure remote logins. Apache to make it a webserver. You could install emulators to play old console and arcade games. And so on. The better the system, the more resources that will be available for it, meaning that you can run more things at the same time and have them run well. Go for something with a good balance of resources. Again, look at a Pi.

About Ubuntu and Debian, from Ubuntu's website:

https://www.ubuntu.com/about/about-ubuntu/ubuntu-and-debian

So don't be afraid of a Debian-based distro and lock yourself into just using Ubuntu.

C.H.I.P. appears to use a Debian-based operating system.

I hope this helps. SBCs are lots of fun.
« Last Edit: July 29, 2017, 12:09:03 pm by GarthyD »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Linux Print Server/Storage Server
« Reply #19 on: July 29, 2017, 02:51:49 pm »
OK, the Raspberry PI 3 costs more than the CHIP (and a lot of others).  OTOH, everything that can be done with a PI has been done, lots of times, and resources are available.

How much is your time worth?  I price my time at $100/hr.  Mind you, NOBODY will pay me anywhere near that much but I like neat numbers.  If using the PI will save me 1/2 hour over the lifetime of the project, it's a done deal.

The bizarre way that CHIP updates its kernel is more than I can stand.  Apparently, I have to TAR the /home/chip directory and then move the tarball to a cloud service.  It sounds like I have to reinstall any added packages.  Not having an SD card is a serious limitation.

I can't quite get around the idea that the CHIP outputs composite video and if I want VGA or HDMI I have to buy a DIP board.  And then I have to connect up a one-wire EEPROM to keep the configuration data.

I would spend a LONG TIME reading the CHIP web page/documentation.  I'm pretty convinced that I would prefer the PI.  OTOH, I had that position coming in...
 

Offline jiro

  • Contributor
  • Posts: 16
  • Country: mx
  • We are slaves of our own freedom
Re: Linux Print Server/Storage Server
« Reply #20 on: July 29, 2017, 07:57:19 pm »
skillz21 You don't need to change the SO to Ubuntu, since they have basically the same (Ubuntu is derived from Debian) sot for what you are planning both works fine.

In the other hand I'd suggest to install a virtual machine and do some testing there with debian and learn how to configure what you need, basically cups and samba (they can work together as you can read in the samba wiki so in this way is easier to learn the basics that you need before struggling with samba and cups in an single board computer (RPI, orange or whatever you decide to use).

And you can do learn while you wait until have the actual hardware to install the server.
 

Offline boffin

  • Supporter
  • ****
  • Posts: 1027
  • Country: ca
Re: Linux Print Server/Storage Server
« Reply #21 on: July 29, 2017, 08:53:11 pm »
Hi
I want to set up a DIY print station/storage server. I read around online and I found CUPS for Raspberry Pi. The thing is though, raspberry pi seems pretty expensive. Then I found out about CHIP (www.getchip.com). So my questions are, how can I set up a print server as well as a storage server, as far as I know, CUPS is only for printers.... So is it possible to run CUPS and another program (for HDD sharing) at the same time? if so, can the CHIP actually run it? What program do you suggest I use for HDD sharing (if I can)?


*BTW if the Hard Drive sharing is not supported, will CHIP be sufficient enough to run CUPS
*I have a 2 TB Hard drive
*I don't  know much about Linux, does CUPS run as a program on an operating system, or does it run 'as' and operating system? might be a stupid question...

Maybe not the best choice of a home project, as it's pretty hard to beat the price of some of the off the shelf units (QNAP for example) which package everything pretty nicely, and have much faster SATA interfaces than a RPi
 

Offline djnz

  • Regular Contributor
  • *
  • Posts: 179
  • Country: 00
Re: Linux Print Server/Storage Server
« Reply #22 on: July 30, 2017, 06:57:24 am »
The CUPS print server will run fine on anything that runs linux, but the file server part is a different story. I run a rudimentary NAS / file server with a USB drive connected to a raspberry pi 3 and the performance leaves a lot to be desired. Disk read - write is quite slow, even when a beefy power adapter is used for the raspberry pi and the disk is externally powered.

If you have an old laptop / desktop lying around (even something that's 8-10 years old), using that might be a good idea. It won't be as power efficient as a raspberry pi though.
 

Offline bitman

  • Supporter
  • ****
  • Posts: 299
  • Country: us
  • Open Source Guy jabbing with Electronics
Re: Linux Print Server/Storage Server
« Reply #23 on: July 31, 2017, 02:17:36 pm »
Hi
I want to set up a DIY print station/storage server. I read around online and I found CUPS for Raspberry Pi. The thing is though, raspberry pi seems pretty expensive. Then I found out about CHIP (www.getchip.com). So my questions are, how can I set up a print server as well as a storage server, as far as I know, CUPS is only for printers.... So is it possible to run CUPS and another program (for HDD sharing) at the same time? if so, can the CHIP actually run it? What program do you suggest I use for HDD sharing (if I can)?


*BTW if the Hard Drive sharing is not supported, will CHIP be sufficient enough to run CUPS
*I have a 2 TB Hard drive
*I don't  know much about Linux, does CUPS run as a program on an operating system, or does it run 'as' and operating system? might be a stupid question...

Finally a topic I can help with! :)  While I'm an utter newbie with electronics, when it comes to computers, IT and in particular Linux, you're in my domain (job, hobby and haven't run Windows for 10+ years now).

There's a lot here - let's start with "chips". The project scares me - they announce they're working on their own processor chip, so that puts into question how/what source can be compiled and managed on there. Their github is very inactive and slow - using Linux that's not a good idea. Their buildroot is 9-11 months old. Bottom line is, inactive projects don't patch, don't fix, don't move to be compatible with changes. It means that getting "new" things on there is going to be hard if not impossible unless you know how to compile from source for that particular chipset. It's not trivial.

This is why I like the PI - it's standard ARM and most major distributions support it. Meaning they not only create a build compiled for ARM, but pre-configure it for the PI device to understand the hardware on it, including applications to use it.  Going for small embedded systems, I would go with a major distribution's ARM/PI option anytime. This means you have a large selection of applications and options, and most likely others have tried to do what you're doing so there will be help. I really get the impression that CHIP is about BUYING their software on that little gadget. Meaning little to no choice.  It's interesting what's considered high prices. You won't get much of a server with US$60 - in that light, a PI is extremely cheap (there's a but - it comes further down). Since it's a complete system (sans realtime clock) - USB, DVI etc. makes making a small computer like device easy.

CUPS - a very powerful printing service for Linux. This is the important part. I love CUPS. When I connect to the corporate network, the list of printers automatically expands to show me what printers is in the office I'm connected to - that's all CUPS. It's been a long time since I installed printers on Windows - back in the days, it was hours of installing from a CD. We just got a new printer here at home, and I had my wife's and my Linux based desktops configured in about 2 minutes. NO installs needed. HOWEVER, in a later post you state that you are only going to use Windows machines. That's going to be your 'pain' here. Getting drivers for Windows working, getting them connected to CUPS, making sure CUPS exposes the printer and the right interface, with passthru for Windows etc. - for small home networks, in particular if you just have one printer and haven't worked with setting up servers, I would recommend getting a printer with WiFi/physical network and just connect every device you have to it.  We use CUPS as a print server when we have security concerns, and if the printers don't have networking and you for instance have 2-3 printers connected via USB and want to share them.  It will be a lot cheaper (easier) to get a USB print server that translate the USB to a network interface, vs. going down the CUPS route if you just have one printer that happens to not be networked https://www.newegg.com/Product/Product.aspx?Item=9SIA6PF41B0120

Traditionally we would use SAMBA to expose printers to Windows. I'm told (remember, I don't use it) that modern Windows versions can connect directly to CUPS with some tweaks. A quick google produced this http://www.lueckdatasystems.com/HOW-TO_Connect_Windows_to_a_CUPS_Network_Printer which I have no clue if it's correct or not. It certainly does not deal with drivers and configuration of CUPS to make links like this work.

This drives me to the last point - file sharing. It's dirt easy, HOWEVER a PI is way too slow for that to be useful for you. Or let me rephrase, it depends highly on WHAT you want to do with the file server. If you're doing video editing, having multiple systems access different files at the same time, the IO of a PI is willfully incapable for supporting your need. However, if you can live with slow IO - that you use the fileserver from one system at a time for non-intensive IO operations like archiving photos - all you need is patience. SAMBA again used to be the way to go here. But there are much better solutions today - solutions that will scale. You've probably seen pictures of multiple PIs all tied together in a stack and headlines talking about a PI cluster. This is what is needed to get proper IO bandwidth on a PI. Storage systems like Gluster will span multiple systems and present a single logical representation of data that's in reality stripped/mirrored across multiple systems and it can create that point as SMB so Windows can connect. THAT SAID - you'll need to think about your network need here. Sharing means security. SAMBA unfortunately gives the impression that security is "share" based. It's not - it's file based. All SAMBA does is store all files with root or similar priveleges and then it tries to map your username to it's own security. In other words, it BYPASSES security to implement it's own pseudo option. Gluster and NFS do NOT do that. But that means you'll need an IDM if you have more than just a few computers you want to connect (IDM=Identification Management) which in the Microsoft world is called Active Directory (I don't think they've renamed it). It sounds like a lot - it's not. It's a very easy install today with something called "FreeIPA". The trick is connecting your windows machines to it, so you authenticate on them once, and never again. Worst case, you'll have to login every time you need to access a file. FreeIPA comes with "plugins" for Windows so this can be done. For Linux I just install the ipa-client and presto I'm done :)

All in all, as you start adding what you need you can see the complexity increases.   You're not the first wanting to do this, so there are nice package solutions that do all of this out of the box. One is FreeNAS - and it's very very easy to install on a small traditional system. Scanning the forums everyone is stating what I did above that IO will suck and there are a few technical challenges that can be overcome. But it has it all built in, and a great graphical user-interface (Web) to manage it all. Users, SAMBA, etc. etc.  That said, if you want anything performing out of your network, don't use PIs. A i3 with 4-8GB of memory will be more expensive, but it will run a single SSD nicely and really perform to your home need.

Wow - this got to be longer than I expected.  Bottom line here is, think about what you want to achieve. If it's just a single printer, single workstation there are better ways to do things. Otherwise you may be venturing into areas you're not prepared to attack yet :)
 

Offline alm

  • Super Contributor
  • ***
  • Posts: 2881
  • Country: 00
Re: Linux Print Server/Storage Server
« Reply #24 on: July 31, 2017, 02:37:15 pm »
Traditionally we would use SAMBA to expose printers to Windows. I'm told (remember, I don't use it) that modern Windows versions can connect directly to CUPS with some tweaks. A quick google produced this http://www.lueckdatasystems.com/HOW-TO_Connect_Windows_to_a_CUPS_Network_Printer which I have no clue if it's correct or not. It certainly does not deal with drivers and configuration of CUPS to make links like this work.
Yes, that method works. Should require no configuration on the CUPS side, since CUPS exposes an ipp printer by default. Better documentation is here. Depending on how the printer was set up in CUPS, you may either use the original driver (for a printer in RAW mode) or a generic Postscript driver. If the only clients will be Windows computers, a raw queue and the manufacturer's printer drivers might be the easiest solution. Unless you want to avoid those huge HP driver packages ;).

An alternative route, in addition to ipp or Samba, is Google cloud print for CUPS. I recall it being harder to setup, but the advantage is that it will interface easily with mobile devices.

Offline agehall

  • Frequent Contributor
  • **
  • Posts: 383
  • Country: se
Re: Linux Print Server/Storage Server
« Reply #25 on: August 01, 2017, 05:47:21 am »
And before you do this and put something that you might want to access tomorrow on your new storage server - MAKE SURE YOU USE A RAID SETUP!

I'm not going to argue which RAID level/setup you should use (well, don't use RAID0 - but that should be obvious) but use one! Otherwise the harddrive WILL fail and you WILL lose your data. From experience, I also know that in home systems, you might want to have a bit of extra redundancy as you may not always have spare drives to replace failing drives right away.

If you are serious about doing this, I would highly recommend looking into ZFS. (I guess BTRFS is maturing as well, but I've never used it, so I can't speak for it)

Sorry for all the caps, but this stuff is important if you care about your data.
 
The following users thanked this post: Naguissa

Offline stevelup

  • Regular Contributor
  • *
  • Posts: 184
  • Country: gb
Re: Linux Print Server/Storage Server
« Reply #26 on: August 01, 2017, 06:57:43 am »
RAID is far less useful than a robust backup strategy.
 

Offline Naguissa

  • Regular Contributor
  • *
  • Posts: 114
  • Country: es
    • Foro de electricidad, electrónica y DIY / HUM en español
Re: Linux Print Server/Storage Server
« Reply #27 on: August 01, 2017, 07:34:51 am »
RAID is far less useful than a robust backup strategy.

They are not the same. RAID (except 0) is for performance and availability (you can delegate maintenance when a disk fails). Backup is for security.

Maybe RAID gives you a little more of security compared to a single disk, but still is not a backup strategy and never should replace it.


Said that, most people are lazy (me included) and our home backup strategy is defficient. Being so, RAID, cloud and so one mitigates a little bit (VERY LITTLE!) our lazyness....
 
The following users thanked this post: newbrain

Offline agehall

  • Frequent Contributor
  • **
  • Posts: 383
  • Country: se
Re: Linux Print Server/Storage Server
« Reply #28 on: August 01, 2017, 09:43:59 am »
RAID is far less useful than a robust backup strategy.

Depends on the scenario tbh. I have about 1TB of data that I just cannot lose. If it is destroyed, it would be a disaster. That data is backed up in multiple ways and the chances of it getting lost is virtually nil. The rest of my data, which would be painful to lose but not a total disaster, (somewhere in the neighbourhood of 30TB) is not backed up but resides on a raidz2 pool with two spare drives in the pool. I would like to move up to a raidz3 pool, but I don't have the gear to do it (yet!). With raidz2 and spare drives, I feel rather comfortable not backing it up.

The main problem with backups is that most people tend to get sloppy at home and when disaster strikes, you realize that your backup is 6 months+ old. With a RAID, you normally have a chance to act and recover before the total disaster is a fact. But it's all a balance act - if you just can't lose data, backup and do it to multiple destinations/media.
 

Offline stevelup

  • Regular Contributor
  • *
  • Posts: 184
  • Country: gb
Re: Linux Print Server/Storage Server
« Reply #29 on: August 01, 2017, 10:01:51 am »
RAID won't help you if you do rm -rf / as root ;)
 
The following users thanked this post: Naguissa

Offline Naguissa

  • Regular Contributor
  • *
  • Posts: 114
  • Country: es
    • Foro de electricidad, electrónica y DIY / HUM en español
Re: Linux Print Server/Storage Server
« Reply #30 on: August 01, 2017, 10:18:10 am »
RAID won't help you if you do rm -rf / as root ;)

Also on criptolockers (as NAS is also encrypted), or accidentally deleted // overwritten files....

BUT, it protects a little against disk failures.

Offline agehall

  • Frequent Contributor
  • **
  • Posts: 383
  • Country: se
Re: Linux Print Server/Storage Server
« Reply #31 on: August 01, 2017, 10:26:14 am »
RAID won't help you if you do rm -rf / as root ;)

ZFS snapshots will though. They are cheap and fast and I tend to use them a lot as a backup light to avoid stupid mistakes like that.
 
The following users thanked this post: Naguissa

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3025
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Linux Print Server/Storage Server
« Reply #32 on: August 01, 2017, 12:28:30 pm »
Since we have drifted to backup systems.  Let me put in a vote for borg.

https://borgbackup.readthedocs.io/en/stable/index.html

Here's my stats for the latest (nightly) backup of my system and home data...

                       Original size      Compressed size    Deduplicated size
This archive:              368.43 GB            199.56 GB            321.68 MB
All archives:                4.42 TB              2.39 TB            160.62 GB

The current raw-data size is 368.43 GB, but only takes 160.62 GB of backup disk space because borg compresses and deduplicates (at a chunk level not file level, so it's good for things like vmware drive images as well as long as the machines are powered off when you backup them of course for consistency), and in that is for 12 incremental but effectively independent archives totalling 4.42TB.

Any one of of those archives I can mount as a filesystem and pull stuff out of if I so choose, and it's pretty fast to backup once the initial archive is done.

I used to use rsnapshot, but it was soooooooo slooooooow and used way too much space.  Borg can do in 3 hours what rsnapshot was taking 12 to do, in a third of the backup disk space, for about twice as many archives.
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline agehall

  • Frequent Contributor
  • **
  • Posts: 383
  • Country: se
Re: Linux Print Server/Storage Server
« Reply #33 on: August 01, 2017, 12:37:09 pm »
What kind of data are you backing up using that? I've never really seen deduplication make such a difference in real life...
 

Offline alm

  • Super Contributor
  • ***
  • Posts: 2881
  • Country: 00
Re: Linux Print Server/Storage Server
« Reply #34 on: August 01, 2017, 01:17:09 pm »
I used to use rsnapshot, but it was soooooooo slooooooow and used way too much space.  Borg can do in 3 hours what rsnapshot was taking 12 to do, in a third of the backup disk space, for about twice as many archives.
I wonder about a system like that on a CPU and memory constrained low-end SBC. I use the rsync-based backuppc on a quad core Xeon (Core 2 generation) server with 16 GB RAM, and even that is not particularly fast. Now I am willing to believe that Borg is more efficient, but a Raspberry Pi is probably more than an order of magnitude slower than even an old Xeon.

Offline bitman

  • Supporter
  • ****
  • Posts: 299
  • Country: us
  • Open Source Guy jabbing with Electronics
Re: Linux Print Server/Storage Server
« Reply #35 on: August 01, 2017, 08:13:08 pm »
And before you do this and put something that you might want to access tomorrow on your new storage server - MAKE SURE YOU USE A RAID SETUP!

Let's note that this question was about a small embedded device like a Raspberry PI and not a full blow computer with 6-8 parallel IO SATA channels available.  Heck, some options just have USB available. So RAID by any means is not an option here. The hardware we're talking about can barely keep up with a single IO channel. 3-5 parallel channels? No way.  REAL LIFE file servers of course have dozens of disks and RAID is one of the many features that allows optimal IO and redundancies to be build into the hardware. But not here - not this example. Just running a single small USB stick is about the expectations here.

Also, as other posts here sorta indicates, RAID isn't "backup". Deleting a file still gets deleted. If you accidentally delete a directory full of thousands of files, they too are deleted. RAID or no RAID. Gone. Linux comes with quite a few tools like LVM and Dejavu to deal with this, but again for a small embedded device that seems overdoing/overtaxing the hardware we can get.

Bottom line is, that for REAL file servers you need more hardware than laid out. On those you can do all the stuff suggested here, and a lot more (look at FreeNAS for instance), and you can make it really smooth so you can loose whole hosts/nodes and not loose availability, automatic cloud backup etc. etc.  There are appliances today for consumers that do this (most are Linux based) and for people who just want it to work, that's where I'll go. Plug-in and forget. Cheaper than trying to build it yourself, smaller form factor etc.

As to designing your own NAS, there's plenty of options. Gluster is one of them which I mentioned which does striping/mirroring over multiple hosts as well as disks. XFS/GFS have very interesting file system features for file servers, LVM can handle adding/removing capacity to a running system, consistent snapshots, cached block devices etc. etc. - and with a good web frontend you have a very powerful set of servers that can compete with enterprise/cloud solutions you pay a lot of money from. But it will cost you to get there in hardware alone.  It is probably cheaper to just use a cloud provider as your long term storage provider and just download/mirror the data you work on temporarily from the backend storage, automatically sync that across devices etc - and no major hardware investments are needed at all.

Finally, RAID isn't always good. It can make performance worse and make recovery quite complex.  I've seen lots of systems running in degraded mode using software raid because it wasn't configured to notify anyone, and the admin didn't know how to tell what the state was, meaning it was actually preforming slower than a single disk would.  So it's not a simple choice.
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3025
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Linux Print Server/Storage Server
« Reply #36 on: August 01, 2017, 08:35:14 pm »
What kind of data are you backing up using that? I've never really seen deduplication make such a difference in real life...

/usr/local, /etc and /home, minus vmware images, there is a fair amount of repetition in some of it to be fair (svn repository branch checkouts)

My vmware (disk/suspended state) images dedup by about 50% as well but in a different backup set

Borg's dedup is really good, it works on a chunk level, so changing for example 1 byte in a file doesn't mean the entire file changed, only a chunk.
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline eugenenine

  • Frequent Contributor
  • **
  • Posts: 865
  • Country: us
Re: Linux Print Server/Storage Server
« Reply #37 on: August 01, 2017, 09:30:09 pm »
For someone not familiar with linux, install http://www.webmin.com/ on your server.  It gives a simple web interface that can configure samba, nfs, etc, then you can look at the config files it created to learn how its done.

I've used a Pi for a long time, one for my internet server with 1TB drive hanging off of it and another for my web facing server running owncloud.
I wanted a little more performance so little by little I watched for sale prices and put together a $200 system in a small mini-itx case.
 

Offline Naguissa

  • Regular Contributor
  • *
  • Posts: 114
  • Country: es
    • Foro de electricidad, electrónica y DIY / HUM en español
Re: Linux Print Server/Storage Server
« Reply #38 on: August 02, 2017, 06:55:23 am »
I link a thread I wrote for that purpose:

https://translate.google.es/translate?hl=es&sl=es&tl=en&u=https%3A%2F%2Fwww.foroelectro.net%2Felectronica-digital-raspberry-y-otros-socs-f9%2Fnas-casero-barato-y-bajo-consumo-con-un-soc-banana-t162.html

FS may be opinable (RAID + ext4 or XFS, reiser, LVM....), but overall, good price / performance / options ratio.

Offline agehall

  • Frequent Contributor
  • **
  • Posts: 383
  • Country: se
Re: Linux Print Server/Storage Server
« Reply #39 on: August 02, 2017, 07:09:20 am »
Finally, RAID isn't always good. It can make performance worse and make recovery quite complex.  I've seen lots of systems running in degraded mode using software raid because it wasn't configured to notify anyone, and the admin didn't know how to tell what the state was, meaning it was actually preforming slower than a single disk would.  So it's not a simple choice.

Well, consider that case without a RAID setup - your NAS would be dead as the drive. There is no such thing as a fire and forget solution that just works once set up - everything breaks eventually and all we can do is mitigate the effects and delay the event itself.

Granted the hardware suggested by the OP isn't anywhere near enough to run a proper file server, I still think it's appropriate to think about redundancy for the spinning rust. Otherwise a USB drive is probably a better solution imho.
 
The following users thanked this post: Naguissa

Offline bitman

  • Supporter
  • ****
  • Posts: 299
  • Country: us
  • Open Source Guy jabbing with Electronics
Re: Linux Print Server/Storage Server
« Reply #40 on: August 02, 2017, 03:42:54 pm »
Finally, RAID isn't always good. It can make performance worse and make recovery quite complex.  I've seen lots of systems running in degraded mode using software raid because it wasn't configured to notify anyone, and the admin didn't know how to tell what the state was, meaning it was actually preforming slower than a single disk would.  So it's not a simple choice.

Well, consider that case without a RAID setup - your NAS would be dead as the drive. There is no such thing as a fire and forget solution that just works once set up - everything breaks eventually and all we can do is mitigate the effects and delay the event itself.
If the assumption is that the alternative is no redundancy, then yes you're absolutely right. With my rather long entry I was trying to explain that md/dm raid isn't the only option here. There are plenty of other ways to create redundancy across multiple devices.

Quote
Granted the hardware suggested by the OP isn't anywhere near enough to run a proper file server, I still think it's appropriate to think about redundancy for the spinning rust. Otherwise a USB drive is probably a better solution imho.
Exactly - the idea that you would use a PI as a target for VM image backups just bugles the mind. You don't have to spend thousands to get this done, but it will be more than $60 to get the hardware (the 3-5 disks alone will be far more).
 

Offline rdl

  • Super Contributor
  • ***
  • Posts: 3667
  • Country: us
Re: Linux Print Server/Storage Server
« Reply #41 on: August 02, 2017, 11:05:21 pm »
Do you have a real need for a print server? I have an old Brother laser printer that's plugged directly into a wireless router. All my computers can print to it. I use FreeNAS for file storage. Disks are in mirrored pairs and the data on each pair is duplicated on two other machines.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf