Author Topic: Setting up a NAS using Ubuntu Server  (Read 21008 times)

Offline GearSlave

  • Peacekeeper Extraordinaire
  • Trade Count: (+3)
  • AVForums Veteran
  • *****
  • Posts: 8,796
  • Ohm's Law has no business in Audio
    • Studio B
Re: Setting up a NAS using Ubuntu Server
« Reply #30 on: April 19, 2011, 09:42:59 AM »
Aren't you going to be running RAID on that volume? If so, you won't need LVM. In fact, I would strongly suggest against spanning an LVM across multiple drives without any redundancy down the line. Unless I'm completely missing you here?

If your stick does fail and you re-install the os, provided you are running RAID, mdadm will be able to string all the drives back together (I've done this many times). You simply mount the volume and all your data will be there. Not too sure about a spanned LVM volume, but like I said you shouldn't span such a big volume without redundancy.
Resistance is not futile; it is voltage divided by current (R=V/I)

Offline ara

  • Trade Count: (+2)
  • AVForums Veteran
  • ***
  • Posts: 388
Re: Setting up a NAS using Ubuntu Server
« Reply #31 on: April 19, 2011, 11:41:35 AM »
My understanding from what I have read on LVM is that should one drive fail you need tech level beyond mortals to recover (if at all as there is a lot of varying opinions about it). So I'm with Gert on this one.

Offline Rotten Johnny

  • ROONed for life.
  • Administrator
  • Trade Count: (+31)
  • *****
  • Posts: 14,477
Re: Setting up a NAS using Ubuntu Server
« Reply #32 on: April 19, 2011, 12:52:54 PM »
Ok, I think a clarification is in order re how this box is to be used. Its sole purpose is to serve music & video, it's not intended to be a backup at all (though I do want to minimize inconvenience in the event of a disk failure). I have two raid5 hardware enclosures that serve only as backup and have sufficient capacity to replicate all music held on the microserver.

So, from a maximising storage capacity perspective I want to avoid raid5 and from an avoiding downtime perspective I need to steer clear of JBOD (striped or unstriped) and also LVM. If I'm not mistaken that leaves me with individually mounted drives loaded via fstab as the most pragmatic solution?
Audiophile: There is almost no other group that prides themselves more on wasting good money on utterly worthless ****, and then trying to furiously blow smoke up their own ass to justify it.

Free your mind...and your ass will follow.

Offline GearSlave

  • Peacekeeper Extraordinaire
  • Trade Count: (+3)
  • AVForums Veteran
  • *****
  • Posts: 8,796
  • Ohm's Law has no business in Audio
    • Studio B
Re: Setting up a NAS using Ubuntu Server
« Reply #33 on: April 19, 2011, 01:01:51 PM »
I've not tried this myself, so I can be talking out my ass, but why don't you create a 'Music' folder in root and mount each volume separately under that? With SBS you just point it to the 'Music' folder and it'll scan all the mounted volumes under that. No LVM, no fancy pants RAID or anything.

You then setup rSync (Yes ara, I read up about it :D) to sync with your backup boxes. Personally, I'd still got for RAID5 (you'll only lose 1 drive). Compared to the time it'll take to copy all that data over in the event of failure makes the loss of 1 drive worth it to me...
Resistance is not futile; it is voltage divided by current (R=V/I)

Offline Rotten Johnny

  • ROONed for life.
  • Administrator
  • Trade Count: (+31)
  • *****
  • Posts: 14,477
Re: Setting up a NAS using Ubuntu Server
« Reply #34 on: April 19, 2011, 01:14:02 PM »
What you're proposing re mounting to a single folder is exactly what I've in mind as the compromise. Unfortunately if I use raid5 in this instance I'm going to lack sufficient storage (hence my earlier questions about 3tb drives). Ja nee, fair to say "dis f!$ken baie musiek"
Audiophile: There is almost no other group that prides themselves more on wasting good money on utterly worthless ****, and then trying to furiously blow smoke up their own ass to justify it.

Free your mind...and your ass will follow.

Offline BWS

  • Administrator
  • Trade Count: (+1)
  • *****
  • Posts: 15,687
Re: Setting up a NAS using Ubuntu Server
« Reply #35 on: April 19, 2011, 01:53:51 PM »
(you'll only lose 1 drive).

And the array can rebuild
Whoever originally coined the word 'Lisp' and put an 'S' in it's spelling, is a Douchebag !!

Offline Rotten Johnny

  • ROONed for life.
  • Administrator
  • Trade Count: (+31)
  • *****
  • Posts: 14,477
Re: Setting up a NAS using Ubuntu Server
« Reply #36 on: April 19, 2011, 09:18:00 PM »
LOL, I just made the most amateur mistake  :o

Opened a terminal window, ssh connection to the Microserver
Code: [Select]
sudo mkfs.ext4 /dev/sda1 All going well.  Get impatient as there are another 4 drives to deal with, open another terminal window and do the same, only this time I forget to ssh to microserver.  Thank goodness /dev/sdb1 is a bunch of old crap I've not looked at in years  :-[
Audiophile: There is almost no other group that prides themselves more on wasting good money on utterly worthless ****, and then trying to furiously blow smoke up their own ass to justify it.

Free your mind...and your ass will follow.

Offline Rotten Johnny

  • ROONed for life.
  • Administrator
  • Trade Count: (+31)
  • *****
  • Posts: 14,477
Re: Setting up a NAS using Ubuntu Server
« Reply #37 on: April 20, 2011, 06:10:39 AM »
So I ended up with /media/audiolib/disk1....5 mounted via fstab and /media/audiolib shared across the network using NFS. NAS is sold.  :)
Audiophile: There is almost no other group that prides themselves more on wasting good money on utterly worthless ****, and then trying to furiously blow smoke up their own ass to justify it.

Free your mind...and your ass will follow.

Offline GearSlave

  • Peacekeeper Extraordinaire
  • Trade Count: (+3)
  • AVForums Veteran
  • *****
  • Posts: 8,796
  • Ohm's Law has no business in Audio
    • Studio B
Re: Setting up a NAS using Ubuntu Server
« Reply #38 on: April 20, 2011, 07:18:44 AM »
Excellent! Are you going to be putting a UPS on? I suppose it's not so much of an issue if you not running RAID.

As I got my Microserver, Ara convinced me to try FreeNAS again. Installation went smooth and I was up in an hour. For 3 days I messed around with FreeNAS to get my UPS working, so decided to go back to Ubuntu. Like I said when I started this guide, Ubuntu might not be the most user friendly, but it is surely more flexible than FreeNAS.
Resistance is not futile; it is voltage divided by current (R=V/I)

Offline Rotten Johnny

  • ROONed for life.
  • Administrator
  • Trade Count: (+31)
  • *****
  • Posts: 14,477
Re: Setting up a NAS using Ubuntu Server
« Reply #39 on: April 20, 2011, 09:48:44 AM »
Excellent! Are you going to be putting a UPS on? I suppose it's not so much of an issue if you not running RAID.

As I got my Microserver, Ara convinced me to try FreeNAS again. Installation went smooth and I was up in an hour. For 3 days I messed around with FreeNAS to get my UPS working, so decided to go back to Ubuntu. Like I said when I started this guide, Ubuntu might not be the most user friendly, but it is surely more flexible than FreeNAS.
I'm no linux gun - my experience is limited to having run Suse then Ubuntu on the desktop for the past 7 years or so. Having said that, I found Ubuntu server pretty easy to configure (webmin does a lot for you e.g setting up mountpoints via GUI web interface). I think it pretty much comes down to knowing which packages need to be installed (and why the nfs server isn't installed by default is a mystery to me). As soon as I've found a replacement battery for my APC I'll be attempting the UPS integration.  Definitely need UPS up before I add to the raid arrays. Funny thing that, I bought the UPS whilst in Australia, specifically because we were coming home. It's saved my RAID array bacon at least 3x with unexpected power loss.

As an aside, I wonder how many billions are spent here on power protection & security (incl. ironically lighting & electricity) because of the local situation compared with other 'normal' countries where you can take electricity & safety more or less for granted. Still, it's lekker to be home.
Audiophile: There is almost no other group that prides themselves more on wasting good money on utterly worthless ****, and then trying to furiously blow smoke up their own ass to justify it.

Free your mind...and your ass will follow.

Offline ara

  • Trade Count: (+2)
  • AVForums Veteran
  • ***
  • Posts: 388
Re: Setting up a NAS using Ubuntu Server
« Reply #40 on: April 20, 2011, 10:08:41 AM »
Well I just love FreeNAS because of the nice interface and ease of use for most people. I'm busy building trying to build my own version of FreeNAS (64-bit) but want to try and slip in Squeezebox so that I can run 64-bit for ZFS plus Squeezebox. That is why I'm a bit slow in posting on how to setup ZFS, NFS, iScsi, etc on the other thread.

On a side node I have been running Raid5/Raid6/ZFS for the past 5 year without a battery backup or UPS. The only thing that can get damage if you write to disks is the file you are busy writting to (when the power goes off). I have had a lot of power failures without and problems.
« Last Edit: April 20, 2011, 10:18:17 AM by ara »

Offline Rotten Johnny

  • ROONed for life.
  • Administrator
  • Trade Count: (+31)
  • *****
  • Posts: 14,477
Re: Setting up a NAS using Ubuntu Server
« Reply #41 on: April 20, 2011, 10:20:54 AM »
Is there any real advantage in running 64 bit?
Audiophile: There is almost no other group that prides themselves more on wasting good money on utterly worthless ****, and then trying to furiously blow smoke up their own ass to justify it.

Free your mind...and your ass will follow.

Offline ara

  • Trade Count: (+2)
  • AVForums Veteran
  • ***
  • Posts: 388
Re: Setting up a NAS using Ubuntu Server
« Reply #42 on: April 20, 2011, 10:26:51 AM »
Is there any real advantage in running 64 bit?

If you use ZFS there is a huge benefit so for people that run Linux (without ZFS  ;D) there is no real benefit accept that 32-bit can only use 3.5GB of memory.

Offline jaxx

  • Trade Count: (0)
  • AVForums Member
  • **
  • Posts: 54
Re: Setting up a NAS using Ubuntu Server
« Reply #43 on: April 21, 2011, 03:26:35 PM »
Well I just love FreeNAS because of the nice interface and ease of use for most people. I'm busy building trying to build my own version of FreeNAS (64-bit) but want to try and slip in Squeezebox so that I can run 64-bit for ZFS plus Squeezebox. That is why I'm a bit slow in posting on how to setup ZFS, NFS, iScsi, etc on the other thread.

On a side node I have been running Raid5/Raid6/ZFS for the past 5 year without a battery backup or UPS. The only thing that can get damage if you write to disks is the file you are busy writting to (when the power goes off). I have had a lot of power failures without and problems.

Hi ara,

Im also running FreeNas 7 on a Microserver - currently playing around with a single 250GB HDD for now, but plan to go 2X2TB mirrored in the not too distant future.
I was thinking of mirroring using RSYNC as an alternative to RAID, because I was under the impression that RAID would be much less tolerant of power outages. Would there be any benefit ? ( I understand the RAID is always available etc, but just wanted a simpler but more resilient alternative)

Offline Rotten Johnny

  • ROONed for life.
  • Administrator
  • Trade Count: (+31)
  • *****
  • Posts: 14,477
Re: Setting up a NAS using Ubuntu Server
« Reply #44 on: April 21, 2011, 09:09:42 PM »
@ ara, I'm having a few NFS issues I'm battling to resolve.  Mind dumping $ cat /etc/exports for me from your Freenas install?
Audiophile: There is almost no other group that prides themselves more on wasting good money on utterly worthless ****, and then trying to furiously blow smoke up their own ass to justify it.

Free your mind...and your ass will follow.