iT邦幫忙

0

Linux 上 Samba 上傳有檔案大小限制!?

Linux 上 Samba 上傳有檔案大小限制!?

請問各位大大

小弟最近發現, 我架的Samba server 只要上傳約2gb檔案就會出現異常中斷, 系統是說無法寫入

請問這是我ext3 格式有問題還是samba buff不足引起!?

請問有人有遇過嗎!? 該怎解呢!?

另外想請教一下 linux 有種磁區格式是專放大檔案用的, 請問這格式叫什!?

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中
4
mikeko
iT邦新手 1 級 ‧ 2012-07-12 10:34:39

有一種東西叫作 Google...忙

During the time of transfer file between two linux machines, if you get this error - its seems like 2 GB File size limited - The error show something like this :

"File size limit exceeded"

To resolve this issue on Linux first Make sure you are using the Samba Version 3.0+

Your server need to support LFS (Large File System).

Try this command.

smbmount //remoteserver/backup /mnt/backup -o username=admin,lfs

Also check

ulimit -a

and the result of the file size must of "file size (blocks, -f) unlimited"

If you see like this, then :

$ ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited file size (blocks, -f) max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 stack size (kbytes, -s) 10240 cpu time (seconds, -t) unlimited max user processes (-u) 4089 virtual memory (kbytes, -v) unlimited
edit your /etc/security/limits.conf and make it unlimited and the result should be

$ ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 stack size (kbytes, -s) 10240 cpu time (seconds, -t) unlimited max user processes (-u) 4089 virtual memory (kbytes, -v) unlimited
Hope this information will be useful to resolve this issue.

忙

10
wiseguy
iT邦超人 1 級 ‧ 2012-07-12 10:56:36

ext3 單檔最大可到 2TB (http://en.wikipedia.org/wiki/Comparison_of_file_systems),所以不會只到 2GB 就不能存。請先確定下面兩件事:

  1. 你是否使用 Samba 3.0 版以上?
  2. 確定你的 Linux 沒有限定單檔最大 size (請下 ulimit -f 命令看看)

linux 專門放大檔的磁區格式?上面那個表你查查看,linux 檔案系統應該都有到 TB 級,你需要單檔可以多大呢?

ck123 iT邦新手 5 級 ‧ 2012-07-12 18:38:00 檢舉

小弟的samba 是3.5版
ulimit -f 出現 unlimited

我的檔案約2~5GB,
我後來用ftp上傳資料, 不透過samba發現檔案雖然可以上傳, 但所傳的壓縮黨會毀損
所以看起來就算不透過samba也是依樣會傳壞檔案 = =
ftp 我用的是VSFTPD

slime iT邦大師 1 級 ‧ 2012-07-13 11:57:50 檢舉

超過一定檔案大小就會毀損, 個人會往這邊找:
a. Server 硬碟, 排線, 主機板等硬體.
b. 如果有 RAID 的話, 再加上 RAID 卡.

ck123 iT邦新手 5 級 ‧ 2012-07-18 15:23:20 檢舉

請問這會有可能是VMware 8引起的嗎?

因為這平台我是虛擬出來的, 使用VMWare8

0
jojojjjo
iT邦新手 4 級 ‧ 2015-05-01 20:38:31

小心檔案會損毀, 還是先做好備份好
我用的ahsay你也可以看一看
http://www.ahsay.com/jsp/tc/home/

我要發表回答

立即登入回答