Ubuntu Server questions (n00b alert)

MichaelD

Lifer
Jan 16, 2001
31,528
3
76
Disclaimer: I'm a Linux n00b but I'm trying to learn.

I've installed Ubuntu Server on a system that is complete overkill for it's intended usage (file server for 3 people and backup storage) and want to optimize the system. Reloading the OS is not a problem as there is no data on the box yet. I appreciate your help.

Questions:
1. I let the installer auto-partition the drive b/c I'm clueless as to what partition actually performs what function. I know that the swap partition should normally be equal to how much RAM you have. But this box has 16GB of RAM and won't be doing much at all, so 16GB of a 128GB SSD seems like a waste of space to me.
Do I even need a swap partition? Probably, but thought I'd ask. Should I leave the swap at 16GB? If not, what size should it be?

2. I will eventually be physically installing a 4-drive, RAID5 HW array/3Ware 9650 SE RAID card. The array is formatted NTFS and the data is critical (I have a backup on an external HD). Linux reads NTFS and can share the data via SAMBA; that much I know. So the array should be plug and play. Is that correct?

Would it be beneficial to recreate the array formatted EXT4 and recopy the data from the ext HD to the array? Is there some performance hit taken when reading NTFS data, via Samba, over the network to Windows clients? Hope I explained that well enough.

Thanks for your help.
 

theevilsharpie

Platinum Member
Nov 2, 2009
2,322
14
81
1. You need swap in order to hibernate, but otherwise, I don't think it's necessary in your case. If you do need swap down the road, you can configure a swap file easily enough.

2. Linux's NTFS support works well enough for accessing local files and folder, but I'd be leary of using it for production. NTFS is not well-documented, and Linux's NTFS support is a product of years of reverse engineering. You'd be better off backing up that data and restoring it to a native Linux file system, or if that's not possible, using Windows as your file server.
 

MichaelD

Lifer
Jan 16, 2001
31,528
3
76
Thanks, Sharpie. I do have some Windows options, but was looking to try something new (and free). I have been using the trial version of Server 2012 Essentials, but I'm not forking out $400 for it.

As for the swap file, how much space do I need for hibernation?
 

lxskllr

No Lifer
Nov 30, 2004
58,514
8,785
126
As for the swap file, how much space do I need for hibernation?

It needs to be big enough to hold the contents of ram. If that's something you wanted to do, you could remove ram to make swap smaller. The amount you have is overkill for your needs, and you'll never get close to using it all, unless you take it beyond a file server.
 

beginner99

Diamond Member
Jun 2, 2009
5,283
1,699
136
have you checked your RAID card is compatible with ubuntu?

Besides that I would not bother with hardware raid. And if up-time is a non-issue then forget RAID completely IMHO. RAID is for up-time only. And if you can live with the server down for a couple of hours (eg. while you load backups), don't bother with RAID at all.
 

MichaelD

Lifer
Jan 16, 2001
31,528
3
76
The 9650SE should be Ubuntu compatible, as LSI has Linux drivers available. If it's not, I know for sure the the LSI 8888ELP that's currently in the system works.

I am a (Windows) server admin by trade and have been running IDE, SCSI and SATA HW RAID at home for 15 years, at least. It's saved my bacon many times and I'm not about to change my way of doing things now. :)

Based on my intended usage (file server) and ability with the command line (zero), I'm considering FreeNAS for my needs. I know it uses ZFS and that's a whole other ball of wax.
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
I agree that putting it on a native Linux FS will benefit you, no reason to risk NTFS.

For your usage, I would consider also using Linux software RAID if you have issues getting the drivers and utilities installed for your hardware card. With modern day hardware the overhead is so negligible that you would never notice a performance difference. It is also very to migrate to other hardware running Linux, another server for instance in case of a hardware failure. Truly plug and play if you have the raid utilities installed.

In fact, if you go down the FreeNAS route, it has built-in support for configuring Linux software RAID.
 

MichaelD

Lifer
Jan 16, 2001
31,528
3
76
Thank you, Crusty. If I went FreeNAS and decided to use software RAID, I guess I'd have to connect the HDs individually, directly to the motherboard's SATA controllers, right? Or...I could leave them attached to the HW RAID card and just create individual "single drive arrays" out of them.

ZFS has a huge learning curve; I'm reading up on it and it's completely unlike anything I've used before. I know ZFS likes a lot of memory and a lot of HDs...that's what I know at this point.

I have 16GB of memory and 4, 500GB HDs for storage. I have an SSD (or another 7200rpm HD) for the OS, but from what I've read, FreeNAS needs to run off a USB thumb drive? o_O So strange...
 

MrColin

Platinum Member
May 21, 2003
2,403
3
81
You can get away without a swap partition if you don't run any apps that need more memory than you have. Its comparable to the pagefile in windows.
 

MichaelD

Lifer
Jan 16, 2001
31,528
3
76
You can get away without a swap partition if you don't run any apps that need more memory than you have. Its comparable to the pagefile in windows.

Great, thanks. Can I just go into the "disk manager" and delete that partition, or is that something that must be done from the command line?
 

MrColin

Platinum Member
May 21, 2003
2,403
3
81
Great, thanks. Can I just go into the "disk manager" and delete that partition, or is that something that must be done from the command line?

I believe all the info you require to get rid of your swap partition is scattered on this page:
http://askubuntu.com/questions/45254/how-to-delete-a-second-swap-partition-safely

to summarize that info:
In your installed OS:
1. edit /etc/fstab (which is read by the kernel at boot time and tells it what partitions/filesystem options to use) Commenting or deleting the line for the swap partition. Make note of which partition it is, i.e. /dev/sdxx
2. Tell the OS not to use swap with the command: sudo swapoff /dev/sdxx
*substituting whatever you have in /etc/fstab
3. If you have a GUI you can then delete the swap partition with the disk utility, but you might consider using a Live DVD if you want to resize the adjacent partitions too, since the OS may not handle having its own system partitions unmounted gracefully.

**Always make backups before messing around with the filesystems