Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
General Linux > Samba > Issue <<  17 of 98 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 4536
Last update: 05-17-07
Issue:
How do I access files greater than 2GB from a Samba share?
Resolution:

Samba shares that are mounted using smbmount (which internally uses mount -t smbfs) uses the smbfs.o kernel module. This module does not support file sizes greater than 2 GB. So any manipulation done to a file greater than 2GB will fail with a 'file size limit exceeded' error.

In addition, the server that is being mounted with smbmount must be a Red Hat Enterprise Linux server, otherwise, this procedure may not work.

The 2.4.21-*EL* kernels can pass the lfs option in the smbfs kernel module.

The common misconception about smbfs.o is that it is a part of Samba package, but it is a filesystem module for the kernel to dialogue over CIFS/SMB protocol.

Example:

If you need to copy a file to Samba Share using smbclient then use the following syntax:

$smbclient //<machine_name>/<samba_share_name> <password> -U <username> -c 'put <file_name>'

To test this:

  1. Generate a file of 2.1 gigabytes:
    # dd if=/dev/zero of=largefile bs=100M count=21
    
  2. Mount the CIFS fs:
    # mount -t smbfs //dhcp-0-222/jmp /mnt/smbfs -o username=jmp,lfs
    
  3. Copy it:
    # cp largefile /mnt/smbfs
    


How well did this entry answer your question?


good wrong incomplete out of date
General Linux > Samba > Issue <<   17  of  98  >>