Mount NAS Storage in Linux Overview 转载
2013-09-22 15:41
337 查看
Mount NAS Storage in Linux
OverviewMounting
your NAS Storage to a device that runs on a Linux-based Operating
System can be done using a series of simple commands in the shell or
terminal within the OS. This procedure outlines the steps required to
mount NAS Storage on any of the following operating systems:
RedHat Enterprise Linux
CentOS
CloudLinux
Debian
Ubuntu
Please note that while the majority of steps apply to all of the
operating systems listed above, the commands required to determine if
your CIFS utility is installed on Debian and Ubuntu are unique. Follow
the steps below to mount NAS Storage to your Linux-based OS.
Mount NAS Storage
Determine if the OS on your device is RedHat Enterprise Linux, CentOS or CloudLinux -OR- Debian or Ubuntu.
If your device is running… | Then… |
RedHat Enterprise Linux, CentOS or CloudLinux | Determine if the cifs-utils utility is installed by running the following command: root@slnastest [~]# rpm -q cifs-utils Note: If cifs-utils is not installed, the following message will appear: package cifs-utils is not installed If cifs-utils is installed, proceed to the next step. If cifs-utils is not installed, install the utility using the following command: root@slnastest [~]# yum install cifs-utils |
Debian or Ubuntu | Determine if the cifs-utils utility is installed by running the following command: root@slnastest:~# dpkg-query -S cifs-utils Note: If cifs-utils is not installed, the following message will appear: dpkg-query: no path found matching pattern *cifs-utils*. If cifs-utils is installed, proceed to the next step. If cifs-utils is not installed, install the utility using the following command: root@slnastest [~]# apt-get install cifs-utils root@slnastest:~# dpkg-query -S cifs-utils cifs-utils: /usr/share/doc/cifs-utils cifs-utils: /usr/share/doc/cifs-utils/changelog.gz cifs-utils: /usr/share/doc/cifs-utils/NEWS.Debian.gz cifs-utils: /usr/share/doc/cifs-utils/changelog.Debian.gz cifs-utils: /usr/share/doc/cifs-utils/copyright |
mkdir /local/mountpoint
mount
-t cifs //Hostname/Username -o
username=username,password=password,rw,nounix,iocharset=utf8,file_mode=0644,dir_mode=0755
/mnt
Example:
root@slnastest [~]# mkdir /mnt/nas
root@slnastest [~]# mount -t cifs
//nas05.service.softlayer.com/SL12345-1 -o
username=SL12345-1,password=NASPASSWORD
rw,nounix,iocharset=utf8,file_mode=0644,dir_mode=0755 /mnt/nas
root@slnastest [~]# df -Th /mnt/nas/
Filesystem Type Size Used Avail Use% Mounted on
//nas05.service.softlayer.com/SL12345-1
cifs 54T 49T 5.3T 91% /mnt/nas
mount
-t cifs //Hostname/Username -o
username=username,password=password,rw,nounix,iocharset=utf8,file_mode=0644,dir_mode=0755
/mnt
Example:
root@slnastest [~]# mkdir /mnt/nas
root@slnastest [~]# mount -t cifs
//nas05.service.softlayer.com/SL12345-1 -o
username=SL12345-1,password=NASPASSWORD
rw,nounix,iocharset=utf8,file_mode=0644,dir_mode=0755 /mnt/nas
root@slnastest [~]# df -Th /mnt/nas/
Filesystem Type Size Used Avail Use% Mounted on
//nas05.service.softlayer.com/SL12345-1
cifs 54T 49T 5.3T 91% /mnt/nas
Determine if the NAS should mount on reboot.
If the NAS should… | Then… |
Mount on reboot | Add the following command to the /etc/fstab file: //nas05.service.softlayer.com/SL12345-1 /mnt/nas cifs defaults,username=SL12345-1,password=NASPASSWORD 0 0 |
Not mount on reboot | Proceed to the next step. |
correctly. Refer to the table below for the unmount and mount commands.
Action | Command |
Unmount the NAS | root@slnastest [~]# umount /mnt/nas/ root@slnastest [~]# df -Th /mnt/nas Filesystem Type Size Used Avail Use% Mounted on /dev/xvda2 ext3 25G 4.6G 19G 20% / |
Mount the NAS | root@slnastest [~]# mount /mnt/nas/ root@slnastest [~]# df -Th /mnt/nas/ Filesystem Type Size Used Avail Use% Mounted on //nas05.service.softlayer.com/SL12345-1 cifs 54T 49T 5.3T 91% /mnt/nas |
相关文章推荐
- Mount NAS Storage in Linux Overview 转载
- linux挂载iso镜像时报错的解决方法 mount: can't find cdrom in /etc /fstab or /etc/mtab
- linux_How Do I Access or Mount Windows/USB NTFS Partition in RHEL/CentOS/Fedora
- linux挂载iso镜像时报错的解决方法 mount: can't find cdrom in /etc /fstab or /etc/mtab
- linux挂载iso镜像时报错的解决方法 mount: can't find cdrom in /etc /fstab or /etc/mtab
- [转载]【Linux学习笔记】Linux C中内联汇编的语法格式及使用方法(Inline Assembly in Linux C)
- 转载自wiki:Run Nutch In Eclipse on Linux and Windows nutch version 1.0
- (OK) using persistant storage in linux kernel - /sys/fs/pstore/console-ramoops
- 【转载】How to Reset USB Device in Linux
- 转载:linux的mount(挂载)命令详解
- 【转载】linux下的mount命令详解;
- 转载:Setting Up ADB/USB Drivers for Android Devices in Linux (Ubuntu)
- How to Mount and Unmount Filesystem / Partition in Linux (Mount/Umount Command Examples)
- Superblock mount time is in the future(转载)
- Linux下的mount命令使用方法(转载)
- 关于linux内核 linux-2.6.34 编译报 unable to find suitable fs in /proc/mount,is it mounted? 问题说明
- linux mount远程磁盘(转载)
- (OK) using persistant storage in linux kernel - /sys/fs/pstore/console-ramoops .
- 【转载】How To Find IP Conflicts In Linux
- Overview of Retry Policies in the Windows Azure Storage Client Library