# Samba  "filesystem full"



## SingerMan (Mar 29, 2009)

Guys, help a newbie please.

My FreeBSD is on its own drive:  /dev/da0. 

I wanted to use FreeBSD as a Samba server for backup all files, FreeBSD, Linux, and windows.

So I setup Samba and installed the fusefs port.

I added a new 500GB drive to use for backup â€“ 400GBs of it is a Samba share:  / dev/ad4s1

I had to mount the Samba share somewhere so I mounted it as /usr/home/ntfs-part.

So I started putting data on the Samba share and after a while I got the â€œfilesystem fullâ€ message.  I did a df â€“h and see that the /usr slice which was 7% full after installation is now 96% full.  !??!

Only 8% of the Samba share drive is filled. Since the data is going on the separate Samba drive, not in /usr/home/ntfs where itâ€™s mounted â€“ why am I getting this message? And what can I do?


----------



## SingerMan (Mar 30, 2009)

Nobody?

Let me try to rephrase.

I have two disk in my FreeBSD server. One is the OS drive: 36GB SCSI /dev/da0. 

One is a 500GB SATA drive. I made a 400GB partition on it to use as a Samba share so that my XP boxes can do backups and store data there.  I have it mounted on:  /usr/home/ntfs-part. (Yes, itâ€™s formatted as NTFS)

I backed my 1st XP box (32GBs) using _Acronis True Image_, saving it to the Samba share. That left 368Gs free.

I was about to add another 22GB backup from another XP machine, again saving the _True Image_ backup of that XP box to the Samba share â€“  and I started getting â€œfilesystem fullâ€ errors. I did a _df - h_ and noticed that my /usr partition is suddenly 96% full.

Why?  How can that be when the Samba share has 375GBs of free space available?


----------



## SirDice (Mar 30, 2009)

SingerMan said:
			
		

> One is a 500GB SATA drive. I made a 400GB partition on it to use as a Samba share so that my XP boxes can do backups and store data there.  I have it mounted on:  /usr/home/ntfs-part. (Yes, itâ€™s formatted as NTFS)


The disk doesn't need to be NTFS to allow you to share it using samba. Just use the standard UFS filesystem.


----------



## SingerMan (Mar 30, 2009)

Hello SirDice, and thank you for the reply.

OK. It could be UFS. Iâ€™ll remember that. But is _that_ the reason I'm getting that message?? There is nothing innately wrong with using NTFS on a share, no? Isnâ€™t that why fusefs was created?

My real question is why am I getting â€œfilesystem fullâ€ messages? Its keeping me from putting more data on the Samba drive. The message seems related to the /usr partition. But the data is on the other drive -- the Samba share, and it has lots of free space. 

_Thatâ€™s_ what I like to understand and correct 1st.


----------



## SirDice (Mar 30, 2009)

Writing on NTFS is still quite prone to errors. I'm also not sure if samba can handle that type of filesystem. Which may be the reason for the strange errors.

Can you post your smb.conf?


----------



## DutchDaemon (Mar 30, 2009)

Post output of 'mount', 'df -h' and 'cat fstab'.

Does unmounting /usr/home/ntfs-part magically revert /usr to 75%?


----------



## SingerMan (Mar 30, 2009)

DutchDaemon thank you.  Hope this helps:


*fstab:*

```
# Device		Mountpoint	FStype	Options		Dump	Pass#
/dev/da0s1b  		none	  	swap  	sw		  0	0
/dev/da0s1a		/		ufs	rw		1	1
/dev/da0s1e		/tmp		ufs	rw		2	2
/dev/da0s1f		/usr		ufs	rw		2	2
/dev/da0s1d		/var		ufs	rw		2	2
/dev/acd0		/cdrom		cd9660	ro,noauto	0	0
/dev/ad4s1              /usr/home/ntfs-part   ntfs-3g   defaults      0          0
```

*df -h:*

```
/dev/da0s1a    496M     138M     318M     30%    /
devfs          1.0K     1.0K     0B       100%   /dev
/dev/da0s1e    496M     12K      456M     0%     /tmp
/dev/da0s1f     28G     25G      1.1G     96%    /usr
/dev/da0s1d    1.9G     164M     1.6G     9%     /var
```

Smb.conf:

 Sorry, I could find the method of entering long sections of text as a â€˜scrollâ€™ to save space on this site.  I think probably the just want to see the  main parts of  the â€˜globalâ€™ and â€˜shareâ€™ sections anyway. So:


```
[global]

# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
   workgroup = Poettech
   netbiosname = Unix-Leader
# server string is the equivalent of the NT Description field
   server string = FreeBSD Samba Server

# Security mode. Defines in which mode Samba will operate. Possible 
# values are share, user, server, domain and ads. Most people will want 
# user level security. See the Samba-HOWTO-Collection for details.
   security = user

# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
;   hosts allow = 192.168.1. 192.168.2. 127.

# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
   load printers = yes



#========== Share Definitions ===============

[Interchange]
   comment = Sean - private
   path = /usr/home/ntfs-part
   valid users = Sean
   public = No
   writable = Yes
   printable = No
   

[homes]
   comment = Home Directories
   browseable = no
   writable = yes
```


----------



## DutchDaemon (Mar 30, 2009)

The output of df -h suggests that /dev/ad4s1 is not mounted. If that was the case when you made backups, stuff will have ended up in the physical /usr partition. Does 'mount -a' followed by 'mount' or 'df -h' show /dev/ad4s1 as mounted?


----------



## SingerMan (Mar 30, 2009)

"mount -a"  gives: " fstab: /etc/fstab:8: Inappropriate file type or format"

Followed by "mount" /dev/ad4s1 dosen't show up.

oh, boy. :r

I suppose that  explains the obvious -- why /usr is suddenly 22GB fuller!

When I installed the fusefs port it seemed to complete without errors. Files seemed to go where they should be in /usr/src/sys.

Now what?


----------



## DutchDaemon (Mar 30, 2009)

Does 
	
	



```
mount -t ntfs-3g /dev/ad4s1 /usr/home/ntfs-part
```
 or 
	
	



```
mount_ntfs-3g /dev/ad4s1 /usr/home/ntfs-part
```
 actually work?

For the record: I know nothing about fusefs, I'm just reading some docs here and there. Try to find out whether the problem is with the port or with the fstab syntax, or something else.


----------



## SingerMan (Mar 31, 2009)

DutchDaemon said:
			
		

> Does
> 
> 
> 
> ...



I get: â€œOperation not supported by deviceâ€ Which means, of course, that the kernel _doesnâ€™t_ have support for the file system. Again, when I installed the fusefs port, it finished without giving me any errors.

Iâ€™ll have to try to figure out the fusefs issue or just format the partition as UFS and get it over with. (Iâ€™d heard that the programmers at the fuse org. had finally gotten the bugs pretty much worked out. Itâ€™s probably my lack of experience too.)

My original reasoning was that if I used a Samba-mounted NTFS partition for Windows backup, then, no matter what, I could always just put the drive into an XP box and have my files and backups available. (And of course, I wouldnâ€™t have to pay the exorbitant fees for a Windows server OS.)

So, Iâ€™ll do some more reading, trial and error, etc, etc.

Thanks for trying to help.

Iâ€™ll post the outcome later.


----------



## ale (Mar 31, 2009)

Try `# kldload /usr/local/etc/rc.d/fusefs forcestart` then try mounting again.
If it works, add _fusefs_enable="YES"_ in /etc/rc.conf to have the module loaded automatically on boot.

As suggested, I would not use ntfs. You can eventually recover your data from your ufs partition on windows using ufs2tools

Have also a look at /usr/ports/sysutils/fusefs-ntfs/files/README.FreeBSD


----------



## SirDice (Mar 31, 2009)

fusefs is a usermode solution, not sure if it'll actually work using fstab.


----------



## ale (Mar 31, 2009)

SirDice said:
			
		

> fusefs is a usermode solution, not sure if it'll actually work using fstab.


This is described in the readme I've pointed in the previous post.


----------



## SingerMan (Apr 1, 2009)

DutchDaemon and ale, thanks

I discovered what the problem was last night. I had to work today, so I've just got a chance to post back as promised.

The issue:

Apparently, the 7.x series has a fixed list of external mounts. Users need to create a symlink from ntfs-3g to mount_ntfs. Then, in fstab, you use the ntfs designation for FStype and rw, late under options. 

This looks more like the df -h I needed to see: eh?


```
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/da0s1a    496M    138M    318M    30%    /
devfs          1.0K    1.0K      0B   100%    /dev
/dev/da0s1e    496M     12K    456M     0%    /tmp
/dev/da0s1f     28G    2.1G     24G     8%    /usr
/dev/da0s1d    1.9G    164M    1.6G     9%    /var
/dev/fuse0     391G     29G    362G     7%    /mnt/windows
```

And:

```
/dev/ad4s1		/mnt/windows	ntfs	rw,late		0	0
```



All is well; I am learning, and UNIX is cool


----------



## tekkon (Aug 21, 2009)

I was interested to try this out but gotten trouble with symlinks. I thought talking about symlink issues here would be OT so I created a new thread for it.


----------

