With Synology DSM can we install Home Assistant? Thanks.
https://www.home-assistant.io/docs/installation/synology/
Any progress with led control ?
I really would like to modify the second and third led to turn off if the my cloud and its disks go into sleep mode
Hi,
i’m not sure if i got the howto right. I have a WDMyCloud-Gen2 with 6Tb and would like to install Debian with OMV on it.
The first part of the howto:
======= FW SETUP =======
Copy uImage, uRamdisk and rootfs-jessie.tar.xz to /boot/boot (Overwrite all)
Reboot
Connect via telnet
Repart HDD (Skip 3rd partition):
parted /dev/sda
rm 1
rm 2
rm 4
rm 5
rm 6
rm 7
mkpart primary 0% 1G
q
mkfs.ext4 /dev/sda1
Bevor doing that i tried if ssh and telnet to see if it works. I can ssh to it, but telnet does not work, i only get an “connection refuesed”.
I can’t figure out how to get telent to work on it.
Can somebody help me out please.
If you have ssh, you dont need telnet. Telnet is depreciated. ssh is the preferred means to remote administer. More than likely telnetd is not running, which is why the connection is refused. Since telnet does not use any kind of encryption to prevent eavesdropping on your administration session, it is highly discouraged to use it. SSH is the preferred means.
@Wierd_w, Telnet used in my Ramdisk because its lighter thas SSH (Dropbear) and easy for configure.
And… Its used only for restore device. Only if ramdisk can’t start primary OS.
@fox_exe, Nice to know. I did the partitioning and data transfers outside of the mycloud when I set mine up. For me, I had SSH right away. I just needed to know what partitions where what, and off I went. I made the system partition a little bigger than your instructions. (Once you start installing packages, those dependencies can get pretty hungry for disk space.)
I was more meaning to the prior poster, that if you have ssh (which he says he does), then he does not need to worry about not having telnet, since telnet just gives you a remote console, which ssh provides, and provides better.
OK, Telnet only works in the first step of installing Debian, not bevor or after!
Big THX @ Fox_exe for his work ![]()
I installed Debian and OMV, and after little hiccups it worked (had a typo while installing Debian, mounted sda3 on root wrong, and at the end had to unmount sda2 via ssh so i could create a share in openmediavault).
Did a rebeoot, tested one share with samba and ftp and all went fine.
After i was finished, i chose the option in OMV to shutdown, and afterwards pulled the plug. A few hours later i wanted to boot my WDMyCloud-Gen2 up, but i can’t connect to it.
I can ping it, and it is there, but no webgui, no SSH (connection refused), no FTP or Sambashares.
After booting up the LED stays white (or yellowish)
I have no idea what is wrong, or what did i do wrong?
Any sugestions?
I tried the unbricking manual;
extracted usbrecovery.tar.gz on two different USB sticks formated to fat32, it is a boot folder with 4 files in it (uImage, uImage-wdrecovery, uRamdisk and uRamdisk-wdrecovery)
When i switch the myCloud-gen2 on, i have fast blinking blue light, and after that it is constantly white or yellow.
ping: works
IP: OK
telnet: Unable to connect to remote host: Connection refused
Pulled the plug
Put the USB stick in the back
Pressed the reset-button on the backside for 40 seconds
switched it on again
It works again!!!
Wanted to see what happens after i reboot it again; white lite, no ping, no telnet, no ssh, no service, no nothing ![]()
Well,
i left the device on (to see if giving it time would help) and went to sleep.
In the morning the device was still on, but no SSH oder samba reachable.
I pulled the power, and restarted it again. After a short time i got a green LED, pinged it, samba works, ssh works.
I have no clou why or why not.
What is (usualy) the safe way to shutdown or reboot OMV with clean Debian on it?
ssh into the box, and run
shutdown now
Sleep and WOL not supported, so device after “Poweroff” command just stop OS, but not drivers. Networks still active, but system is “hung”.
Need manually reset power after shutdown.
Also do this: https://fox-exe.ru/WDMyCloud/WDMyCloud-Gen2/Debian/Dev/_Update_Kernel_and_os_EN.txt
so if i shutdown throgh ssh, system will not hang on next boot?
Fox_exe
the purpose of that manual/fix is to make sleep and WOL work?
I am also trying to connect my USB-Stick to it, so i could copy files faster than trough smb.
I can’t mount the USB device because Debian does not seem to register it (blkd or fdisk -l only show the internal HD)
As Fox_exe points out, the device cannot shut itself “off.”
Instead, the shutdown command tells the system to halt everything, write unwritten data to the disk, unmount, and then just sit there until you interrupt the power.
If you want to reboot the unit, tell it to reboot instead of shutdown.
reboot now
It’s a shame this system does not have a free gpio, or a clean way to attach to one if it did. Using a simple flipflop circuit that allows power through as long as a certain GPIO remains low, (and stays powered even when the flipflop disables power, until a manual high state is issued with a button) would implement a makeshift power button, and a means to allow the unit to actually shut itself off on shutdown.
As is though, you can tell the unit to shutdown using ssh before yanking the power, if you need to move the unit.
@Wierd_w, CPU have support WOL, but not realisd in kernel and hardware.
Mirror/ext2+ devices have dedicated chip, that controls power and support WOL, but need drivers (kernel modules) for enable WOL after shutdown (w/o this - device just “full-power-off”)
OK, did that and it worked.
At OS upgrade i had to choose a few times if i would like to use my old settings/scripts or new ones, i went for the default answer and used the old ones.
Sambaspeed almost doubled (from 45 to almost 80 for upload, download is ~105MB/s)
I can see my usb storage know, big THX
So far everything works, except one thing:
i can access the sambashares from libreelec/kodi and my androiddevices, but from ubuntu 16.04 it stopped working. I can’t figure out why, the only thing that changed is the upgrade on myclud.
on “sudo mount -a” i get:
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
i googled that, but couldn’t find anything helpfull to my situation
This is my old and still everywhere els except ubunt working line in fstab:
//192.168.178.77/media /mnt/media cifs credentials=/home/z/.smbcredentialsc,uid=1000,iocharset=utf8,sec=ntlm 0 0
my .smbcredentialsc :
username=myusername
password=mypassword
any idea?
I found the problem:
//192.168.178.77/media /mnt/media cifs credentials=/home/z/.smbcredentialsc,uid=1000,iocharset=utf8 ,sec=ntlm 0 0
,sec=ntlm ntlm seems to be an old security mode that is no longer supported after upgrade to stretch. I have to leave that out!
After many days and reading through half of the internet I finally figured out how to put the HDD’s of MyCloud (Mirror) completely to sleep on Debian / OMV. Things I did:
- activate in OMV under “Disks” for all your disks you want to sleep your prefered spindown time and activate Write Cache.
- In OMV in Section “S.M.A.R.T.” → under general section set the switch to disable, set check interval to 86400 and Power Mode to Standby (even though if smart was disabled before!)
- edit fstab:
nano /etc/fstaband add following options to root and data partition:nodiratime,noatime,commit=60 - move everything from cron.hourly to cron.daily:
mv /etc/cron.hourly/* /etc/cron.daily/ - increase dirty_writeback:
nano /etc/rc.localand add following line at the end (before exit 0!):echo 6000 > /proc/sys/vm/dirty_writeback_centisecs
After doing this, install the plugin “Flashmemory” available in OMV-Extras in OMV (no need to comment out the swap partition, but feel free if you like to). After successful installation and a reboot, output of df -h should list various tmpfs mounts like:
folder2ram 249M 5.8M 243M 3% /var/log
folder2ram 249M 0 249M 0% /var/tmp
folder2ram 249M 516K 249M 1% /var/lib/openmediavault/rrd
folder2ram 249M 20K 249M 1% /var/spool
folder2ram 249M 12M 237M 5% /var/lib/rrdcached
folder2ram 249M 8.0K 249M 1% /var/lib/monit
folder2ram 249M 0 249M 0% /var/lib/php
folder2ram 249M 4.0K 249M 1% /var/lib/netatalk/CNID
folder2ram 249M 2.6M 247M 2% /var/cache/samba
tmpfs 50M 0 50M 0% /run/user/0
- continue editing: change crontab :
nano /etc/crontab. change the first two jobs to run once at time X (for example 4.00 a.m.) so that it looks like this
00 4 * * * root cd / && run-parts --report /etc/cron.hourly
00 4 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
- do the same for the following files:
/etc/cron.d/anacron
/etc/cron.d/php - systemd casually triggers some .timer-files, so we change them too. To see which timers are active:
systemctl list-timers. For me there are 5 timers active, so we have to change the corresponding units. My active timers are :
phpsessionclean.timer
anacron.timer
apt-daily-upgrade.timer
systemd-tmpfiles-clean.timer
apt-daily.timer
So to modify those :cd /lib/systemd/systemandnano phpsessionclean.timer: There under[Timer]remove the original lineOnCalendar=.....withOnCalendar=*-*-* 04:00:00 - Finally the HDD’s went to sleep by themself, but as soon as I activated Samba… they woke up again after 30 mins. With this script ff_changed I saw that the only file not covered by Folder2Ram was /var/lib/samba/private/msg.sock, a Directory used by samba. We can see those with:
smbd -b | egrep "LOCKDIR|STATEDIR|CACHEDIR|PRIVATE_DIR" - So we need to move the STATEDIR and the PRIVATEDIR:
mkdir /var/cache/samba/liband copy everything from the old to the new dirs:cp -r /var/lib/samba/* /var/cache/samba/lib/. - Finally we have to tell smb to use this new location: If you are in OMV then access the webinterface and change to SMB/CIFS, at the bottom in the field “Extra Options” add:
private dir = /var/cache/samba/lib/private
state directory = /var/cache/samba/lib
usershare path = /var/cache/samba/lib/usershares
- Above this field turn off the option “Local Master Browser”
- In OMV web interface go to “Scheduled Jobs” and add a job for every night at 4 a.m. to run :
folder2ram -syncall &>/dev/null. This syncs all those folders mounted as tmpfs to disk. - Last step: In OMV in “Time and Date” disable “Use NTP Servers”, then in terminal :
update-rc.d ntp disable
apt-get install ntpdateand back in OMV in “Scheduled Jobs” add a job for 4 a.m. to run/usr/sbin/ntpdate pool.ntp.org &>/dev/null - After a successful restart check again with
df -hif the flashmemory plugin is running.
After all steps done MyCloud with OMV finally sleeps for hours and doesn’t wake up after just one hour or less…(of course wakeup at 4.a.m. due to our scheduling, you can change this like you want).
(If you like to protocol the sleep behaviour of your device you can use the script I found at disk_spindown2.sh, what you have to do is listed in the file itself at the top (you have to add “a” for example for the variable diskvolumes_spindown, you can heavily modify it so that the leds are turned off if the hdds are asleep and so on… but this step isn’t necessary at all - just fine tuning)
Enjoy your MyCloud with OMV and sleeping HDDs… ![]()