Clean OS (Debian), OpenMediaVault and other "firmwares"

I made these tweaks to smb.conf and it seems to have have sped things up a bit - still pretty slow though.

Far from an expert on this though.  Can someone post the contents of smb.conf for a a machine running the WD firmware for comparison?

socket options = IPTOS_LOWDELAY TCP_NODELAY SO_KEEPALIVE
write cache size = 2097152

#use sendfile = yes
#aio read size = 16384
#aio write size = 16384

max xmit 12288

Checked speed for the network with ‘ethtool eth0’ →          Speed: 1000Mb/s

1 Like

The script works great if you already have the WDMyCloud default install. I now currently have the openmediavault img installed but would like to go to the clean debian install instead. Is there an easy way? Can you write a script that can switch between the two images?

Thanks

Autoinstall script makes 2nd raid and install .img in hem. Old raid is accesable too (If you dont run “Run_me_after_reboot.sh”).

For switch betwin 2 OS’s - just flash config_mdx.img

cat /proc/cmdline | awk -F= 'BEGIN{RS=" "}{ if ($1=="root") print $2 }'

ITs show you what of MD’s yoused now. (Flash config for another md to switch betwin os)…

About samba v4 - Need some changes in smb.conf (tdbsam not supported. Use smbpasswd instead).

I use original samba files from v3-230 firmware… But speed not changed… strange… (Uploaded to google.drive)

The latest WD firmware’s(v04-00.01-623) Samba speed is really good.

smb_read.png

▲ MyCloud → PC (up to 108MB/s)

smb.png

▲ PC → MyCloud  (up to 93.4MB/s)

Will installing debian/openmediavault work on “My Cloud Mirror” nas devices?

lnxfn

Hmmm… Yes, but need some changes in install script (Because used 2 devices)

WD original samba conf

1. overall_share

## BEGIN ## sharename = Public #
[Public]
path = /DataVolume/shares/Public
comment = Public Share
public = yes
browseable = yes
writable = yes
guest ok = yes
map read only = no
## END ##

## BEGIN ## sharename = SmartWare #
[SmartWare]
path = /shares/SmartWare
comment = SmartWare
public = yes
browseable = yes
writeable = yes
guest ok = yes
map read only = no
## END ##
## BEGIN ## sharename = TimeMachineBackup #
[TimeMachineBackup]
path = /shares/TimeMachineBackup
comment = TimeMachine
public = yes
browseable = yes
writeable = yes
guest ok = yes
map read only = no
## END ##

2. smb-global.conf

[global]
load printers = no
printable = no
log file = /var/log/samba/log.smbd
max log size = 50
deadtime = 30
enable core files = no
security = user
encrypt passwords = yes
passdb backend = smbpasswd:/etc/samba/smbpasswd
create mask = 0775
force create mode = 0775
directory mask = 0775
force directory mode = 0775
local master = yes
domain master = no
preferred master = auto
os level = 5
use sendfile = yes
dns proxy = no
idmap uid = 10000-65000
idmap gid = 10000-65000
admin users =
null passwords = yes
map to guest = bad user
guest account = nobody
force group = share
unix extensions = no
acl check permissions = false
max protocol = SMB2
browseable = yes
syslog = 1
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=2048000 SO_SNDBUF=2048000
min receivefile size = 16384
smb encrypt = disabled
writeable = yes
delete veto files = true

## Note: be careful when setting “dos filemode=yes”. We have seen where Samba does not
## handle this properly (and crashes) upon a rename of a file where the authenticated user is not the owner.
##dos filemode = yes

After ./run_me_after_reboot.sh

Ok, lets go…

./run_me_after_reboot.sh: 9 : [ : /dev/md0: unexpected operator

Is it normal?

I just add jessie to source list.

deb http://ftp.debian.org/debian/ jessie main contrib non-free

then

apt-get update

apt-get install samba

easy to install samba4!!

then, copy from  https://docs.google.com/file/d/0B_6OlQ_H0PxVbW03dDdpNDZZbk0 to smb.conf.

MyCloud to PC : 80~100MB/s

PC to MyCloud : 25~35MB/s

When you add jessie as a repository and apt-get install samba - it wants to upgrade a whole pile of other things as well and jessie is still in testing stage.  Maybe not completly optimal - I’m not sure.  

WSGVET → You have a great myCLoud to PC rate - wonder why the PC to myCloud is still slow compared to WD firmware. 

Since wdMycloud firmware still has very fast speed in comparison - what version of samba was it?  (‘smbstatus’ --version from SSH) 

Is there any way to grab the files for samba direct from the WD firmware and then install using Fox’s replacement method?  Could be an optimized build for the hardware. 

I managed to run out of disk space testing plugins during installation.   I had some large files in my home dir from testing that should have been deleted as well.

I removed everything and cleaned up but I am not sure I got all the space back. 

Can someone with a relatively clean install post the output of df?

I currently have:
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 1968336 1246744 621604 67% /
/dev/root 1968336 1246744 621604 67% /

With all my hacking around learning this new system - I am thinking a nice new install of the system might be a good idea.  

Can I just reflash using the autoinstall script again?  i.e. same method that I used to move from the WD firmware?  Is it possible to autoinstall back to WD firmware?   Or do you have to take the drive out of the enclosure and follow the full repair procedure.

Yes, you can use autoinstall script for flash any of firmwares (Include official).

(Replace kernel and rootfs)

About samba - Try to use “Wheezy-backports” repository. (He same samba v4.1.11)

‘smbstatus’ --version

Version 4.1.11-Debian

Hi Fox_exe!

Thanks for your work! It’s GREAT!

I have two questions:

I need some extra modules to mount encrypted LUKS partition images, so I need to compile the kernel modules.

I saw your instructions in “New Kernel and System.txt” but I don’t know which kernel source to use. ¿gpl-source-sequoia-04.00.01-623.zip (latest source code in WD official site)?

¿Is your debian compiled with 64K pagesize as the new official firmware from WD?

Thanks

deb http://ftp.debian.org/debian/ Wheezy-backports main contrib non-free

I think Wheezy-backports is not work for armhf.

W: Failed to fetch http://ftp.debian.org/debian/dists/Wheezy-backports/main/binary-armhf/Packages 404 Not Found [IP: 130.89.148.12 80]

W: Failed to fetch http://ftp.debian.org/debian/dists/Wheezy-backports/contrib/binary-armhf/Packages 404 Not Found [IP: 130.89.148.12 80]

W: Failed to fetch http://ftp.debian.org/debian/dists/Wheezy-backports/non-free/binary-armhf/Packages 404 Not Found [IP: 130.89.148.12 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.

re: Backport → Didnt work for me either.  

Yes, you can use autoinstall script for flash any of firmwares (Include official).

(Replace kernel and rootfs)

The files here are deb files:

https://drive.google.com/folderview?id=0B_6OlQ_H0PxVUEpUdC10cEJ1VjA&usp=drive_web&tid=0B_6OlQ_H0PxVRXF4aFpYS2dzMEE

Do you have the kernel and rootfs for original firmware saved on your drive somewhere?  Or can I just dpkg -i the deb file to restore to default firmware.  I extracted one of the deb files and found a rootfs but no kernel so I don’t think that’s right.

Reason I am asking is that I ran into buffering issues today with the kids streaming today to their ipads - until I can sort out the samba speed issues - I need a way back to original firmware preferably without cracking the case.

Sorry to be a pain in the butt.  

Thank you for your work!  

hello, i install OMV 1.0.24 with the debian_jessie_omv package with the guide, everything worked good.

but i have a problem, im trying to install owncloud plugin from the plugin section and i get this error mesage

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 openmediavault-owncloud : Depends: owncloud (>= 6.0.4) but it is not going to be installed

can you please help me? what i need to do?

WSGVET

deb http://ftp.en.debian.org/debian wheezy-backports main

Works. But need tuning priority (/etc/apt/preferances.d/*). By default he have 100, but OMV get 995 for all others.

krtliv

1.0.24 - just for test samba.

Turn offf omv repo, install owncloud, turn on omv repo again, install plugin.

Or replace jessie to wheezy in sources.list (Dont forget run apt-get update every time when change repo)

How to Install Samba4. 

nano /etc/apt/sources.list

deb http://ftp.us.debian.org/debian stable main contrib non-free
deb http://ftp.debian.org/debian/ wheezy-updates main contrib non-free
deb http://ftp.debian.org/debian/ wheezy-backports main
deb http://security.debian.org/ wheezy/updates main contrib non-free

nano /etc/apt/preferences

Package: *
Pin: release a=wheezy-backports
Pin-Priority: 900

Package: *
Pin: release a=stable
Pin-Priority: 800

apt-get update

Get:1 http://ftp.debian.org wheezy-backports/main armhf Packages/DiffIndex [7,819 B]
Get:2 http://ftp.debian.org wheezy-backports/main Translation-en/DiffIndex [7,819 B]
Fetched 15.6 kB in 17s (902 B/s)
Reading package lists... Done
root@MyCloud:~#

'smbstatus' --version

Version 4.1.11-Debian

It works Great~!

2 Likes

How about change mount option for /dev/sda4?

I read  http://blog.smartlogicsolutions.com/2009/06/04/mount-options-to-improve-ext4-file-system-performance/ this article, and speed is better than clean debian.

/dev/sda4 /data ext4 noatime,data=writeback,barrier=0,nobh,errors=remount-ro 0 0

Read speed up to 100MB/s.

But still write speed up to 35MB/s…

Clean Debian + wheezy-backports + samba v4 + edited smb.conf + edited mount option

Here is my smb.conf option.

client ntlmv2 auth = yes
read raw = yes
write raw = yes
wide links=yes
getwd cache=yes
stat cache = yes
strict sync = no
use sendfile = yes
large readwrite = yes
oplock contention limit = 5
oplock break wait time = 100
case sensitive = true
strict allocate = yes
max xmit = 131072
use sendfile = Yes
dead time = 15
getwd cache = Yes
min receivefile size = 13638
aio read size = 64360
aio write size = 64360
aio write behind = true

##Optimize tcp
socket options = TCP_NODELAY SO_RCVBUF=262144 SO_SNDBUF=262144 IPTOS_LOWDELAY SO_KEEPALIVE
write cache size = 12826144

And speed is not bad except write performance.

v4_read.png

▲ My Cloud → PC

v4_write.png

▲ PC → My Cloud