Archive: Mount storage drive on Linux
Instructions for mounting storage drive on Linux
Please see this new message regarding the decommission of storage service.
Rice University has implemented an enterprise-class storage system for your most critical documents.
Two methods may be used to connect to the storage system on your personal computer running Linux. Both require the ability to mount the cifs filesystem type. Most distributions include this in the samba or smbfs packages. For instance, Ubuntu Linux includes support for cifs in its smbfs package. On most debian based distros, the package can be obtained by using the following apt-get command in a terminal. For Fedora based distros, use the yum command shown below. You will need root or sudo privileges.
One option is to run a command whenever you wish to have the drive mounted. Type this in a terminal:
Please note in the above command the "n" in "n-home" should be replaced with the first character of your netID. For the local mount directory, common choices are
You will probably need to be root to run this mkdir and mount command. Replace "NetID" with your personal NetID. The last argument is the local path where you want the storage drive mounted. Make sure the directory it is being mounted into already exists. After running the command, a password prompt should come up; enter the password associated with your NetID. This completes the mount process. To unmount the drive, simply execute as root:
Mount Every Boot
The second option is to have the system mount the storage drive as it boots. To do this, we will edit the file
/etc/fstab. The following lines should be added to the end of the file:
Note: If using RHEL 7, the syntax is slightly different.
//storage.rice.edu/N-home/NetID /local-storage-home/N/NetID cifs uid=NetID,rw,user,exec,credentials=/opt/ricecred,iocharset=utf8 0 0
Please note in the above /etc/fstab entry the "n" in "n-home" should be replaced with the first character of your netID and NAME should be replaced with your Linux username on the local machine.
Make sure the local directory already exists before having the system mount the drive on boot. Since you cannot enter a NetID/password as the system boots, and it would be extremely annoying to do so every time, we use a credentials file. This is the
/etc/ricecred referenced above. If you change the name or location, make sure to change the reference in the fstab file. Now we setup the credentials file. Create a file (here we use
\etc\ricecred) with the following content:
Replace NetID with your NetID and Pa$$w0rd with your password. Since this file has your NetID/password in plaintext, the right permissions need to be set on it, so that it isn't generally readable. Make sure that the root user and the root group own ricecred, and the permissions are set to read-write for the user only, and no permissions for the group and others. This can be accomplished with the following commands, run as root
The output of
ls -l /etc/ricecred should now look similar to