Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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
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
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.
\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?
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.
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...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.