Author Topic: Announcement: Debian Linux on the Terastation ES (TS-XEL)  (Read 4632 times)

1000001101000

  • Debian Wizard
  • Big Bull
  • *****
  • Posts: 1128
  • There's no problem so bad you cannot make it worse
Announcement: Debian Linux on the Terastation ES (TS-XEL)
« on: September 28, 2019, 09:45:25 PM »
Howdy,
   I'm happy to announce that I have added support for the Terastation ES (TS-XEL) to my Debian Installer project. Just like the other devices this is accomplished using the standard Debian kernel and uses a modified version of the Debian installer.

All the installer files and documentation can be found on my github page:
https://github.com/1000001101000/Debian_on_Buffalo

I'm also currently working on adding additional devices as well.

I have working installer images for the Terastation III devices (TS-XL, TS-WXL and TS-RXL) using a custom kernel image. Those can be found here:
https://github.com/1000001101000/Debian_on_Buffalo
**link updated now that projects have been merged

Hopefully I'll have a few others to announce in the coming weeks/months.
« Last Edit: October 23, 2019, 03:31:29 PM by 1000001101000 »

Kane88

  • Buffalo
  • ***
  • Posts: 161
Re: Announcement: Debian Linux on the Terastation ES (TS-XEL)
« Reply #1 on: March 01, 2020, 04:14:28 PM »
Hi.  Just wanted to report that I installed the Debian 10.3 today on a TS-XEL unit and it worked, but having some difficulty.

After loading the boot files and rebooting, I could ping the TS-XEL after the display turned green.  But I was getting connection refused messages when trying to run the installer via ssh.  I waited and came back to it 10 minutes later, and then the installer ran.  This unit apparently takes awhile to boot compared to the TS3400 series.  So if anyone gets connection refused, just wait 10 minutes and come back to it.


Even after running sudo, I cannot install dependencies for webmin.
the problem is with apt, what am I doing wrong?

root@debian:/# apt-install -f
-bash: apt-install: command not found

This command worked on the TS3400 and the TS-WVHL when I put webmin on those.

Is there something I need to load so that apt runs?  If not, what am I doing wrong?


Thank you for all your efforts on this project.  It gives some new life for these old units.

1000001101000

  • Debian Wizard
  • Big Bull
  • *****
  • Posts: 1128
  • There's no problem so bad you cannot make it worse
Re: Announcement: Debian Linux on the Terastation ES (TS-XEL)
« Reply #2 on: March 01, 2020, 04:30:43 PM »
Did you mean “apt install”?

Kane88

  • Buffalo
  • ***
  • Posts: 161
Re: Announcement: Debian Linux on the Terastation ES (TS-XEL)
« Reply #3 on: March 01, 2020, 04:38:42 PM »
Did you mean “apt install”?

yes, you're right.  too many typos today...

Kane88

  • Buffalo
  • ***
  • Posts: 161
Re: Announcement: Debian Linux on the Terastation ES (TS-XEL)
« Reply #4 on: March 03, 2020, 08:51:13 AM »
I noticed the ssh session is very slow on the TS-XEL, compared to the TS3400.  I guess this is due to the hardware differences with this model.  I noticed there isn't much free memory available in webmin, less than 20mb of the 256mb.  Too bad the board doesn't have memory slots.  But there is that pci-e slot on the board...  I wonder if memory could be added through it?

I couldn't get webmin to install samba on the TS-XEL.  Even letting it work overnight, webmin just spins...
I updated all the packages I could find for webmin, like I did for the other models.

That said- is this all that is needed to get samba installed?

sudo apt install samba
apt install -f

sudo apt install samba-client
apt install -f

hopefully webmin will let me configure it, once it is installed...

1000001101000

  • Debian Wizard
  • Big Bull
  • *****
  • Posts: 1128
  • There's no problem so bad you cannot make it worse
Re: Announcement: Debian Linux on the Terastation ES (TS-XEL)
« Reply #5 on: March 03, 2020, 09:17:08 AM »
Going back and forth between the TS-XEL and TS3400 you'll definitely see a performance difference. For just about any specification you could look at the TS3400 is >4x improvement (except network speed).

The TS-XEL doesn't have a pci-e slot, the slot that the sata riser plugs into looks similar but it's connected to the sata chip on the main board. No part of that connection is actually over PCI.

I've never tried installing webmin on these devices but it has worked for folks on the ls220 which has the same amount of memory though is probably somewhat faster overall. Do you have swap enabled on the TS-XEL? that seems like the type of issue I see when trying to run something on one of these without swap.





Kane88

  • Buffalo
  • ***
  • Posts: 161
Re: Announcement: Debian Linux on the Terastation ES (TS-XEL)
« Reply #6 on: March 05, 2020, 08:08:06 PM »
Not sure if swap was off.  I reinstalled debian on the TS-XEL, and the swap partition was definitely there.  I zeroed out the swap partition this time.

It seems to be running a little faster.  I wonder if increasing the swap size from 1gb to 2gb would help any?  I noticed on the TS3400 that the default swap is 4gb.  That system also has a lot more physical memory too.

Oh, I didn't know that was a sata riser port.   I am starting to wonder what happens if I take the cpu board from a TS-WVHL and connect it to the sata riser of either a TS3400, or one of these TS-XEL units.  The idea being to take the TS-WVHL from a 2 disk unit- to a 4 disk unit and have 64 bit capability in doing it.  Of course I'd have to use one of the other cases that fit the boards.


Anyway, webmin would not install samba on the TS-XEL, though webmin installed it just fine on the TS3400 and WS-WVHL both.

So I manually installed samba and samba-client.  and then did apt install -f to get any missing packages.
I hope that's all that's needed for those.  I was able to make a samba share and I can write to it now on the TS-XEL.

The nas is doing about 30MB/sec average for writes, with peaks at 35MB/sec or so.  About the same as stock os. 
It's probably going to take a week or more to eventually fill 16TB on this one, but at least I can use it for files that are soon to be- offline data.

The main thing- is having the newer SMB support and the security updates that debian has, that the stock os for this model doesn't have these days.

-----

I'm wondering if there is a way to have a recycle bin kind of function for the /mnt/array partition?
I found that to be handy with buffalo's stock os- and it did save me from having to restore from backup a few times.

One has to be very careful with stored files on the debian, it is not as forgiving as the stock os.

-----

Next on the list is the post install items.  The fan seems to work just fine.  I hear it spin up on occasion, and then spin back down after a few minutes.  It sounds like it is operating as it should, but I have no way to check this.  see below.


GPIO Fans
For most devices the fans are controlled via the gpio-fan driver. Their reported speed can be seen using lmsensors which is installed by the installer:

If lmsensors is installed, then something is missing...

root@debian:~# lmsensors
-bash: lmsensors: command not found
root@debian:~# cd /
root@debian:/# lmsensors
-bash: lemsensors: command not found
root@debian:/#


root@debian:~# sensors
No sensors found!
Make sure you loaded all the kernel drivers you need.
Try sensors-detect to find out which these are.

root@debian:~# sensors-detect
# sensors-detect revision $Revision$
# DMI data unavailable, please consider installing dmidecode 2.7
# or later for better results.
# Kernel: 4.19.0-8-marvell armv5tel
# Processor: Feroceon 88FR131 rev 1 (v5l) (//)

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): YES
modprobe: FATAL: Module cpuid not found in directory /lib/modules/4.19.0-8-marvell
Failed to load module cpuid.
Silicon Integrated Systems SIS5595...                       No
VIA VT82C686 Integrated Sensors...                          No
VIA VT8231 Integrated Sensors...                            No
AMD K8 thermal sensors...                                   No
AMD Family 10h thermal sensors...                           No
AMD Family 11h thermal sensors...                           No
AMD Family 12h and 14h thermal sensors...                   No
AMD Family 15h thermal sensors...                           No
AMD Family 16h thermal sensors...                           No
AMD Family 17h thermal sensors...                           No
AMD Family 15h power sensors...                             No
AMD Family 16h power sensors...                             No
Intel digital thermal sensor...                             No
Intel AMB FB-DIMM thermal sensor...                         No
Intel 5500/5520/X58 thermal sensor...                       No
VIA C7 thermal sensor...                                    No
VIA Nano thermal sensor...                                  No

Lastly, we can probe the I2C/SMBus adapters for connected hardware
monitoring devices. This is the most risky part, and while it works
reasonably well on most systems, it has been reported to cause trouble
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no): YES
Sorry, no supported PCI bus adapters found.

Sorry, no sensors were detected.
Either your system has no sensors, or they are not supported, or
they are connected to an I2C or SMBus adapter that is not
supported. If you find out what chips are on your board, check
https://hwmon.wiki.kernel.org/device_support_status for driver status.
root@debian:~#

1000001101000

  • Debian Wizard
  • Big Bull
  • *****
  • Posts: 1128
  • There's no problem so bad you cannot make it worse
Re: Announcement: Debian Linux on the Terastation ES (TS-XEL)
« Reply #7 on: March 05, 2020, 09:51:17 PM »
I'm not really sure what the best practice is for swap these days. I would think 1GB would be plenty but adding more wouldn't hurt either. you can monitor swap usage via "free" or "top" to see how much is being used.

Out of interest I tried installing webmin on my TS-XEL. The install went just fine and webmin seems to be working. I went to check how much swap I have and discovered I don't have any currently (presumably an issue caused by the disk image I used to move between devices).

Here is the package I used:
https://download.webmin.com/download/repository/pool/contrib/w/webmin/webmin_1.941_all.deb

I doubt you could transplant the boards across generations like that, though I don't know if it's capital "I" impossible. Some considerations off the top of my head:
- risers may not actually be compatible
- boards have different ports and may require lots of case mods to make fit
- power supplies will be different, though maybe you could swap those too
- TSWVHL board "knows" it's a 2-bay model, the bios may not recognize more ports.

Might be worth experimenting with if you're into that type of project. You'd probably want to verify somehow the risers have the same pinout before attempting anything (if one board uses pin1 for data but the other uses pin1 for 12v you would have a bad day).

I have reasonably high resolution pictures of the components of the TS-XEL, TS3400d and TSQVL(4-bay version of the WVHL) here:
https://buffalonas.miraheze.org/wiki/Main_Page


The fans on the terastation models (except TS1200) have can's controlled by the on-board microcontroller. see:
https://github.com/1000001101000/Debian_on_Buffalo/wiki/Post-Installation-Options#Microcontroller_Fans

Kane88

  • Buffalo
  • ***
  • Posts: 161
Re: Announcement: Debian Linux on the Terastation ES (TS-XEL)
« Reply #8 on: March 06, 2020, 08:44:15 AM »
webmin works fine otherwise so far on the TX-XEL, it just wouldn't install samba for whatever reason. 

I'm in the middle of copying files to the TS-XEL, and it looks like there's plenty of free space on the swap currently.  I've only installed webmin, the two samba packages, and smartmontools so far,
and any other packages they needed

root@debian:/# free
              total        used        free      shared  buff/cache   available
Mem:         254068       59508        3304         696      191256      185520
Swap:       1000432       47104      953328
root@debian:/#

I'd guess the buffalo 1gb standard swap size is plenty.  Unless someone is running a ton of processes.

-----

With those considerations, I won't try swapping boareds.  Especially if the TS-WVHL knows it is a 2 bay unit.  The idea was to try to get around the 32bit limits I'm having with the TS3400.  I'll get back to that unit eventually.

-----

looking at /etc/micon_fan.conf

[Rackmount]
mediumtempc = 40
hightempc = 50
shutdowntempc = 75

[Desktop]
mediumtempc = 25
hightempc = 35
shutdowntempc = 75


So the fan will go to high speed at 35c and then drop back down to medium when it cools down to 25c.

Since the lmsensors and sensors command don't work, is there any way to view or monitor the current fan speed?

1000001101000

  • Debian Wizard
  • Big Bull
  • *****
  • Posts: 1128
  • There's no problem so bad you cannot make it worse
Re: Announcement: Debian Linux on the Terastation ES (TS-XEL)
« Reply #9 on: March 06, 2020, 09:08:34 AM »
Ah okay. I had the same issue when I tried setting up the samba module. I haven't looked into how webmin actually works but the webmin process was taking like 70+% cpu while trying to do the install. the rest seemed to be used by apt-get actually trying to install the packages. webmin seems to have a lot of capabilities but also seems to need a lot of CPU power for some reason. Although when I say a lot i mean too much for a 10yr old NAS with 5% the cpu power of my laptop. Still, at that stage I would think it would just be waiting for apt-get so I don't understand why it needs resources at all.

I should clarify that the board knows because three gpio pins are hardcoded with the value corresponding to the board type (GPIOs: 29,30,31). I have no idea if the BIOS actually does anything with that information or not. I believe Buffalo's firmware does though I don't know where/when it uses it.

If you run the fan daemon in debug mode it will output the temperature when it reads it. I'm not sure I've ever documented that anywhere to be honest:
Code: [Select]
/usr/local/bin/micon_scripts/micon_fan_daemon.py debug
You could also use the python library to read the temp, with something like this:
Code: [Select]
import libmicon
test = libmicon.micon_api("/dev/ttyS1")
micon_temp=int.from_bytes(test.send_read_cmd(0x37),byteorder='big')
print("Temperature ",micon_temp,"C")

If you'd like to see all the information that can be read this way check out micon_dump.py in
https://github.com/1000001101000/Python_buffalo_libmicon
and
https://buffalonas.miraheze.org/wiki/Terastation_Microcontroller_Interface