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

Thank you Fox_exe. Еще раз спасибо.

Everything is fine - I also rebooted to check.

2.jpg

Hello!

How to install OwnCloud ?..

After update 1.11 to 1.12 OMV speed of work is slowly… CPU always about 100%, when torrent is worked or copy files by samba :frowning:

Hi,

Installed Clean Debian. Then installer latest OMV. Then tried samba3 → samba4 upgrade from fist post.
My device won’t boot now: is see only white indicator lit solid.
Can’t ping, can’t connect via ssh, can’t connect using web ui.

How can I restore my device to ‘Clean Debian’ state without loosing my data?

I need so somehow revert ‘samba3 → samba4’ actions to get a bootable device.

Please help.

I have disassembled the device to get to HDD, but maybe there is another way.

m3nthal wrote:

but maybe there is another way.

Hard way (TFTP)

Fox_exe wrote:


m3nthal wrote:

but maybe there is another way.


Hard way (TFTP)

Suppose I can connect to MyCloud.
Can you please say what steps should I take to make OMV to skip starting samba service and make SSH accessible?

Just disable samba autoboot: chroot inside rootfs and run update-rc.d samba disable

Also check boot log for errors: cat /var/log/boot | grep error

Fox_exe wrote:


m3nthal wrote:

but maybe there is another way.


Hard way (TFTP)

Tried the hard way. Did not receive any DHCP reqests from MyCloud. Is there a way to not to loose the data on my drive, it’s very valueble. 

Please help.

Fox_exe wrote:


m3nthal wrote:

but maybe there is another way.


Hard way (TFTP)

Thank you for your help! Got it working using HDD recovery from first post.

Now I have only samba4, transmission and webmin running. But I have a problem. I can’t get the right config for samba. Windows asks for login:password even though I’ve setup guest log in. Can you help?

I want my share ‘/data/shares/Public’ to be accessible from Windows 8.1 (WORKGROUP) with certain login:password paid.

Here is my current /etc/samba/smb.conf:

[global]

workgroup = WORKGROUP
dns proxy = no

log file = /var/log/samba/log.%m
max log size = 50
syslog only = no
syslog = 0

debug level = 0
printcap name = /dev/null
getwd cache = yes
panic action = /usr/share/samba/panic-action %d


####### Authentication #######

server role = standalone server
security = share
guest account = nobody

########## Domains ###########

############ Misc ############

load printers = no
printable = no

main protocol=NT1
max protocol = SMB2

######## Optimization ########

read raw = no
write raw = no
max xmit = 262144
read prediction = yes

min receivefile size = 16384
use sendfile = true
#aio read size = 262144
#aio write size = 262144
aio write behind = true
write cache size=2097152
read size=65536
allocation roundup size = 104857600

strict allocate = Yes
strict sync = no
use sendfile = true

socket options = TCP_NODELAY IPTOS_LOWDELAY TCP_NODELAY SO_RCVBUF=2048000
SO_SNDBUF=2048000

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

[public]
path = /data/shares/Public
writable = yes
public = yes
guest ok = yes
guest only = yes
guest account = nobody
browsable = yes

P.S. Помоги пожалуйста настроить самбу:)

Hi hujanita,

Could you please make more clear on item 0) and 1)

I have the same issue that I can’t start the ramlog service.

Thanks

m3nthal

Here is example:

Dont forget - Windows not allow multi-user logins. If you already login to NAS as Guest - you cant login in private share (Because Windows already login as Guest)

[global]
security = user
passdb backend = tdbsam
unix password sync = yes
pam password change = yes
map to guest = bad user
use sendfile = true
force group = users

[Public]
comment = Public share
browseable = yes
path = /data/Public
guest ok = yes
read only = no
create mask = 0777
force user = root

[Private]
comment = Allow only users from Users group
browseable = yes
path = /data/Private
guest ok = no
write list = @users
create mask = 0655
directory mask = 0766


About HDD spindown (Standby mode):

http://info4admins.com/tips-to-spindown-your-hard-disk-in-debian-or-ubuntu/

Need modify samba start script and tuning ramlog:

### BEGIN INIT INFO
# Provides: ramlog
# X-Start-Before: minidlna apache2 samba
# X-Stop-After: minidlna apache2 samba
# Required-Start:
# Should-Start: $local_fs

Then - run:

update-rc.d ramlog remove
update-rc.d ramlog defaults

Quick and dirty sleep indicator to flash the LED when the drive is spun down.

Put the following file /usr/local/bin. Call it dsksts.sh

#!/bin/bash# Script to flash disk led when in standbyflash() { for c in {1..30}; do echo off > /sys/class/leds/system_led/color; sleep 1; echo green > /sys/class/leds/system_led/color; sleep 1; done; }steady() { echo green > /sys/class/leds/system_led/color; sleep 60; }hdparm -S 242 /dev/sda >/dev/null 2>&1while :dostate="$(hdparm -C /dev/sda|grep state|awk '{print $4}')"[["$state" == "active/idle"]] && steady[["$state" == "standby"]] && flashdone

Make it executable with

chmod u+x /usr/local/bin/dsksts.sh

To make it run at boot, edit /etc/rc.local and add

/usr/local/bin/dsksts.sh

on the line immediately before the line which says

exit 0
So at the end it reads

/usr/local/bin/dsksts.sh
exit 0

Reboot.

Test it with

hdparm -y /dev/sda

Considerations:

  1. Tested and working only on WD Red drive (model WDC WD20EFRX). Some drives spin up when you check their status.

  2. Set the spin down time with hdparm -S xxx. On my drive

    hdparm -S 242 /dev/sda

 sets it to 1 hour. If I set it to anything less than 15 minutes on my drive it always spins down after 15 minutes (of inactivity).

3. The script runs once a minute so there will be a lag of up to a minute in the LED reflecting the drive’s true state.

  1. Be aware that Samba writes constantly to its logs.

EDITED 28 FEB 2015. Reason: I realised we can do this more easily with functions, and also the practice of putting executables in /var is really bad practice. Also, we need only one script now.

If you want to know what files have been written to in the last x minutes (and may be responsible for stopping your disk from spinning down), run the following script (I called it recent.sh and put it in /usr/local/bin/).

#!/bin/bash
[[-z "$1"]] && { echo -e "Finds recently modified files.\nUseage: \"recent X\" where X is minutes.";exit 1; }
now=$(date +'%H:%M')
echo "Files modified in the $1 minutes up to $now:"
find /bin /dev /etc /home /lib /media /mnt /opt /root /sbin /srv /tmp /usr /var -cmin -$1

 For example:

recent.sh 5

produces something like this:

Files modified in the 5 minutes up to 16:47:
/root
/root/.viminfo
/usr/local/bin
/usr/local/bin/recent.sh

Hello,

I try to use the OMV1.12, but i had errors with locales.

I try to run dpkg-reconfigure locales but i had errors

I try to do an apt-get install -f reinstall locales

but still not work, an error with glibc.

So i’m trying OMV 1.11

But i failed to mount my HD:

Failed to mount '/media/e0fcf183-81a7-49b0-88b8-c898f6a6144d/Data/': [mntent]: line 10 in /etc/fstab is bad mount: can't find /export/Data in /etc/fstab or /etc/mtab

Thanks for your hard work

Regards

Mercutio wrote:

Hello,

 

Failed to mount '/media/e0fcf183-81a7-49b0-88b8-c898f6a6144d/Data/': [mntent]: line 10 in /etc/fstab is bad mount: can't find /export/Data in /etc/fstab or /etc/mtab

 

Yes. 1.12 brocken (I forgot remove my stuff)

Possible way to fix it - replace HDD UUID in /etc/openmediavault/config.xml

Run “blkid” and see what UUID have your /dev/sda4.

Also change all /Data/ to /Public/

Thanks for your fast reply.

Do you thinks i should wait for a corrected 1.12?

I’m looking for the way to fix 1.11 you told me.

Just to let you know, the error i have the same error in 1.11 than in 1.12 when a try an omv-upadte:

Since release 198, udev requires support for the following features in
the running kernel:

  • inotify(2)            (CONFIG_INOTIFY_USER)
  • signalfd(2)           (CONFIG_SIGNALFD)
  • accept4(2)
  • open_by_handle_at(2)  (CONFIG_FHANDLE)
  • timerfd_create(2)     (CONFIG_TIMERFD)
  • epoll_create(2)       (CONFIG_EPOLL)

Please upgrade your kernel before or while upgrading udev.

wd_pnn wrote:

Hi hujanita,

 

Could you please make more clear on item 0) and 1)

I have the same issue that I can’t start the ramlog service.

 

Thanks

Hi wd_pnn,

debian is using dependecy startup sequence for services.

you need to find out which service is started first and add ramlog dependency into the service init.d script.

Unfortunatelly, I do not remember exact steps but following link might also help you to see the service boot order:

http://unix.stackexchange.com/questions/115495/how-to-find-out-in-which-order-etc-init-d-scripts-are-load-on-debian

For the service dependency definition refer to LSB tags which are part of service init  script and looks as follows:

/etc/init.d/xxxx

#!/bin/sh

BEGIN INIT INFO

Provides: xxxx

# Required-Start:   ramlog

Required-Stop:

Should-Start:

Should-Stop:

Default-Start: 2 3 4 5

Default-Stop: 0 1 6

Short-Description: Start and stop xxxx

Description: xxxx

END INIT INFO

Hope this will help you.

There might be definitelly better way to do this but those did not work for me.

As for noatime, just add it into etc/fstab noatime into options for ext3 and ext4 partition

Regards,

I just try to restart from the beginning with omv 1.11

When i launch install.sh i have this error:

Creating new partition…
mdadm: set device faulty failed for /dev/sda1:  No such device
mdadm: hot remove failed for /dev/sda1: No such device or address
mdadm: Cannot find /dev/md0: No such file or directory
Something wrong: /dev/md0 not exist! Exit now…
Current md’s status:
Personalities : [linear] [raid0] [raid1] [raid10]
md0 : active raid1 sda1[0]
      1999808 blocks [2/1] [U\_]
      
md1 : active raid1 sda2[1]
      1999808 blocks [2/1] [_U]
      
unused devices:

Edit: a reboot make it work

Thanks to Fox_exe’s great job.

I have installed the OMV. I can use almost every function that original WD FW has.

However, I have met some problems

  1. I can login to Web GUI by http://mycloud.local/ , but fail to login in by using IP address, say http://192.168.1.6

    The ip address is correct because I use it to login ssh successfully.

  1. How to install php5 and mysql,  I run mysql in Web Gui without success.

  2. What should be inside /etc/apt/sources.list

    My content is follow:

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

Should I add more ?

  1. How to enter sleep mode ?

Thanks you very much.

duncan2015 wrote:

  1. I can login to Web GUI by http://mycloud.local/
  1. How to install php5 and mysql,  I run mysql in Web Gui without success.
  1. What should be inside /etc/apt/sources.list
  1. How to enter sleep mode ?
  1. Strange. Works fine for me.
  2. PHP5+nginx already installed (Web GUI base). For install MySQL need roll back Perl (Dependences problems)
  3. Whatewer you want. All standart debian repos by default.
  4. Need change some services (Or disable it). I do it in next version.