[Samba] Using smbmount and losetup

Carl-Mikael Ahlgren mail-samba at neltus.org
Fri Mar 8 11:55:03 GMT 2002


I have problem with smbmount and losetup working together. The data seems to
be corrupted. Description:

I have an NT4 server with a share. On my linux box i use smbmount to mount
the share. I have created a big file on the share and use losetup to
configure a loop-back device on which i try to create/use a filesystem.

It seems to work at first with ext2fs, but after copying some files to the
newly (via loopback) mounted device it starts to corrupt and if i unmount 
it, it will not mount again. reiserfs will not mount even the first time 
after creating the filesystem.

If I do exacly the same thing with the file lying on my local harddrive 
(without samba at all) it works perfectly. Is this a known samba problem, 
and maybe a known issue that is hard to solve, or do I just use the 
wrong parameters?

I understand that it can be very unreliable to do something like this if,
for example, the network connection is broken. But I still want to try it.

I use smbmount: "Version 2.2.2-11 for Debian"
Linux version 2.4.17 (carlis at neltus) (gcc version 2.95.4 20011006 (Debian
prerelease)) #5 tis jan 22 17:33:35 CET 2002

neltus:/mnt/server/test# dd if=/dev/zero of=test.bin bs=1048576 count=220
220+0 poster in
220+0 poster ut
neltus:/mnt/server/test# losetup /dev/loop1 test.bin
neltus:/mnt/server/test# mkfs.ext2 /dev/loop1
mke2fs 1.25 (20-Sep-2001)
[some lines cutted]
neltus:/mnt/server/test# mount /dev/loop1 /mnt/tmp

(Now it seems to work for a moment, I copy a few megabytes to the mount. 
I guess it is corrupted already but doesn't show, because of cache, 
before i mount it next time).

neltus:/mnt/server/test# umount /mnt/tmp

neltus:/mnt# mount /dev/loop1 /mnt/tmp
mount: you must specify the filesystem type

(it does not work)

I will be very glad for any type of help.

Regards, Carlis (mail-samba at neltus.org)




More information about the samba mailing list