Mounting Shared Storage in Linux
This sidebar explains how to set up a shared disk, such as Maxtor Shared Storage, so that it is visible to a Linux computer.
The shared device can be seen both locally, while sitting at a Linux desktop,
and remotely via the methods shown in the main article (editor: insert link
here).
Within the Maxtor control panel, set up a storage account and transfer
whatever files you want into it. This shared folder initially appears to Linux
as if it were a folder on a Microsoft Windows machine. But you also can mount the
shared folder so its contents appear to be native to the Linux system's
directory tree, using the command smbmount.
For example:
smbmount //networkhd/Charles network_docs.
//networkhd/Charles is the name of the
shared folder on the Maxtor device, and network_docs
is the name of the Linux folder you are mounting it to. Note that network_docs must already exist and can have other files in it.
Those files will be hidden for the duration of the mount. Also note that this
folder inherits permissions, an owner, and a group based on which user mounted
to it. These permissions are only for the duration of the mount.
The permissions of /usr/bin/smbmnt affect who
is able to mount these network folders. For write permission mounting of any
network folders by users, the permissions need to be relaxed. Set the
permissions of /usr/bin/smbmnt to -rwsr-x--- with owner root and group samba. This way, only people in the group samba can run it, but when they do, they will run it as root, allowing them to mount it with
write permissions. Of course, this
requires that you create the group samba and add users to it.
To make this folder mount on startup, you can add it
to /etc/fstab, which holds all of the device mounting information. Add a line
like the following at the end of /etc/fstab:
//networkhd/Charles /home/connellcharles/network_docs
smbfs auto,username=,password=,uid=connellcharles,gid=users 0 0.
The first entry is the device name; the second is the
mount point; and the third is the file system type. auto is the mounting
behavior; it means that it mounts when all devices are mounted on boot, or when
mount -a is issued. The
username and password are the credentials to the network device. The example
above has no credentials. The uid and gid are the user and group that are
listed as the mount point's desired owner and owning group. The mount point
will change permissions at mount time to reflect these settings. The last two
zeros are values used by the file system management utilities.
For more information, see man fstab.
Charles Connell IV is a high school student in Bedford, MA. He can be reached at
charles@connells.org.