<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://www.baszerr.eu/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>BaSzErr - prjs:dns320</title>
        <description></description>
        <link>https://www.baszerr.eu/</link>
        <lastBuildDate>Wed, 06 May 2026 09:33:55 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>https://www.baszerr.eu/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
            <title>BaSzErr</title>
            <link>https://www.baszerr.eu/</link>
        </image>
        <item>
            <title>dns-320</title>
            <link>https://www.baszerr.eu/doku.php?id=prjs:dns320:dns-320</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;dns-320&quot;&gt;DNS-320&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adns320%3Adns-320&amp;amp;media=prjs:dns320:low_img_7165-dev-env.jpg&quot; class=&quot;media&quot; title=&quot;prjs:dns320:low_img_7165-dev-env.jpg&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=200&amp;amp;tok=d723ad&amp;amp;media=prjs:dns320:low_img_7165-dev-env.jpg&quot; class=&quot;mediaright&quot; align=&quot;right&quot; loading=&quot;lazy&quot; title=&quot;workbench&quot; alt=&quot;workbench&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adns320%3Adns-320&amp;amp;media=prjs:dns320:dns320-official-photo.jpg&quot; class=&quot;media&quot; title=&quot;prjs:dns320:dns320-official-photo.jpg&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=200&amp;amp;tok=22664d&amp;amp;media=prjs:dns320:dns320-official-photo.jpg&quot; class=&quot;mediaright&quot; align=&quot;right&quot; loading=&quot;lazy&quot; title=&quot;DNS-320 (official photo)&quot; alt=&quot;DNS-320 (official photo)&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
D-Link&amp;#039;s &lt;abbr title=&quot;Domain Name System&quot;&gt;DNS&lt;/abbr&gt;-320 is a low cost &lt;a href=&quot;https://en.wikipedia.org/wiki/Network Attached Storage&quot; class=&quot;interwiki iw_wp&quot; title=&quot;https://en.wikipedia.org/wiki/Network Attached Storage&quot;&gt;NAS&lt;/a&gt; device for home usage. it is capable of using up to 2 hard drives.
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://jamie.lentin.co.uk&quot; class=&quot;urlextern&quot; title=&quot;http://jamie.lentin.co.uk&quot; rel=&quot;ugc nofollow&quot;&gt;Jamie Lentin&lt;/a&gt; described &lt;abbr title=&quot;Domain Name System&quot;&gt;DNS&lt;/abbr&gt;-320 device itself and linux installation on it, on his &lt;a href=&quot;http://jamie.lentin.co.uk/devices/dlink-dns325&quot; class=&quot;urlextern&quot; title=&quot;http://jamie.lentin.co.uk/devices/dlink-dns325&quot; rel=&quot;ugc nofollow&quot;&gt;dlink-dns325&lt;/a&gt; page. there is also an interesting &lt;a href=&quot;http://dns323.kood.org/dns-320&quot; class=&quot;urlextern&quot; title=&quot;http://dns323.kood.org/dns-320&quot; rel=&quot;ugc nofollow&quot;&gt;dns-320&lt;/a&gt; page, describing device details and some info on building custom firmware. in general these pages contain all that you need to know. here i&amp;#039;ll just focus on few remarks i found in handy and modifications i&amp;#039;ve made.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;DNS-320&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;dns-320&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-761&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;hardware&quot;&gt;hardware&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adns320%3Adns-320&amp;amp;media=prjs:dns320:low_img_7163-board.jpg&quot; class=&quot;media&quot; title=&quot;prjs:dns320:low_img_7163-board.jpg&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=200&amp;amp;tok=da7d3c&amp;amp;media=prjs:dns320:low_img_7163-board.jpg&quot; class=&quot;mediaright&quot; align=&quot;right&quot; loading=&quot;lazy&quot; title=&quot;board&quot; alt=&quot;board&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;
box is run on Feroceon 88FR131 processor (ARMv5l), running at 800MHz, with 128MiB ram and 128MiB flash.
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adns320%3Adns-320&amp;amp;media=prjs:dns320:low_img_7181dev-up.jpg&quot; class=&quot;media&quot; title=&quot;prjs:dns320:low_img_7181dev-up.jpg&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=200&amp;amp;tok=03fdd3&amp;amp;media=prjs:dns320:low_img_7181dev-up.jpg&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;device - up view, open case&quot; alt=&quot;device - up view, open case&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adns320%3Adns-320&amp;amp;media=prjs:dns320:low_img_7183-with-disks.jpg&quot; class=&quot;media&quot; title=&quot;prjs:dns320:low_img_7183-with-disks.jpg&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=200&amp;amp;tok=da4f0b&amp;amp;media=prjs:dns320:low_img_7183-with-disks.jpg&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;device with disks plugged in&quot; alt=&quot;device with disks plugged in&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
it has two SATA ports, 1000mbps ethernet port, 3.3V-level serial port, and single USB 2.0 port.
&lt;/p&gt;

&lt;p&gt;
device is supplied by the 12VDC, external power supplier.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;hardware&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;hardware&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;762-1247&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit3&quot; id=&quot;rs-232&quot;&gt;RS-232&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
Jamie suggest usage of &lt;a href=&quot;http://www.datasheetcatalog.org/datasheet/texasinstruments/max232.pdf&quot; class=&quot;urlextern&quot; title=&quot;http://www.datasheetcatalog.org/datasheet/texasinstruments/max232.pdf&quot; rel=&quot;ugc nofollow&quot;&gt;max232&lt;/a&gt; chip for level converting from TTL to RS-232 levels. the board however works on 3.3V and so does the serial port attached, so &lt;a href=&quot;http://www.datasheetcatalog.org/datasheet/texasinstruments/max3232.pdf&quot; class=&quot;urlextern&quot; title=&quot;http://www.datasheetcatalog.org/datasheet/texasinstruments/max3232.pdf&quot; rel=&quot;ugc nofollow&quot;&gt;max3232&lt;/a&gt; (3.3V version of max232) is needed. max232 is reported to work, though it&amp;#039;s better to be safe than sorry.
&lt;/p&gt;

&lt;p&gt;
additional modification is putting RS-232 pins (gnd, tx and rx) outside, via the hole in the back of the box. max3232, along with the required capacitors, are glued back to the device metal box. this way it will not move/short-circut, but still bill be hidden inside the device itself. it makes RS usage very convenient.
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adns320%3Adns-320&amp;amp;media=prjs:dns320:low_img_7166-rs-cable.jpg&quot; class=&quot;media&quot; title=&quot;prjs:dns320:low_img_7166-rs-cable.jpg&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=200&amp;amp;tok=0d4a02&amp;amp;media=prjs:dns320:low_img_7166-rs-cable.jpg&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;rs-232 cable (PC side)&quot; alt=&quot;rs-232 cable (PC side)&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adns320%3Adns-320&amp;amp;media=prjs:dns320:low_img_7173-converter.jpg&quot; class=&quot;media&quot; title=&quot;prjs:dns320:low_img_7173-converter.jpg&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=200&amp;amp;tok=759a03&amp;amp;media=prjs:dns320:low_img_7173-converter.jpg&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;voltage level converter&quot; alt=&quot;voltage level converter&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adns320%3Adns-320&amp;amp;media=prjs:dns320:low_img_7176-converter-mounted1.jpg&quot; class=&quot;media&quot; title=&quot;prjs:dns320:low_img_7176-converter-mounted1.jpg&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=200&amp;amp;tok=1826e2&amp;amp;media=prjs:dns320:low_img_7176-converter-mounted1.jpg&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;converter mounted (1)&quot; alt=&quot;converter mounted (1)&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adns320%3Adns-320&amp;amp;media=prjs:dns320:low_img_7177converter-mounted2.jpg&quot; class=&quot;media&quot; title=&quot;prjs:dns320:low_img_7177converter-mounted2.jpg&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=200&amp;amp;tok=45da20&amp;amp;media=prjs:dns320:low_img_7177converter-mounted2.jpg&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;converter mounted (2)&quot; alt=&quot;converter mounted (2)&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adns320%3Adns-320&amp;amp;media=prjs:dns320:low_img_7179-rs-cable-plugged.jpg&quot; class=&quot;media&quot; title=&quot;prjs:dns320:low_img_7179-rs-cable-plugged.jpg&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=100&amp;amp;tok=eddd58&amp;amp;media=prjs:dns320:low_img_7179-rs-cable-plugged.jpg&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;rs-232 connected&quot; alt=&quot;rs-232 connected&quot; width=&quot;100&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
one more thing – to stop booting of the original u-boot and firmware, when the text says “&lt;em&gt;Hit any key to stop autoboot&lt;/em&gt;” one must press &lt;strong&gt;“space” followed by “1”&lt;/strong&gt; - other combinations will not work. it is mentioned on the Jamie&amp;#039;s page, but just hides in the text – i&amp;#039;ve missed that and spent quite some time, being sure that my RS-232/TX connection is failing.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;RS-232&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;rs-232&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;1248-2748&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit4&quot; id=&quot;fan_speeds&quot;&gt;FAN speeds&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
&lt;a href=&quot;http://jamie.lentin.co.uk/devices/dlink-dns325/userland-configuration&quot; class=&quot;urlextern&quot; title=&quot;http://jamie.lentin.co.uk/devices/dlink-dns325/userland-configuration&quot; rel=&quot;ugc nofollow&quot;&gt;Jamie described&lt;/a&gt; and &lt;a href=&quot;https://github.com/lentinj/dns-nas-utils&quot; class=&quot;urlextern&quot; title=&quot;https://github.com/lentinj/dns-nas-utils&quot; rel=&quot;ugc nofollow&quot;&gt;made available package&lt;/a&gt; for controlling fan and temperature sensors. they work nice on the default setup. w/o it there is no dynamic fan control. the bad news is that FAN allows only 3 speeds: 0rpms (nice), 3krpms (disturbing) and 6krpm (hell loud).
&lt;/p&gt;

&lt;p&gt;
in my case device is placed in a not too big closet, when it operated for some time, under load, fan was unable to get CPU bellow 48*C, thus FAN was operating at 6krpm constantly (due to 2*C hysteresis). this was unacceptable so i&amp;#039;ve decided to coll things down a little. i&amp;#039;ve placed &lt;em&gt;silent force fan 12&lt;/em&gt; on top of it. it&amp;#039;s 12x12cm, 1100rpm, 12VDC with &lt;a href=&quot;https://en.wikipedia.org/wiki/fluid dynamic bearing&quot; class=&quot;interwiki iw_wp&quot; title=&quot;https://en.wikipedia.org/wiki/fluid dynamic bearing&quot;&gt;fluid dynamic bearings&lt;/a&gt;, giving total max noise of 12.9dB/A. though it is PWM controlled, i decided to skip control and leave it on all the time – it is quit enough any way and does not consume much power.
&lt;/p&gt;

&lt;p&gt;
fan was mounted on the top of the device, and closing plane was permanently removed.
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adns320%3Adns-320&amp;amp;media=prjs:dns320:low_img_7379-fan2.jpg&quot; class=&quot;media&quot; title=&quot;prjs:dns320:low_img_7379-fan2.jpg&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=200&amp;amp;tok=83aae3&amp;amp;media=prjs:dns320:low_img_7379-fan2.jpg&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;fan mounted&quot; alt=&quot;fan mounted&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adns320%3Adns-320&amp;amp;media=prjs:dns320:low_img_7382-cables.jpg&quot; class=&quot;media&quot; title=&quot;prjs:dns320:low_img_7382-cables.jpg&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=200&amp;amp;tok=547500&amp;amp;media=prjs:dns320:low_img_7382-cables.jpg&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;fan power plugged&quot; alt=&quot;fan power plugged&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
additionally, to minimize the vibration noises, i used felt “washers” under the fan, so that it won&amp;#039;t touch the box directly.
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adns320%3Adns-320&amp;amp;media=prjs:dns320:low_img_7378-fan1.jpg&quot; class=&quot;media&quot; title=&quot;prjs:dns320:low_img_7378-fan1.jpg&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=200&amp;amp;tok=6791ea&amp;amp;media=prjs:dns320:low_img_7378-fan1.jpg&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;fan mounted&quot; alt=&quot;fan mounted&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adns320%3Adns-320&amp;amp;media=prjs:dns320:low_img_7383-amortized.jpg&quot; class=&quot;media&quot; title=&quot;prjs:dns320:low_img_7383-amortized.jpg&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=200&amp;amp;tok=92bb7e&amp;amp;media=prjs:dns320:low_img_7383-amortized.jpg&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;felt washers for vibration noise reduction&quot; alt=&quot;felt washers for vibration noise reduction&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
fan is powered directly from the supplier. power supply cord was cut and 3-pin goldpin was soldered in, so that the fan can be naturally plugged in. it has to be easily demountable, since fan is expected to die in about 2-3 year time.
&lt;/p&gt;

&lt;p&gt;
after mounting external fan, typical idle temperature for the CPU is about 38*C. even under load for a long time it rarely goes to 43*C. since thresholds for small, noisy, internal fan are 45*C (3kprm) and 50*C (6krpm), effectively it is never run! :)
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;FAN speeds&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;fan_speeds&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;2749-4720&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit5&quot; id=&quot;linux&quot;&gt;linux&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
installing linux on &lt;abbr title=&quot;Domain Name System&quot;&gt;DNS&lt;/abbr&gt;-320 is not a new subject. probably the most interesting set of articles and remarks on that topic has been prepared by &lt;a href=&quot;http://jamie.lentin.co.uk&quot; class=&quot;urlextern&quot; title=&quot;http://jamie.lentin.co.uk&quot; rel=&quot;ugc nofollow&quot;&gt;Jamie Lentin&lt;/a&gt; on &lt;a href=&quot;http://jamie.lentin.co.uk/devices/dlink-dns325&quot; class=&quot;urlextern&quot; title=&quot;http://jamie.lentin.co.uk/devices/dlink-dns325&quot; rel=&quot;ugc nofollow&quot;&gt;dlink-dns325&lt;/a&gt; page. this part gives some installation ideas you may like.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;linux&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;linux&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:5,&amp;quot;range&amp;quot;:&amp;quot;4721-5054&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit6&quot; id=&quot;space_layout&quot;&gt;space layout&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
since i like having easily upgradable kernel and system, option of using internal flash as the place to store read-only system image was out.
&lt;/p&gt;

&lt;p&gt;
finally i&amp;#039;ve decided to use 16GB USB drive as a system disk and 2x2TB disks for data. 4TB data space is split to 1TB of RAID1 (mirrored) partition, for important data and 2TB of RAID0 (striped) space, for data that are less important (backup copies from other machines, internet radio records, etc…).
&lt;/p&gt;

&lt;p&gt;
using USB thumb drive as a system partition means that rotary drives can be spin down most of the time saving power, device life time and noise level at night. partitions split gives secure location for unique data and lots of space for non-important and temporary stuff. part of this is also a shared location, via witch local users can exchange files.
&lt;/p&gt;

&lt;p&gt;
just to be on the safe side, you might want to disable access times updated (&lt;em&gt;noatime&lt;/em&gt; mount option) on your pen drive. there are pen drives with time-unlimited warranty – this might be a good idea as well.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;space layout&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;space_layout&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:6,&amp;quot;range&amp;quot;:&amp;quot;5055-6092&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit7&quot; id=&quot;booting&quot;&gt;booting&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
having constant disk layout allows to hardcode boot device in u-boot. since second hard drive starts about 10 seconds after the first one, and USB is able to initialize in few seconds, pen drive is always /dev/sdb. thanks to this one can simply provide root=/dev/sdbX as the parameter for kernel, and save it as a &lt;em&gt;bootcmd&lt;/em&gt; u-boot&amp;#039;s parameter.
&lt;/p&gt;

&lt;p&gt;
u-boot does not handle ext4 (nor ext3, in fact), so the location with kernel image and dtb file needs to be ext2 ((v)fat? spare me… ;) ). however when powers goes down, ext2 can get damaged easily. to overcome this i&amp;#039;ve placed boot elements, on the separate, ext2 partition (50MiB is more than enough) while the remaining part of the system resides on ext[34]. this way i can mount ext2 on /boot as read-only filesystem and have root (/) as ext[34] and keep both u-boot and me happy.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;booting&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;booting&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:7,&amp;quot;range&amp;quot;:&amp;quot;6093-6946&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit8&quot; id=&quot;raiding_the_disks&quot;&gt;RAIDing the disks&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
for that price there are no hardware RAIDs – software solution is the only one. fortunately it works nicely under linux. usual stuff – &lt;a href=&quot;https://en.wikipedia.org/wiki/mdadm&quot; class=&quot;interwiki iw_wp&quot; title=&quot;https://en.wikipedia.org/wiki/mdadm&quot;&gt;mdadm&lt;/a&gt; is your friend.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;RAIDing the disks&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;raiding_the_disks&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:8,&amp;quot;range&amp;quot;:&amp;quot;6947-7143&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit9&quot; id=&quot;disk_quota&quot;&gt;disk quota&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
when multiple users use the same space it is beneficial to use per-user quota. this helps keeping space organized.
&lt;/p&gt;

&lt;p&gt;
installing &lt;em&gt;quota&lt;/em&gt; package under debian works like a charm. turning quota slows down transfer by about 5%.
&lt;/p&gt;

&lt;p&gt;
to start quota, on all quota enabled disks add:
&lt;/p&gt;
&lt;pre class=&quot;code bash&quot;&gt;modprobe quota_v2
quotacheck &lt;span class=&quot;re5&quot;&gt;-vaugm&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-F&lt;/span&gt; vfsv1
quotaon &lt;span class=&quot;re5&quot;&gt;-a&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
to the /etc/rc.local file.
&lt;/p&gt;

&lt;p&gt;
to enable user-level quota on a given partition &lt;em&gt;usrquota&lt;/em&gt; option must be passed when mounting.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;disk quota&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;disk_quota&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:9,&amp;quot;range&amp;quot;:&amp;quot;7144-7645&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit10&quot; id=&quot;i_o_performance&quot;&gt;I/O, performance&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
there is one pitfall. device&amp;#039;s CPU is not too fast. in fact, when it comes to encryption, it is dead slow. at first i wanted to make both data partitions encrypted, but i had to pass on that – after turning encryption on, i/o on the device dropped ~100x, making it simply unusable. similar thing applies to ssh – remote shell is fine, but if you plan to use &lt;a href=&quot;https://en.wikipedia.org/wiki/sshfs&quot; class=&quot;interwiki iw_wp&quot; title=&quot;https://en.wikipedia.org/wiki/sshfs&quot;&gt;sshfs&lt;/a&gt; to get to your data, think again. both CIFS and &lt;abbr title=&quot;File Transfer Protocol&quot;&gt;FTP&lt;/abbr&gt; work fine.
&lt;/p&gt;

&lt;p&gt;
in general, after installing own linux (i personally used &lt;a href=&quot;https://en.wikipedia.org/wiki/debian&quot; class=&quot;interwiki iw_wp&quot; title=&quot;https://en.wikipedia.org/wiki/debian&quot;&gt;debian&lt;/a&gt;/stable), performance does not change, compared to the standard firmware. what you can expect is about 25MB/s r/w via CIFS/&lt;abbr title=&quot;File Transfer Protocol&quot;&gt;FTP&lt;/abbr&gt; for bigger files (ex. disk images) and about 10-15MB/s for smaller ones (ex. pictures).
&lt;/p&gt;

&lt;p&gt;
generally device is slow. in times of &lt;em&gt;N&lt;/em&gt;TB disks it does take time to push data on the remote disks, connected to the &lt;abbr title=&quot;Domain Name System&quot;&gt;DNS&lt;/abbr&gt;-320. device can be considered as a nice, low cost solution, when performance is not critical and encryption not required.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;I\/O, performance&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;i_o_performance&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:10,&amp;quot;range&amp;quot;:&amp;quot;7646-8646&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit11&quot; id=&quot;ram_and_swap&quot;&gt;RAM and swap&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
debina/stable installation with CIFS enabled consumes less than 30MiB of ram, thus swap is not needed. in fact it is highly not recommended. swap on USB will shorten its life (when used) and on rotary disks will often spin it up/down. due to its low performance, swapping usually means device is dead for an a&amp;#039;priori unspecified amount of time.
&lt;/p&gt;

&lt;p&gt;
it is highly recommended to disable swap at all. if you&amp;#039;re sure you need, ensure swapinness is set to minimum, so that system will swap only when out of RAM:
&lt;/p&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;proc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sys&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;vm&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;swappiness&lt;/pre&gt;

&lt;p&gt;
in /etc/rc.local will do the trick.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;RAM and swap&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;ram_and_swap&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:11,&amp;quot;range&amp;quot;:&amp;quot;8647-9266&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit12&quot; id=&quot;disk_spin_down&quot;&gt;disk spin down&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
SATA disks should be spin down most of the time. it can be achieved with hdparm. i personally use 16 minutes of idle before spinning-down and do not spin down by default. to do so add following loop to the /etc/rc.local file:
&lt;/p&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; d &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; sda sdc
&lt;span class=&quot;kw1&quot;&gt;do&lt;/span&gt;
  hdparm &lt;span class=&quot;re5&quot;&gt;-S&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;192&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$d&lt;/span&gt; &lt;span class=&quot;co0&quot;&gt;# sleep after 16 minutes&lt;/span&gt;
  &lt;span class=&quot;co0&quot;&gt;#hdparm -Y    /dev/$d # got to sleep mode right away&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;done&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
for experiments note that even though &lt;em&gt;hdparm&lt;/em&gt; says it can set spin down after just a few seconds of disk being idle, in fact, for most drives it does not allow times shorter than 5 minutes. this is not a bad thing itself (after all shorter times usually mean either a configuration error or a brain error ;) ), but it would be nice of &lt;em&gt;hdparm&lt;/em&gt; to inform user about this fact and save some frustration.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;disk spin down&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;disk_spin_down&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:2,&amp;quot;secid&amp;quot;:12,&amp;quot;range&amp;quot;:&amp;quot;9267-10078&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit13&quot; id=&quot;data_partitions_mounting&quot;&gt;data partitions mounting&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
since /etc/fstab entries, not marked with &lt;em&gt;noauto&lt;/em&gt; are required to exist, it is better to mount external partitions manually, in /etc/rc.local. in case of hard disk failure, it will not prevent system from booting (keep in mind it has no screen nor keyboard attached).
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;data partitions mounting&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;data_partitions_mounting&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:3,&amp;quot;secid&amp;quot;:13,&amp;quot;range&amp;quot;:&amp;quot;10079-10387&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit14&quot; id=&quot;sys_stat_script&quot;&gt;sys_stat script&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
during usage of the device i found it convenient to have a common script for checking current state of the device: temperatures, FAN speed and disk states. all of this is reported by simple &lt;em&gt;sys_stat&lt;/em&gt; scripts:
&lt;/p&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;co0&quot;&gt;#!/bin/bash&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;CPU Temp: &lt;span class=&quot;es5&quot;&gt;`dns_temp 2&amp;gt;&amp;amp;1`&lt;/span&gt; C&amp;quot;&lt;/span&gt;
hddtemp &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sd&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;ac&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;FAN: &lt;span class=&quot;es5&quot;&gt;`cat /sys/devices/platform/gpio-fan/fan1_target 2&amp;gt;&amp;amp;1`&lt;/span&gt; RPM&amp;quot;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;sys_stat script&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;sys_stat_script&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:3,&amp;quot;secid&amp;quot;:14,&amp;quot;range&amp;quot;:&amp;quot;10388-10786&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit15&quot; id=&quot;using_encryption&quot;&gt;using encryption&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
device itself is unable to do real encryption because of the performance. it is possible however to store data, encrypted on the client side (i encrypt my backups for years now – it does not cause any trouble :) ).
&lt;/p&gt;

&lt;p&gt;
there is a nice package called &lt;a href=&quot;https://en.wikipedia.org/wiki/ecryptfs&quot; class=&quot;interwiki iw_wp&quot; title=&quot;https://en.wikipedia.org/wiki/ecryptfs&quot;&gt;ecryptfs&lt;/a&gt; that does just that. it allows user to mount one directory to another, making its content encrypted on the per-file basics. further more file names can be mangled as well, so that when not mounted, directory&amp;#039;s content looks like a random garbage. though this is a &lt;a href=&quot;https://en.wikipedia.org/wiki/Filesystem in Userspace&quot; class=&quot;interwiki iw_wp&quot; title=&quot;https://en.wikipedia.org/wiki/Filesystem in Userspace&quot;&gt;FUSE&lt;/a&gt;-based fs, performance is not hurt, since it is still much faster than &lt;abbr title=&quot;Domain Name System&quot;&gt;DNS&lt;/abbr&gt;-320 itself.
&lt;/p&gt;

&lt;p&gt;
in general such an on-the-fly encryption gives better performance and does not require to preallocate space for the loopback, crypto device.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;using encryption&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;using_encryption&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:4,&amp;quot;secid&amp;quot;:15,&amp;quot;range&amp;quot;:&amp;quot;10787-11608&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit16&quot; id=&quot;minimizing_disk_i_o_idea&quot;&gt;minimizing disk i/o (idea)&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
hard disks i/o is to be minimized. spin up and down does limit drives&amp;#039; life time. additionally starting and running disk causes an extra noise. when it comes to the pen drives, r/w cycles are highly limited.
&lt;/p&gt;

&lt;p&gt;
fortunately device has a lot of RAM. after installing and configuring debian, device typically uses less than 30MiB of RAM – this means that almost 100MiB are not used at all, most of the time. also not all applications need full disk i/o – examples are internet radios and slow torrents.
&lt;/p&gt;

&lt;p&gt;
the solution would be to introduce virtual, hierarchical storage, that would occupy RAM, USB pen drive and SATA disks. RAM would be used by default. when RAM is full, or some predefined amount of time would pass, it can be flushed to pen drive (low power, low noise and persistent) and when pen drive space (i.e. dedicated to this virtual drive) is full, it would be all flushed to the rotary disks. this way up/down spins would be limited to a minimum.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;minimizing disk i\/o (idea)&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;minimizing_disk_i_o_idea&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:4,&amp;quot;secid&amp;quot;:16,&amp;quot;range&amp;quot;:&amp;quot;11609-&amp;quot;} --&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 15 Jun 2021 20:09:50 +0000</pubDate>
        </item>
    </channel>
</rss>
