LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 04-02-2007, 10:52 AM   #1
Lawrentium
LQ Newbie
 
Registered: Oct 2005
Location: Netherlands
Distribution: Deb'-ian
Posts: 15

Rep: Reputation: 0
Question Linux Partitioning Question


I'm setting up a Debian Desktop PC at home which will run some services as well (vsftpd and sabnzbd).

I'm familliar enough with Linux to setup everything without problems, but I do have a question about partitioning my HD's.

This is my setup:
1x 80GB (hda)
1x 250GB (sda)
2x 32GB (hdc, hdd)

And this what I want:
hda1 10GB /
hda2 70GB /home

The rest of the HD's are used for storage only.

Now my question is, where should I mount the other 3 HD's? I want them to be accesible (read and write) for every local user, and the ftp service.

I was thinking about mounting in every home directory as '~/example'. Is this safe and possible at all?

There are probably better options around, so if you know them, please let me hear. Thanks in advance!
 
Old 04-02-2007, 11:18 AM   #2
w_r_cromwell
Member
 
Registered: Feb 2006
Location: Michigan
Distribution: RedHat9, Core6, Ubuntu5.1
Posts: 42

Rep: Reputation: 18
Hi,

I am not sure what you mean by "mounting in every home directory" but I think you mean making the drive contents available to *everybody*. The three drives will need mount points with unique names. I have similar space on a couple of my machines and I simply named the mount points /data. You could use /data1, /data2, etc. Use whatever you like. As root you can change the permissions to give everybody read and write access or just to a special group. Do the security piece for each drive.

Look at the man pages and other docs about chmod to see what you want to do about giving users rights to the drives.

I hope this helps.

Bill

Last edited by w_r_cromwell; 04-02-2007 at 11:21 AM.
 
Old 04-02-2007, 11:26 AM   #3
Lawrentium
LQ Newbie
 
Registered: Oct 2005
Location: Netherlands
Distribution: Deb'-ian
Posts: 15

Original Poster
Rep: Reputation: 0
What I mean by mounting it in every home directory is for example mounting sda1 on ~/datadisk. I'm familiar with chmod, chown etc, so that isnt really the problem.

I'm just curious to how people mount their HD's in different setups. I simply want to be able to reach every partition (except / ofcourse) using the ftp service.
 
Old 04-02-2007, 12:40 PM   #4
perry
Member
 
Registered: Sep 2003
Location: USA & Canada
Distribution: Slackware 12.0
Posts: 978

Rep: Reputation: 30
i would strongly recommend that you segragate the root \ from the rest of your partitiions, this will require you setup the following in their own partitions

\usr (with the space you have, at least 10 gig)
\var (1 gig)
\home (at least 10 gig)
\opt (10 gig)
\tmp (1 gig)
\usr\local (10 gig)
\var\log (1 gig)

the reason for this is that if the \ ever gets trashed, the rest of your installation is secure.

also, setup an archive partition

\mnt\archive

or even special partitions to handle things like cd/dvd authoring

\mnt\authoring

also, setup you external hard disk with a dedicated partition

\mnt\{name brand of external drive}

in my case it's a maxtor

\mnt\maxtor

you can have a lot of fun setting up dedicated partitions and there are packages out there like system commander that can allow you to resize partitions at the boot level as well as have a windows partition there for gaming purposes

have a great day

- perry

Last edited by perry; 04-02-2007 at 12:41 PM.
 
Old 04-02-2007, 12:53 PM   #5
Lawrentium
LQ Newbie
 
Registered: Oct 2005
Location: Netherlands
Distribution: Deb'-ian
Posts: 15

Original Poster
Rep: Reputation: 0
Ok, I'll setup using the partitions stated above. I would just like to know where I should mount the remaining disks (sda, hdc and hdd).

Thanks!
 
Old 04-02-2007, 01:15 PM   #6
anon104
Member
 
Registered: Apr 2007
Posts: 31

Rep: Reputation: 15
if i understood well, what you mean by mounting partitions in every home directory is having a mount point for every partition in every user's home directory.
for example, for user1 you would like to have /home/user1/part1 and for user2 /home/user2/part1. did i guess? well, this is possible (or at least is the only way i know) if users mount partitions manually at every login. this means that each time a user logs in he must type the following command as root: "mount -t ext3 /dev/hda1 /home/user1/data1" where -t specifies the partition type (in this case ext3) /dev/hda1 the partitions driver file in the /etc folder and /home/user1/data1 the mount point. though i am not sure users necessarily get write permissions to the partitions just because they are mounted in their home folder
 
Old 04-02-2007, 02:05 PM   #7
Lawrentium
LQ Newbie
 
Registered: Oct 2005
Location: Netherlands
Distribution: Deb'-ian
Posts: 15

Original Poster
Rep: Reputation: 0
Sorry, but I think I'm not clear enough... What I'm trying to say is if it is possible to mount a disk using fstab, using the location '~/example', where example is the mount directory.
 
Old 04-02-2007, 02:05 PM   #8
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Quote:
\usr (with the space you have, at least 10 gig)
\var (1 gig)
\home (at least 10 gig)
\opt (10 gig)
\tmp (1 gig)
\usr\local (10 gig)
\var\log (1 gig)
10GB for /usr? You would have to install all 20 something cds to use that up. And 1GB for var is way too little if you ever want to run one or more databases; and then var also holds your mail and software packages... tmp should be bigger, too, if you ever need to do any serious compiling. 10GB for opt? If you already have a 10GB /usr?

http://www.pathname.com/fhs/pub/fhs-2.3.html#PURPOSE14

Btw, what's with the backslashes? Been bitten by rabid Bill?

Last edited by jay73; 04-02-2007 at 02:06 PM.
 
Old 04-03-2007, 04:38 AM   #9
rcase5
Member
 
Registered: Apr 2004
Distribution: Fedora & Debian
Posts: 38

Rep: Reputation: 15
I'll take a stab at this...

I think I understand what you are saying...

You have the following users:
user1
user2
user3

They all have their own home directory (of course).

You also have three extra disks:
volume1
volume2
volume3

You want your users to be able to access the disks by typing:
cd ~/volume1
cd ~/volume2
cd ~/volume3
...both logged in a shell or via an FTP session. Right?

Assuming I understand you, the easiest way to do this is to have the disks mounted in one place (like "/mnt/volume1", "/mnt/volume2", etc.), and then do a symbolic link in each of the home directories to each of the volumes. The problem with this is some FTP daemons have a problem when you try to change to those symlinked directories, vsftpd for one. By default, vsftpd chroots the users to their home directory and does not allow people to go outside their home directory. Trying to cd to a symlinked directory as explained above breaks the chroot constraint and is not allowed. You could have all the user's chroot to "/" and then give your ftp daemon a list of directories people are not allowed to go to, but that's kind of a hassle and could still be a security risk.

It is also possible to create a "volume1", "volume2" and "volume3" directory in each user's home directory and use them as a mount point. You can then go into fstab and have the system do the various mountings. But you need to do this one mount per line. So, in this scenario, you would have something like this:
/dev/hdb1 /home/user1/volume1
/dev/hdc1 /home/user1/volume2
...
/dev/hdb1 /home/user2/volume1
/dev/hdc1 /home/user2/volume2
...etc...

In essence, you are mounting your disks multiple times, one time for each user you have on your system. This could get messy if you need to unmount one of these volumes for some reason. But the short answer to your question is, yes, you can do it the way you described.

I would also recommend one change to your partitioning scheme. I HIGHLY recommend that you consider using one of your disks as "/home", in additon to having separate partitions for "/", "/var", "/tmp", etc. on your first disk. If the disk that has your "system stuff" goes south for whatever reason (head crash, etc.), all you have to do is replace the system disk, reinstall the OS, and all of your user's home data is still intact. And, chances are, your users probably won't even notice your system had a catastrophic failure (unless a utility or program that was there before suddenly isn't there and got missed during the reinstall). I can't tell you how many times this scheme has saved my neck, not to mention the number of hours it saves if I need to reinstall a system and not necessarily having to do a backup and/or restore of "home" data. It's worth considering. I personally will not run a linux system without having one "system" disk and one "home" disk.

Hope this helps,

Robert...
 
Old 04-03-2007, 07:00 AM   #10
Lawrentium
LQ Newbie
 
Registered: Oct 2005
Location: Netherlands
Distribution: Deb'-ian
Posts: 15

Original Poster
Rep: Reputation: 0
@Robert

You pretty much explained exactly what I want. I will be reinstalling the system soon anyway so I'll add the extra partitions as well.

I've been thinking about my ftp setup and I think I'll just deny ftp access for local users, and hook up vsftpd with a small mysql user database which are chrooted in the /mnt directory where I'll mount the storage volumes.

If anyone has better ideas, all ideas are welcome...
 
  


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
Question about un-partitioning Win XP from Linux CoffeehouseSchmuck Linux - Hardware 2 07-17-2006 01:48 PM
re-partitioning question shilo Slackware 8 07-16-2004 04:36 AM
Question about partitioning Royle Linux - Newbie 5 04-19-2004 05:03 PM
Question about Linux partitioning Flak Pyro Linux - General 3 03-02-2004 08:20 PM
Newbie with question on partitioning linux red hat file systems... marvc Linux - Networking 2 03-14-2003 04:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:40 PM.

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