Fedora Linux Support Community & Resources Center
  #1  
Old 12th March 2008, 08:49 PM
savage Offline
Registered User
 
Join Date: Jun 2005
Location: Mission Control
Posts: 1,229
Server advice... /etc /var (migrating etc.)

Hi all, I'm posting this in Linux chat, because well, it's CentOS, not Fedora, if an admin thinks suitable, could you whip this over to servers (will be better for responses, but I understand if not).

I'm building a new server, and doing a fresh install of CentOS 5, the current server has CentOS 4.5, is a bit old, and probably not configured as best it can be.

It's a home server, used for file shares, RAID'ing data, domain, NIS logins etc. gateway, test web server etc. etc.

A few questions:
  1. Can I migrate local users simply by copying /etc/passwd, /etc/shadow /etc/group to the new server?
  2. Is it best to have /etc and /var mounted to a separate partition to the root filesystem? (I've heard if you do this, you can just re-install the OS and not worry about settings).
  3. Is the swap partition better on a separate hard disk to the root partition?
  4. I probably won't anyway, but how safe would it be to use the /etc and /var from a previous version in the new?
  5. Is it worth having /var RAID'd? I will be having a 120gb RAID1 array for my documents and can spare space on this, I may also be hosting a few (relatively important) databases, which redundancy would be good for.
Hoping those sysadmins out there can point me in the right direction for doing things properly

Thanks, Savage
Reply With Quote
  #2  
Old 12th March 2008, 10:37 PM
techmatt Offline
Registered User
 
Join Date: Nov 2005
Location: In My Head (I Think)
Posts: 932
1) Yes - make sure you keep the permissions and you may want to move the home dir's as well
2)I have always had /var on a separate drive/partition I don't want to loose my FTP and web pages. The /etc I am not sure about.
3) I have always just done a separate partition on the same disk - works fine for me
4) for the most part it will work but some times the config files change from one version to the next so you might want to check change logs
5) If you data in /var is important then yes, why not?
__________________
If you know how to do something in Fedora or how to do it better, please help us at Fedora Wiki.

Registered Linux user number 433760
Reply With Quote
  #3  
Old 13th March 2008, 01:19 AM
savage Offline
Registered User
 
Join Date: Jun 2005
Location: Mission Control
Posts: 1,229
Quote:
Originally Posted by techmatt
1) Yes - make sure you keep the permissions and you may want to move the home dir's as well
2)I have always had /var on a separate drive/partition I don't want to loose my FTP and web pages. The /etc I am not sure about.
3) I have always just done a separate partition on the same disk - works fine for me
4) for the most part it will work but some times the config files change from one version to the next so you might want to check change logs
5) If you data in /var is important then yes, why not?
Thanks for the reply, I will be moving the home dir's, currently their on 2x40GBs, but I'm moving them to 2x120GBs. So if I just cp those with permissions, that should be fine?

All I have in var on the server at the moment is the BIND config files, and a few "mess about" MySQL db's, web pages, I just use the public_html user dir, in home. It's not really used for anything serious, just testing pages/PHP etc.

I will RAID /var, is it ok to symlink the /var directory? What I'll probably do is instead of RAID'ing 2 partitions on the 120gb's, is create 1 partition, and have sub-dir's for home and var, and symlink them, if thats do-able?

I might give it a test run first replacing /etc and /var from the old config, see if it breaks anything.

Savage
Reply With Quote
  #4  
Old 13th March 2008, 04:45 PM
techmatt Offline
Registered User
 
Join Date: Nov 2005
Location: In My Head (I Think)
Posts: 932
Quote:
Originally Posted by savage
Thanks for the reply, I will be moving the home dir's, currently their on 2x40GBs, but I'm moving them to 2x120GBs. So if I just cp those with permissions, that should be fine?
As long as the permissions stay the same, yes it should be fine.

Quote:
Originally Posted by savage
All I have in var on the server at the moment is the BIND config files, and a few "mess about" MySQL db's, web pages, I just use the public_html user dir, in home. It's not really used for anything serious, just testing pages/PHP etc.
I suggest moving these files to /var then make a symlink for them in your home.

Quote:
Originally Posted by savage
I will RAID /var, is it ok to symlink the /var directory? What I'll probably do is instead of RAID'ing 2 partitions on the 120gb's, is create 1 partition, and have sub-dir's for home and var, and symlink them, if thats do-able?
This should work but why not just change home directories for users to the new location?

Quote:
Originally Posted by savage
I might give it a test run first replacing /etc and /var from the old config, see if it breaks anything.
Savage
Good idea. Never hurts to verify first

I'll give you my setup and the basic setup I use for most servers I work with, might help.

Separate partitions and approximate sizes: (desktop and server useage)
/boot ~200MB (over kill but can never be to careful) umount after boot keeps anyone from trying to mess with it.
/tmp ~1GB (just something I have seen a lot, I guess it would help if a program starts writing a bunch of temp files. I don't do this my self)
swap ~2GB (more could be used but if you need more swap get more RAM )
/ the rest of the drive (normally use a 40-80 GB drive for the main system)

Separate Drive(s)
/home at least ~5GB per user more if available
/var entire drive (I normally have music, video, and copy's of all the important config files here and back up daily using cron)

This setup uses a total of three drives (could be done on one really big drive) leaving room for a cd drive. However I also have systems where there no cd drive and have an extra hard drive in it's place. This extra drive I normally use for backups and is not mounted unless the backups are running.

The file server at the repair shop (FTP and samba only) for customer data is setup like this (server use only)
hda:
/boot ~200MB
/home ~10 GB
swap 2GB
/ rest of drive ~8GB

LVM is on hdb, hdc,and hdd:
/var/ftp ~1TB
__________________
If you know how to do something in Fedora or how to do it better, please help us at Fedora Wiki.

Registered Linux user number 433760
Reply With Quote
  #5  
Old 13th March 2008, 06:54 PM
bob Online
Administrator (yeah, back again)
 
Join Date: Jul 2004
Location: Colton, NY; Junction of Heaven & Earth (also Routes 56 & 68).
Age: 69
Posts: 22,204
(moved to Servers)
__________________
Linux & Beer - That TOTALLY Computes!
Registered Linux User #362651


Don't use any of my solutions on working computers or near small children.
Reply With Quote
  #6  
Old 13th March 2008, 07:28 PM
techmatt Offline
Registered User
 
Join Date: Nov 2005
Location: In My Head (I Think)
Posts: 932
thanks Bob
__________________
If you know how to do something in Fedora or how to do it better, please help us at Fedora Wiki.

Registered Linux user number 433760
Reply With Quote
  #7  
Old 13th March 2008, 08:34 PM
savage Offline
Registered User
 
Join Date: Jun 2005
Location: Mission Control
Posts: 1,229
Thanks bob, and matt...

My basic plan for mounting was as follows (including your /var suggestion):

There will be 4 disks/partitions:
Code:
   /  - root file system, 60gb disk
   /export/data1 - 2x120gb raid1, home dirs and /var & symlink from there
   /export/data2 - 5x500gb raid5, media, disc iso's etc. 
   /export/data3 - 1x500gb random crap, ghost images of desktops etc.
I think it was a Solaris tutorial, but I read it was good practice to keep NFS exports together.

Also, I think (could be mistaken), but with soft-RAID, it would be better performance wise to have 1 md device with both home and var on, than 2 md devices for each. Any clues on that?

I like the ~/public_html for what I use it for, because it doesn't require FTP, and I literally use it for just dumping sharing stuff with friends, i.e. copy, and send url via IM, is faster for larger files than MSN file transfers.

If I do setup a proper website and host from my server, it'll get it's rightful place in /var/www.

Thanks, Savage
Reply With Quote
Reply

Tags
advice, migrating, or etc, or var, server

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Migrating Server to another machine mambara Servers & Networking 3 17th April 2009 08:43 PM
Migrating FC3 to virtual server azzid EOL (End Of Life) Versions 4 19th March 2009 09:08 AM
Advice on migrating hard drives Fmac Installation, Upgrades and Live Media 1 3rd April 2005 03:42 AM


Current GMT-time: 14:37 (Sunday, 23-11-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Lohja Photos - Paramatta Instagram Photos - Bridgwater Travel Photos on Instagram