embeded Linux CIFS file system

Source: Internet
Author: User

To be sorted: http://blog.csdn.net/yuanbinquan/article/details/51734705 Introduction CIFS (Common Internet File System)The common Internet File system for network file sharing between Windows hosts is achieved by using Microsoft's own CIFS service.

Functional CIFS You can achieve the following functions: 1. Access the server local files and read and write these files 2. Share some file blocks with other users 3. Automatically resumes connection to the network when the wire is disconnected 4. Use Unicode file name: The file name can use any character set, not limited to a character set designed for English or Western European languages.
Advantages in general, CIFS users get better control of files than FTP. It provides a potentially more direct interface to the server program, which is better than a browser using the HTTP protocol. The most typical application for CIFS is that Windows users can find other hosts on the network and access their shared folders from their web places. CIFS is an open standard and has been submitted to the IETF as an Internet application standard. The open source third-party library J-interop for Java and DCOM communication is implemented using the CIFS protocol.
CIFS vs. NFS comparison (1) CIFS network connection-oriented sharing protocol, the reliability of network transmission is high, the use of TCP/IP;NFS is independent of transmission, TCP or UDP can be used, (2) One of the disadvantages of NFS is to require the client must install special software , while CIFS is integrated within the OS without additional software, (3) NFS is stateless, and CIFS has a stateful Protocol; NFS is less affected by the failure, can self-restore the interaction process, CIFS does not work; from the transmission efficiency, CIFS is better than NFS, and there is not much redundant information transfer ; (4) Both protocols require file format conversion, NFS retains the UNIX file format features, such as all people, groups and so on, CIFS is completely in accordance with the style of win.

Use

In practice, when Linux needs to mount a directory on a window, the first thing that comes to mind is the tools such as Samba and VM tools, in fact, CIFS is the simplest use, it does not require you to install any tools, is Windows and Linux comes with features.

Window End:

First set up a shared folder on your Windows, directory E:\nfs, User: Everyone, permissions: All permissions, details are as follows:

This completes the Windows-side setup.

Linux side:

x86:

Here in Ubuntu, for example, the CIFS file system is supported by default and does not require any configuration. Mount directly using the Mount command

Use the command if you are sure that your Linux system can ping Windows systems.

#mount-T cifs-o username=everyone,password= "//192.168.88.77/nfs/mnt

User name: Username is consistent with Windows settings Everyone, password password is empty, 192.168.88.77 is the IP address of your Windows system, MNT is the Mount directory location under your Linux system

#ls/mnt

To see the shared directory on Windows.

Arm:

Here's an example of a arm9+linux system.

On embedded devices, the default kernel does not support CIFS file systems, so it is necessary to support the CIFS file system when compiling the kernel, as follows:

So the kernel supports the CIFS file system, then you can use the Mount command directly, and of course you have the same premise that your arm board must be able to ping your Windows system IP.

#mount-T cifs-o username=everyone,password= "//192.168.88.77/nfs/mnt

User name: Username is consistent with Windows settings Everyone, password password is empty, 192.168.88.77 is the IP address of your Windows system, MNT is the Mount directory location under your Linux system

#ls/mnt

To see the shared directory on Windows.

If at LS, the following error is reported:
Ls:can ' t open ': Value too large for defined data type

When you find that the "nounix,noserverino" option is added to mount, the problem is no longer present, so the complete mount command might look like this:

#mount-T Cifs-o username=everyone,password= ", Nounix,noserverino//192.168.88.77/nfs/mnt

embeded Linux CIFS file system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.