You are not logged in.

#1 2009-02-10 10:21:58

EmyrB
Member
From: Wales, UK
Registered: 2006-09-04
Posts: 122

Sharing a Drive from Ubuntu to Arch and Pardus

Hi All,

I have 3 Linux boxes in my house, 1 Ubuntu 8.10, 1 Arch Linux running KDE 4.2 and 1 Pardus 2008.1.

I have a 1TB drive in my Ubuntu box which I have got my music collection on. This drive is mounted permanently in /media/sda2 and has an icon on my Ubuntu desktop.

Now my daughter's PC is the Pardus box and my son's is the Arch Linux box and they want to be able to play the music on sda2 through the network.

I have tried setting up the share through NFS, but alas I cannot install nfs-common on the Arch or Pardus boxes (I think Arch has something like nfs-utils, but I am not sure if this is the same as nfs-common) and both boxes refuse to connect to the share.

I have even tried the Samba route but it refuses to share because of access issues. I assume this has to do with my permissions for the drive.

I don't want anything fancy, just read permissions. I have posted this in the Abuntu and Pardus forums to see if they can shed some light as well.

Cheers in advance

EmyrB


Proud Arch Linux User

Offline

#2 2009-02-10 12:45:57

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: Sharing a Drive from Ubuntu to Arch and Pardus

EmyrB,

if you stick to nfs, all you need on the Arch side are the nfs-utils.

Then, on /etc/fstab you will have something like:

userver:/music            /music        nfs    noauto,rsize=32768,wsize=32768,noatime,tcp

where userver is your server name if it is mapped thru /etc/hosts or DNS, if not substitute by IP number,
and "music" is the share name.

Directory "/music" on Arch musr exist.

Note: the argument "noauto"can also be "auto" to automatically mount on startup, the arguments that follow are not needed,
I just use them for my particular case.

Mektub

Last edited by Mektub (2009-02-10 12:50:45)


Follow me on twitter: https://twitter.com/johnbina

Offline

#3 2009-02-10 12:59:18

artiom
Member
From: France
Registered: 2008-07-29
Posts: 111

Re: Sharing a Drive from Ubuntu to Arch and Pardus

If your Ubuntu box can accidentally be off when for example Arch booting up auto can significantly delay the boot process. Also if your Ubuntu box shuts down while nfs share is used you can see the clients temporary "freeze" in some operation due to nfs timeouts. So take care of it.

There is more flexible way to use nfs shares which can save you from these inconveniences : AutoFS http://wiki.archlinux.org/index.php/AutoFS_HowTo

Last edited by artiom (2009-02-10 12:59:59)

Offline

#4 2009-02-10 13:46:55

EmyrB
Member
From: Wales, UK
Registered: 2006-09-04
Posts: 122

Re: Sharing a Drive from Ubuntu to Arch and Pardus

@Mektub & artiom

Thanks guys, I had a feeling that nfs-utils might be the package I needed.

I'm not sure if I want to edit fstab so that the drive is always available as sometimes my Ubuntu box is off. Is there another way, say to do it manually through a batch file or something?

Another question, is if my Ubuntu box is switched on, but not logged on will the share be available to others then?

Cheers

EmyrB


Proud Arch Linux User

Offline

#5 2009-02-10 13:55:39

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: Sharing a Drive from Ubuntu to Arch and Pardus

EmyrB,

you can do it thru AutoFS as artiom said above, or you can put it as "noauto" in fstab and mount it manually or thru
a script.

Another question, is if my Ubuntu box is switched on, but not logged on will the share be available to others then?

Yes.

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#6 2009-02-10 14:01:29

artiom
Member
From: France
Registered: 2008-07-29
Posts: 111

Re: Sharing a Drive from Ubuntu to Arch and Pardus

If your Ubuntu box is turned on it sufficient, nfs server is started during the boot.
The way to manually mount your nfs share depends on your desktop manager. For gnome you have gvfs: in the "Places" menu you have "Connect to server" or something like this.
Another way is fstab entry with noauto,user + mount applet in gnome will do the same thing without need to retype the server name, path, etc.
In  KDE you must have a similar staff.

Offline

Board footer

Powered by FluxBB