Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There is a situation:

  • I have two 1.5 TB drives
  • 1st is for backup
  • 2nd is for storage (movies, www, music etc)
  • I am going to make 3 users: storage, backup and obviously real users peter, george etc.
  • Services like samba, httpd, ftp etc. should have access to storage files

Question is:

  • Where should I mount these drives? (/var/storage/ /home/storage/)
  • What groups should I make?

I know I can mount it everywhere I like, but I am just curious what is the best practice.

I'm using CentOS 6.2

share

migration rejected from stackoverflow.com Jan 14 at 15:31

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as primarily opinion-based by Jenny D, mdpc, HBruijn Jan 14 at 15:31

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

    
These days people often put that stuff below /srv/. – James Youngman May 26 '12 at 14:20
up vote 1 down vote accepted

It is a standard practice to keep all your mount points under /mnt.

If any of your applications will need a certain directory somewhere else in the directory tree, you can always use bind mount option as in

  mount -o bind /mnt/storage/mysql /var/lib/mysql

The groups thing is less obvious. Depending on your distribution the default groups for peter and george may be the same or different. If the group is the same, a simple enough security policy would be to make all files on the storage volume group readable and group writable.

Setting umask for the users to 0022, so that they could view each others newly created files but not change or delete them.

share

Where should I mount these drives? (/var/storage/ /home/storage/)

I assume that you've already got a drive in the box which is currently providing all the storage (including swap space). Potentially you can triple your I/O throughput as well as your storage capacity.

For the purposes you suggest, then deploying the bulk of the storage on the additional drives as a RAID mirror isn't going to help redundancy - but it does mean that your backup is always up to date (if the only thing you're trying to address via backups is a disk failure) It won't help performance much for this kind of serving. Setting them up as a stripe set will improve performance - but at a big risk of full data loss if a drive fails.

Allocating swap partitions of the same size on BOTH the 2 additional drives will give you the option to tune swapping if that ever becomes an issue (probably makes sense to set the backup drive as the highest priority unless you use it for anything other than backups).

The approach I'd take, if you're explicitly intending the data disk to provide all the storage for your data, is that the (non-backup) filesystem should contain the home dirs for the users, so mounting it on /home is the sensible choice - with additional directories for shared stuff (e.g. by group) along with a directory for the webserver document root. If you've got enough space on the backup drive, then mounting it on /var will distribute the I/O better, improving performance.

What groups should I make?

erm...the right ones for your security policy.

share
    
acctionaly i have 4 drives (4x 1.5 TB) set to RAID mirror mode (2x 1.5 TB). – Peter May 26 '12 at 12:07
    
I am not sure if this is an answer to a question being asked. – cstamas May 26 '12 at 12:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.