Jump to content

I'm getting a second computer [solved]


santner
 Share

Recommended Posts

Basically I have stumbled across a second computer and I would like one to be a server for my website and the second to be for my home computing stuff. However, this is where it gets tricky (IMHO) I would like to have my home, Pictures, Music and Video directories mounted on both systems at the same time so that a change on one shows up on the other.

 

I am not new to linux but I am new to networking and Samba which I think is what I need to accomplish this. My question is this: Is this a good idea? Has anyone done this or is currently doing this?

 

My setup will be behind a linksys firewall. Any input would be helpful. :P

Link to comment
Share on other sites

For starters, try this in your browser (works in konqueror):

 

fish://user@my.second.computer

 

(use proper user name and computer name or IP address). This should give you access to your home dir on the second computer. This does not require samba.

 

You can have one or several harddrive partitions of the networked computer mounted on another computer. This is called NFS or network file system. To mount a partition over the network, you can use the mount command, look at man mount. If you wish to have NFS mounted on start up you will need to edit the partition configuration file /etc/fstab.

Link to comment
Share on other sites

Let's say the /home partition is physically located on PC1. If you want to access and mount it on PC2, you'll have to export it from PC1, using a protocol that preserves file-permissions. Standard on Unix is to use NFS. Both export (PC1) and mount (PC2) should be doable with GUI using Mdk Control Center.

 

Yves.

Link to comment
Share on other sites

If you use a common home you can get problems .. (non of which are insurmountable) but for what you are doing you can use a shared drive...

 

what I do is have a /mnt/media on one and export this to the others. (180GB)

I keep the same homes else desktops get messy etc with different screen resoluitions

 

I do this from my Xbox to my server which has all my media

 

assuming you have #1 server and #2 client

on #1

assumes you have nfs server installed (urpmi)

decide a partition to share lets say /mnt/media

mount the partition normally (assuming here its a partition hda6)

 

mount /dev/hda6 /mnt/media -o rw

then export it

vi /etc/exports

/mnt/media #2 (where #2 is the IP address or name of #2 if its in the /etc/hosts)

exportfs -ra (reread all export table)

 

then on #2

mkdir /mnt/media

mount #2://mnt/media /mnt/media -ow rw -t nfs (again #2 is IP or name)

 

edit the /etc/fstab so that this is automounted on bootup and check nfs server is started at boot in the services on #1

Link to comment
Share on other sites

santner: is that good for you too?

 

Im assuming you want to share certain files but if you share the desktop .kde or .gnome etc you can end up in a bit of a mess...

 

This way prevents the automatic-stuff from being shared when you dont want and you can go firther and make symbolic links in your homes..

I have a symlink called media

so

cd /home/media actually takes me to the nfs mounted drive and this is then shared and I have all my mp3, photo's and movies

I also make a downloads and Documents so I can share these too.

 

in other words stuff you consiously create I share and stuff like the .kde I dont...

Link to comment
Share on other sites

ok. I have edited my /etc/exports file to include all of the directories that I want to mount over the network. I have also checked in MCC->System->Services and nfs is started and has a check to start on boot as does portmap.

 

From searching around google I have seen articles talk about exportfs, rpc.mountd, rpc.statd etc however I do not have these on my system?!?

 

When I try to mount from PC 1 to PC 2 I get:

mount: 192.168.1.142:/mnt/Video3 failed, reason given by server: Permission

denied

 

and when I try to mount from PC 2 to PC 1 I get:

mount: RPC: Program not registered

 

 

????

Link to comment
Share on other sites

OK you need to unmount to do this....

first check the /etc/exports

make sure you have a * or the actual IP named.... for the export

I cant remember the name of the server in Mandrake of the top of my head...

(in Debian its nfs-kernel-server but its something different in MDK)

I can check much later when I get home (on a MDK box) or someone else might lnow or you can use add programs and search on nfs

 

second if you created the directories as root they probably dont have permissions

look at it like this...

NFS is transparent...it doesnt matter they are on different machines except... if you have different userid's (even if the name is the same)

 

so make sure a user with the same uid/gid can actually mount them and unless you use the root_squash option that means explicitly setting them..

 

At home I just make them owned by nobody:nobody and chmod 777

Link to comment
Share on other sites

ok, I figured out that I had one computer that had nfs-utils installed and the other one did not. So I urpmi'd nfs-utils, rebooted both computers and finally it worked.... sort of.

 

Now what is happening is that if I mount my /home directory on my second computer BOTH linux installations begin to act strange. By that I mean that I can only open ONE instance of a program, any program. If I try to open a second instance of the same program it shows like it is starting up in the taskbar for about 5 seconds and then it disappears and nothing happens. Any ideas on what this could be? Both computers are using KDE? Maybe I should use KDE on one and gnome on the other?

 

:wall:

Link to comment
Share on other sites

If you use a common home you can get problems .. (non of which are insurmountable) but for what you are doing you can use a shared drive...

 

If you really mean home then this is why, they probably have different stuff in .gnome ...

 

The safest way is to have 2 seperate homes and then a /shared (or whatever you wanna call it

 

you can even symlink /shared to a directory in home like

 

ln -s /home/you/shared /shared (check i have that the right way round)

it should make a directory called shared in your home (if your username was you) .. then from home you can just

cd shared....

Link to comment
Share on other sites

I thought this also. So before I mounted the network /home I deleted my .kde directory on my second computer. I then mounted the network /home directory and it seemed to work at first... What is also strange is that after having these problems I rebooted and the .kde directory that I deleted permanently (rm -fr .kde) was back?!?

Link to comment
Share on other sites

yep its autocreated... as KDE starts if it doesnt exist it creates it...

 

Id honestly get a seperate /media or /files or something going first and then work on this slowly..

 

Im sure it CAN be dealt with but the questions is is it worth it..

For instance you can change the .kde directory to something else.. I dont know how but I know you can becuase you can edit the source and recompile worst case (tho im sure its easier than that)

 

anyway, get comfy with nfs first... then start to for instance move your .mozilla directory and then set mozilla (or thunderbird or opera etc.,) to use the new dir...

 

incremental is the way to do this without screwing up... IMHO

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...