LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-23-2017, 01:48 PM   #31
fal_shooter
LQ Newbie
 
Registered: Apr 2007
Location: Idaho
Distribution: Linux Mint
Posts: 27

Original Poster
Rep: Reputation: 0

I did a complete reinstall (numerous times) after I screwed up a few things. I learned a lot and have a clearer direction I want to explore. This has been a great learning experience and I am excited about the possibilities. The Samba test server looks like a winner.

I plan on building 3 server boxes on my home network:
One will be a media server probably using Plex and Kodi. I have a lot of study to do before I discuss that one.
One will be a general purpose Samba LAMP server. This will be my test machine to learn to Linux.
One will be a special project "production" machine. I have a project that I am working on and this machine will contain all that stuff. This is the machine I would like to discuss today.

The machine is a full blown RAID server with 1T of drive space. It currently has Windows Server 2008 on it and I was considering installing Windows Server Essentials 2012 R2 since I already have a copy but after playing with Samba I am changing my mind. Are there any issues installing Ubuntu Server on a RAID machine? I don't need all of the built-in functions of a Windows Server ie client backups mostly. I will install LAMP with Samba. It will have 2 maybe 3 users and a guest share. Fairly standard server stuff. All modifications and test will be done on my test server then just moved to the production server. Since this is all internal I don't really need a domain at this time but I would like to consider setting up a WEB site or VPN sometime in the future after I know more about doing it. I will want remote access to the Samba server portion and the Apache server.

I know this may seem like silly questions since this is what Linux servers do but I want to avoid pitfalls and make this a smooth setup. What I am looking for is any advice or suggestions on the hardware or setup of the server? This is all new to me so I am looking for the voice of experience.
 
Old 09-24-2017, 08:04 AM   #32
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,627

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
Quote:
Originally Posted by fal_shooter View Post
I did a complete reinstall (numerous times) after I screwed up a few things. I learned a lot and have a clearer direction I want to explore. This has been a great learning experience and I am excited about the possibilities. The Samba test server looks like a winner.

I plan on building 3 server boxes on my home network:
One will be a media server probably using Plex and Kodi. I have a lot of study to do before I discuss that one.
One will be a general purpose Samba LAMP server. This will be my test machine to learn to Linux.
One will be a special project "production" machine. I have a project that I am working on and this machine will contain all that stuff. This is the machine I would like to discuss today.

The machine is a full blown RAID server with 1T of drive space. It currently has Windows Server 2008 on it and I was considering installing Windows Server Essentials 2012 R2 since I already have a copy but after playing with Samba I am changing my mind. Are there any issues installing Ubuntu Server on a RAID machine? I don't need all of the built-in functions of a Windows Server ie client backups mostly. I will install LAMP with Samba. It will have 2 maybe 3 users and a guest share. Fairly standard server stuff. All modifications and test will be done on my test server then just moved to the production server. Since this is all internal I don't really need a domain at this time but I would like to consider setting up a WEB site or VPN sometime in the future after I know more about doing it. I will want remote access to the Samba server portion and the Apache server.

I know this may seem like silly questions since this is what Linux servers do but I want to avoid pitfalls and make this a smooth setup. What I am looking for is any advice or suggestions on the hardware or setup of the server? This is all new to me so I am looking for the voice of experience.
You do not say what KIND of RAID machine this may be. The critical factor MAY be how well supported the RAID controller is under Linux. I have found that most are as well supported under Linux as under Windows, but there are a few that are remarkably problematic. I would use a live-cd (usb or dvd using something like Knoppix or Ubuntu in live mode) to test: if you can mount and access the RAID drives in live mode it is likely to work in installed mode.

I have set up remote access to my own systems before, but generally not using standard services on standard ports. Windows protocols (and Samba uses Windows protocols) are innately insecure AND under greater pressure form "breakers". You want to make things as difficult to break into as possible. I would not allow direct SHARE access at ALL! Perhaps SSH/SFTP access only on a non-standard port AND using a VPN to create multiple levels of security and encryption.
 
Old 09-24-2017, 03:27 PM   #33
fal_shooter
LQ Newbie
 
Registered: Apr 2007
Location: Idaho
Distribution: Linux Mint
Posts: 27

Original Poster
Rep: Reputation: 0
I just took a look at the documentation that came with the machine. The machine is not branded as such but all of it's components are known brands. The system board and the case are both Intel brand and the RAID adapter is Adaptec. I may need a few newer drivers but the manual that came with it shows how to install for Windows, Red Hat, OpenServer, UnixWare, OpenUNIX. Per the manual you can boot the RAID and set it up even without an OS on the machine. I will make sure I have all the updated drivers before I get serious about setting up the machine. I need to document the hardware before I really start to set this up. Once I have all the drivers sorted I will install Ubuntu Server 16.04.3 on it. I could use the machine as is and just install a newer version of Windows Server but my goal is to get Microsoft out of my life. I know I will need to keep a few Windows machines around but I am making a serious commitment to Ubuntu Linux.

I agree and think SSH and VPN are the way to go. I only want the trusted few people to have direct access to the machine. The initial web site will be for internal use only. Once I am happy with it I will look for a hosting company and let them worry about security.

Michael
 
Old 09-25-2017, 03:15 PM   #34
fal_shooter
LQ Newbie
 
Registered: Apr 2007
Location: Idaho
Distribution: Linux Mint
Posts: 27

Original Poster
Rep: Reputation: 0
OK I just got around to setting up my RAID server. Since Ive never done RAID I may have done it wrong. When it came up for guided partitions I chose "use entire disk and set up LVM". The partitions came up as RAID1 device #126 - 159.0gb Linux Software RAID Array or SCSI3 (0,0,0) (sda) - 1.0 TB Adaptec data. I chose SCSI# instead of the first one. I think I should have chosen the first one to install the OS on the 159mb drive not the 1.0TB drive. It works the way it is but I think I could do better. Does anyone have experience with RAID install?

Michael
 
Old 09-25-2017, 03:52 PM   #35
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
To be honest, I have only played around with RAID; I have only used mdadm RAID. Currently, I only have one mdadm RAID in my setup (my secondary file server). I do not use LVM at all, although I have walked someone through an LVM install. The way the Debian installer does LVM is extremely similar to how it does RAID, so it was all very familiar to me.

It's different with hardware RAID, though. With true hardware RAID, the installer may generally see the RAID array like a single drive. You may have to go into the BIOS to set up the hardware RAID.

The way I use things, I don't find RAID useful compared to rsync backups. RAID makes sense for trying to maximize uptime if you use spinning hard drives. The idea is to have the computer still function smoothly even if one spinning hard drive fails. But if uptime is so critical, then shouldn't you be using an SSD instead? And if you're using an SSD, chances are good something else will fail before the SSD, so using a RAID may not really help...

Also, it's usually mission critical database applications where uptime is critical. For most file server uses, with only a few users, it doesn't really matter so much if the file server unexpectedly goes down once every few years. Whatever files were being edited, could be saved somewhere else or you could just wait until the file server is back up again. Typically, the rare file server failure is a drop in the bucket compared to random network failures or power failures or whatever.

So, my own preference would be to have two separate 159.0GB partitions rather than a RAID1 combined pair.

The main thing about software RAID is that you really have to understand what's going on and understand how system booting works pretty well in order to recover from a drive failure. Honestly, for a simple file server it can be simpler and easier to just avoid RAID and LVM altogether, and just do two installs on two different drives. Then, you just create the main data share on the same mount point (for example, /mnt/SHARE), and copy over /etc/exports (for nfs) and/or /etc/samba/smb.conf (for samba).

That doubles the amount of time you spend installing the initial install, of course, but it makes it dead easy to understand for a linux newbie. On the first install, you just install onto /dev/sda, and tell it to install GRUB on /dev/sda. On the second install, you just install onto /dev/sdb, and tell it to install GRUB on /dev/sdb.

That way, all you have to do is learn how to use "rsync" to sync up the data on the primary drive to the secondary drive. In case of primary drive failure, just power down and remove the bad drive. Voila! You're done! Or, if you don't feel like physically removing the bad drive, just go into the BIOS and change the boot order.
 
Old 09-25-2017, 04:39 PM   #36
fal_shooter
LQ Newbie
 
Registered: Apr 2007
Location: Idaho
Distribution: Linux Mint
Posts: 27

Original Poster
Rep: Reputation: 0
I appreciate your reply but "I'm trying to dance with the one that brung me". If I was buying new hardware I would not do RAID but I already have a used RAID server that I got for a sweet deal and that's what I'm trying to setup. It has hardware RAID via an Adaptec RAID card. I may not keep it but I do want to figure out how to set up hardware RAID. I am trying to use this as an opportunity to learn. In all honesty I will probably end up using one of my quieter, cooler, smaller, newer computers as my special purpose computer but I don't want to miss the opportunity to learn something. I did get my first computer up and running as a Samba server. My plan is to have 3 servers. I'm building a Samba file server, a Plex server and one server to just experiment and learn on. This RAID server will probably end up at my nephew's house at some point if I can get it working correctly. Thanks again. I always look forward to your advice.

Michael
 
Old 09-25-2017, 10:05 PM   #37
fal_shooter
LQ Newbie
 
Registered: Apr 2007
Location: Idaho
Distribution: Linux Mint
Posts: 27

Original Poster
Rep: Reputation: 0
Forget about the RAID question. I thought about it and agree with IssacKuo said. I am not going to bother with this RAID server. It's not worth the effort.

Michael
 
Old 09-30-2017, 02:36 PM   #38
fal_shooter
LQ Newbie
 
Registered: Apr 2007
Location: Idaho
Distribution: Linux Mint
Posts: 27

Original Poster
Rep: Reputation: 0
I have a question about adding a drive. I have one server with a 2TB drive and I want to add a 1TB drive. I installed the original drive using LVM. The drive I want to add is a used Windows drive. I tried deleting all the partitions but I can't seem to get one of them to go away. I did create a new partition on it but it would not let me use the entire drive. I haven't found a command to wipe the drive totally yet.

What I would like is start over with step-by-step instructions on how to get a used NTFS drive reformatted and working on the server. What I want to end up with is a server with 3TBs of storage space on bootup. What am I missing?

Michael
 
Old 10-01-2017, 08:06 AM   #39
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
There shouldn't be a problem removing all of the partitions if there aren't any disk errors. Or at least, I don't think so. But maybe I'm wrong.

Using gparted, there is an option to blow away the partition table and replace it with a new one. You can replace it with either MBR or GPT. I'm more comfortable with MBR myself, but it doesn't really matter which you use in this case (unless you foresee one day using this as a boot drive).

After you wipe everything out, you'll want to make it a big LVM physical volume. Then you can use LVM tools to add it to your main LVM pool and then expand you current LVM virtual volume to it. Bearing in mind that if either drive fails, all of the data on both drives is lost. But that's what backups are for, right?

I'm not familiar enough with LVM to provide the precise commands to do this.
 
Old 10-01-2017, 08:07 PM   #40
fal_shooter
LQ Newbie
 
Registered: Apr 2007
Location: Idaho
Distribution: Linux Mint
Posts: 27

Original Poster
Rep: Reputation: 0
So maybe I'm asking the wrong question again. Should I even use LVM? I don't need a big virtual volume as long as I can access the data on all the physical drives. I know in all of the Linux tutorials I've watched I can't think of one that used LVM. It seems like in all of them they did a manual drive configuration. This is going to be a plex server so when I run out of room on one drive I can setup an additional path to the other drive. For years I did that with Windows so I don't see why I can't do it with Linux. I might even be able to map to drives on different computers and run it through the PLEX server.

Since I am at the stage where I am playing with things I can try a few things without worry. If I mess up the partitions I can always reinstall and do a manual drive config insted of LVM.

Thanks again

Michael
 
Old 10-02-2017, 02:39 AM   #41
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Think of LVM as a bag of tricks that may come in useful later on, that you might regret not having prepared in the first place. Maybe.

For a server, the big headache that it solves is the very common problem of running out of disk space and wanting to add more with little or no down time. The traditional *nix way of solving this problem would be to migrate some directory of stuff to a new or different partition, and then use either a new mount, symlink, or bind mount...very kludgy and a lot of manual effort.

LVM makes it easier to just add a drive and seamlessly add the available space.

The other killer feature of LVM is snapshot ability (more recently, btrfs and some other things also provide this sort of capability). This is particularly useful for if you want to make a backup of a system before rolling out something that may break stuff and you will wish you had the ability to roll back. For something that's mainly a file server, this seems an unlikely scenario.

I mean, for a video/audio media server, I can definitely see a value for some sort of snapshot-like thing to prevent accidental mass deletion or moving of stuff. But using LVM or btrfs snapshots for this can be very unwieldy. My preference is to simply use cp with hardlinks. Something like this:

Code:
cp -val /home/kuo/stuff /home/kuo/snaps/stuff20171001
This very quickly creates a hardlink "snapshot" of stuff. Since it's nothing but hardlinks, it takes up almost no space. But if I accidentally delete a bunch of files in stuff, they'll still be there in the "snapshot". It's not a perfect snapshot system because there are ways for a file to be modified in place (such as appending to a text file) that will affect all hardlinked "copies". But for audio/video media files, that pretty much will never happen. If you're paranoid about that, though, btrfs and its reflink option will prevent that.

Personally? I have not yet ever regretted avoiding LVM. For a media server, it seems like you're comfortable with just manually juggling around two different drives. That's my own attitude also. I prefer to manually juggle around what files are in which drive. For one thing, it lets me spin down all drives except for the one with the most commonly used files.

And keeping the drives separate makes them more useful for partial backups. A hardlink "snapshot" is not truly any sort of backup at all. If a drive goes bad or a bad sector takes out a file, it takes out all hardlinked "copies" also. But keeping a true copy of more important files on more than one hard drive gives you a true backup.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Configure VPN server in Linux for Windows/Linux clients LXer Syndicated Linux News 0 08-04-2017 10:30 PM
tutorial or help - setting up partitions dual boot - Windows 7 / Linux (Mint Rosa) blueinca99 Linux - Newbie 4 01-05-2016 07:36 PM
Can I have a network w/ a Linux Server & Linux clients & a few MSFT Windows clients bhowerton Linux - Networking 1 04-21-2007 12:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration