PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > linux.debian.user > sharing home directories for UML's
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
linux.debian.user debian-user@lists.debian.org.

sharing home directories for UML's

Réponse
 
LinkBack Outils de la discussion
Vieux 05/06/2007, 16h50   #1
Benedict Verheyen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut sharing home directories for UML's

Hi,

i currently have a setup in Debian that has about 8 vservers.
Now i want to move some vservers to UML.
I already have a kernel that supports them both and a test UML instance.

In my vserver setup, i have split my mailconfig. I have a vserver that
runs squirrelmail & courier, a vserver that runs exim, spamassassin &
clamav, one that runs samba and so on.
I'm not sure what the best way is to to share the home directory amongst
some of the UML servers as i would like to keep the different mail
server parts seperate as i did with vservers.

Is it possible to have an UML server that houses the home directories
and makes them available for the UML servers that handle email and thus
save emails in those share home directories?
Is samba suited to do this?

Thanks
Benedict


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 05/06/2007, 23h50   #2
Felipe Sateler
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: sharing home directories for UML's

Benedict Verheyen wrote:

> Is it possible to have an UML server that houses the home directories
> and makes them available for the UML servers that handle email and thus
> save emails in those share home directories?


Maybe mount-bind the direcotries?

mount --bind /orig/dir /dest/dir


--

Felipe Sateler


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 06/06/2007, 11h10   #3
Benedict Verheyen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: sharing home directories for UML's

Felipe Sateler schreef:
> Benedict Verheyen wrote:
>
>> Is it possible to have an UML server that houses the home directories
>> and makes them available for the UML servers that handle email and thus
>> save emails in those share home directories?

>
> Maybe mount-bind the direcotries?
>
> mount --bind /orig/dir /dest/dir
>


Indeed, that's a possibility but that would mean that the "real" home
directory should already be avaible for that uml.
I would still need a means to expose the home directories to the
different uml servers.

Regards,
Benedict


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 06/06/2007, 18h50   #4
Felipe Sateler
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: sharing home directories for UML's

Benedict Verheyen wrote:

> Felipe Sateler schreef:
>> Benedict Verheyen wrote:
>>
>>> Is it possible to have an UML server that houses the home directories
>>> and makes them available for the UML servers that handle email and thus
>>> save emails in those share home directories?

>>
>> Maybe mount-bind the direcotries?
>>
>> mount --bind /orig/dir /dest/dir
>>

>
> Indeed, that's a possibility but that would mean that the "real" home
> directory should already be avaible for that uml.
> I would still need a means to expose the home directories to the
> different uml servers.


Then mount-bind them as many times you need. Note that the mounts need to be
done outside the uml servers, since you need to reach the original
directories.
For example, suppose you have the following structure:
/srv/uml1
/srv/uml2
....
Then, to mount the local home directories to the uml dirs you would do:
mount --bind /home/user /srv/uml1/home/user
mount --bind /home/user /srv/uml2/home/user
....



> Regards,
> Benedict


--

Felipe Sateler


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 06/06/2007, 23h10   #5
Benedict Verheyen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: sharing home directories for UML's

Felipe Sateler schreef:
>
> Then mount-bind them as many times you need. Note that the mounts need to be
> done outside the uml servers, since you need to reach the original
> directories.
> For example, suppose you have the following structure:
> /srv/uml1
> /srv/uml2
> ...
> Then, to mount the local home directories to the uml dirs you would do:
> mount --bind /home/user /srv/uml1/home/user
> mount --bind /home/user /srv/uml2/home/user
> ...


The UML filesystem is inside a file so you only see a file and no
filesystem. You could mount the file (mount -o loop root_fs /mnt) and
then do the mount but you're not supposed to run an uml file with the
file being mounted somewhere.

So that solution won't work.

I'm currenly looking at these options:
* COW funtionality
* mount -t smbfs and thus having to run samba on the UML that has the
home directories
* hostfs

Any ideas are still welcome

Regards,
Benedict


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 07/06/2007, 04h40   #6
Felipe Sateler
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: sharing home directories for UML's

Benedict Verheyen wrote:

> Felipe Sateler schreef:
>>
>> Then mount-bind them as many times you need. Note that the mounts need to
>> be done outside the uml servers, since you need to reach the original
>> directories.
>> For example, suppose you have the following structure:
>> /srv/uml1
>> /srv/uml2
>> ...
>> Then, to mount the local home directories to the uml dirs you would do:
>> mount --bind /home/user /srv/uml1/home/user
>> mount --bind /home/user /srv/uml2/home/user
>> ...

>
> The UML filesystem is inside a file so you only see a file and no
> filesystem. You could mount the file (mount -o loop root_fs /mnt) and
> then do the mount but you're not supposed to run an uml file with the
> file being mounted somewhere.


Ah, I wasn't aware that was how UML worked. I assumed it was just a chroot.

>
> So that solution won't work.


Indeed

> I'm currenly looking at these options:
> * COW funtionality


That wouldn't work either, since COW usually is done on mounted filesystems
too. Also, COW would not make the changes made in one UML instance
available to the others.

> * mount -t smbfs and thus having to run samba on the UML that has the
> home directories


That is a possibility. NFS is another one.

> * hostfs


This seems like the Right Way (according to google). There is even a
tutorial on how to do this on UML's SourceForge page:
http://user-mode-linux.sourceforge.net/hostfs.html


--

Felipe Sateler


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 08/06/2007, 15h40   #7
Benedict Verheyen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: sharing home directories for UML's

Felipe Sateler schreef:

>> I'm currenly looking at these options:
>> * COW funtionality

>
> That wouldn't work either, since COW usually is done on mounted filesystems
> too.


I could make a file and then mount that as extra partition and specify
in the fstab file that the /home dir corresponds to that ubd device.
Should work.

> Also, COW would not make the changes made in one UML instance
> available to the others.

Yup that would be a big problem.

>
>> * mount -t smbfs and thus having to run samba on the UML that has the
>> home directories

>
> That is a possibility. NFS is another one.
>
>> * hostfs

>
> This seems like the Right Way (according to google). There is even a
> tutorial on how to do this on UML's SourceForge page:
> http://user-mode-linux.sourceforge.net/hostfs.html


If i want to use hostfs, i need to leave the homedirectories on the
server. But i can't use hostfs if i'm setting up the home directories
inside another UML.
Then i'm stuck with either samba or nfs.

Regards,
Benedict



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 09/06/2007, 00h30   #8
Karl E. Jorgensen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: sharing home directories for UML's

On Fri, Jun 08, 2007 at 03:30:47PM +0200, Benedict Verheyen wrote:
> Felipe Sateler schreef:
>
> >>I'm currenly looking at these options:
> >>* COW funtionality

> >
> >That wouldn't work either, since COW usually is done on mounted filesystems
> >too.

>
> I could make a file and then mount that as extra partition and specify
> in the fstab file that the /home dir corresponds to that ubd device.
> Should work.
>
> > Also, COW would not make the changes made in one UML instance
> > available to the others.

> Yup that would be a big problem.
>
> >
> >>* mount -t smbfs and thus having to run samba on the UML that has the
> >>home directories

> >
> >That is a possibility. NFS is another one.
> >
> >>* hostfs

> >
> >This seems like the Right Way (according to google). There is even a
> >tutorial on how to do this on UML's SourceForge page:
> >http://user-mode-linux.sourceforge.net/hostfs.html

>
> If i want to use hostfs, i need to leave the homedirectories on the
> server.


Also note that hostfs only works properly for the user root (i.e. root
*inside* the UML). All file operations will be performed on the host
machine under the user that runs the UML.

> But i can't use hostfs if i'm setting up the home directories inside
> another UML.


Correct

> Then i'm stuck with either samba or nfs.


They should work. Or perhaps a clustered file system that allows the
same disk to be mounted read-write simultaneously by multiple hosts.

Such a disk could be located on the underlying host (=more ubd devices
on the uml linux command line) or remotely using network block devices.

I *think* that the oracle clustered filesystem would do the trick,
although it is more geared towards holding oracle databases. One
problem though: The kernel in the user-mode-linux package has not got
ocfs2 enabled, so you'll need to recompile the package, but it *should*
work...

Hope this s

--
Karl E. Jorgensen
karl@jorgensen.org.uk http://www.jorgensen.org.uk/
karl@jorgensen.com http://karl.jorgensen.com
==== Today's fortune:
History is curious stuff
You'd think by now we had enough
Yet the fact remains I fear
They make more of it every year.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGadgFi+PVvwZpXJgRAv8aAJ445Rai2HpQinlT/FgBAxiD1K1i9gCfVflu
YLN6XGMe0rPQFVG+pLHa9GQ=
=50+P
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 11/06/2007, 08h40   #9
Benedict Verheyen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: sharing home directories for UML's

Karl E. Jorgensen schreef:
<snip>
>> Then i'm stuck with either samba or nfs.

>
> They should work. Or perhaps a clustered file system that allows the
> same disk to be mounted read-write simultaneously by multiple hosts.
>
> Such a disk could be located on the underlying host (=more ubd devices
> on the uml linux command line) or remotely using network block devices.
>
> I *think* that the oracle clustered filesystem would do the trick,
> although it is more geared towards holding oracle databases. One
> problem though: The kernel in the user-mode-linux package has not got
> ocfs2 enabled, so you'll need to recompile the package, but it *should*
> work...
>
> Hope this s


Yep,

that's another thing i could try, thanks !

Regards,
Benedict


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 11/07/2007, 17h40   #10
Benedict Verheyen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: sharing home directories for UML's

Benedict Verheyen schreef:
> Karl E. Jorgensen schreef:
> <snip>
>>> Then i'm stuck with either samba or nfs.

>>
>> They should work. Or perhaps a clustered file system that allows the
>> same disk to be mounted read-write simultaneously by multiple hosts.
>> Such a disk could be located on the underlying host (=more ubd devices
>> on the uml linux command line) or remotely using network block devices.
>>
>> I *think* that the oracle clustered filesystem would do the trick,
>> although it is more geared towards holding oracle databases. One
>> problem though: The kernel in the user-mode-linux package has not got
>> ocfs2 enabled, so you'll need to recompile the package, but it
>> *should* work...


I finally got round to testing the sharing via Samba.

I made an uml with samba & ldap so all the user & group id's over the
uml's are the same.

I then copied /home to the uml running samba and shared the home
directories.
I can then mount home in another uml like this:
smbmount //192.168.1.26/homes /home -o credentials=/root/.credentials

However, the file and directory owner is always root instead of the user
For instance my home directory on the uml containing the home directories:
drwxr-xr-x 11 benedict benedict 4096 2007-06-07 02:10 benedict

When i mount /home it in another uml:
drwxr-xr-x 1 root root 0 2007-06-07 02:10 benedict

Is there a way to get the proper user & group name?
If not, what other ways (except the oracle file system) could i use to
accomplish this?

Thanks,
Benedict

Excerpt from my smb.conf
[homes]
comment = User homes
path = /home/%U
browsable = yes
writable = yes
create mask = 0700
directory mask = 0700

[homedirs]
comment = Home Directories
#path = /home/%U
path = /home
#browseable = no
browsable = yes
writable = yes
;create mask = 0700
;directory mask = 0700
create mask = 0775
directory mask = 0775
strict locking = no
#security mask = 0775
public = yes
write list = benedict root


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 05h45.


Édité par : vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,18177 seconds with 18 queries