[Samba] Disk full / file corrupted

Dmitry Mordovin d.mordovin at dwide.com
Mon Apr 4 03:04:40 MDT 2011


> I cannot reproduce your problem in my Samba 3.5.8 box.
>
> Anyway "strict allocate = yes" maybe solve your problem.
>
> ---
> TAKAHASHI Motonobu<monyo at monyo.com>

Hello

I prepare 50MB disk image.

The test.bmp file exists in the root of disk.

Step 1: Mount image on same server where samba:
     Disk image here:
     http://www.2shared.com/file/WPs5R8Rk/disk_ext4.html

     mkdir /mnt/test_disk_ext4

     mount -o loop disk_ext4.img /mnt/test_disk_ext4

Step 2: My smb.conf:

[global]
pid directory = /opt/samba/run
lock directory = /opt/samba/cache
private dir = /opt/samba/cache
log file = /opt/samba/smbd.log
log level = 0
workgroup = HOME
server string = Home storage
security = share
load printers = no
printcap name = /dev/null
printing = bsd
disable spoolss = yes
enable spoolss = no
show add printer wizard = no
max log size = 102400
dns proxy = no
allocation roundup size = 0
strict allocate = yes
nt acl support = no
bind interfaces only = true
interfaces = eth0
smb ports = 139
socket options = SO_REUSEADDR TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE
unix extensions = no
nt pipe support = no
map hidden = yes
hide dot files = no

[homes]
browseable = yes
printable = no

[test]
path = /mnt/test_disk_ext4
comment = ""
read only = no
guest ok = yes
follow symlinks = no

Step 3: Map shared "test" as network drive on your PC (Win XP in my 
case, Vista+ not tested)

Step 4: To reproduce problem - just edit test.bmp (Right click, choose 
Edit), set new bigger image size and save.
Paint must alert - disk space not enough / disk full.
After all - test.bmp file not readable and file size increased.

Thank you.
Dmitry




More information about the samba mailing list