WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: MDADM with TinyCore - system hangs  (Read 1847 times)

Offline HeartOfGermany

  • Newbie
  • *
  • Posts: 4
MDADM with TinyCore - system hangs
« on: February 22, 2018, 10:50:43 AM »
As short as possible:

I have:
Fujitsu Futro S550 (1x1Ghz Sempron 2100+, 512mb RAM, 512MB CF Card, PCI-4xSata Card, PSU for 4x2TB WD Nasware HDDs)
TinyCore installed

I want:
Raid 5 (MDADM)
SAMBA

I did:

bootup  .sh
- Assemble Raid
- Create user nas (no PW)
- Create dir in /home/nas/raid for mounting RAID
- Mount Raid
- Create SAMBA user nas (also no pw)

It finally boots up and without setting anything else up it instantly can work with my windows 10 PC.

Transfering small files works perfectly fine. Moving (just for test) "all_in_one_runtimes_installer.exe" with 330mb size works not so good! It starts good with 60mb/s, just before the end it slows down to less than 2mb/s and than tiny core user interface is no more usable!

I already checked, if the files get saved to /dev/sde1 (512M CF), but they do not - there is not even enought space for the file anyway, yet it finishes upload. SAMBA still is active (usable through windows, but very slow even for tiny files in order of 5kb)

Even after some time the system does not react at all. What am I doing wrong? CPU is not hot (so no 100% usage)

Is it a RAM related issue, or is the kernel crashing or something? Please help. I am very frustrated - worked over 5-8 hours to get to this stage and now large files crash the thinclient. Why not with small files?


Please help, thanks.


Edit:

When trying to move another file, I get the message from windows, that there is not enought space - how??? 4x2TB-2TB - 6TB of space on the raid!

Edit2:

I found the problem! I tried just a 100MB file and still the system did show no change in disk space - after rebooting however, it showed it is 91% full instead of 54%.

So I think, even though I did mount the RAID in /home/nas/raid, the files do not save on the RAID, they save locally. But how is it possible? I mean, the folder RAID shows as a HDD - but only that one. The folders inside do not. Also, the "properties" of the folder should show details of the raid with the max size, but it only shows, it is located in /home/nas/raid and is 100MB large. No max capacity shown, though it should show the capacity of the RAID.

It worked before (but not SAMBA :P). Why does it not save the files on the mounted drive, but locally?
« Last Edit: February 22, 2018, 11:11:33 AM by HeartOfGermany »

Offline HeartOfGermany

  • Newbie
  • *
  • Posts: 4
Re: MDADM with TinyCore - system hangs
« Reply #1 on: February 22, 2018, 11:28:19 AM »
Sorry, edit button vanished because of time.

I wrote down everything, that I modded:


Edit xyz:

bootlocal.sh:
Code: [Select]
sudo mdadm --assemble /dev/md0 /dev/sda1 .... /dev/sdd1
mkdir 777 /home/
mkdir 777 /home/nas
mkdir 777 /home/nas/raid #(because booterror occoured "Cannot mount.... folder das not exist)
sudo mount /dev/md0p1 /home/nas/raid
sudo adduser -D nas
sudo smbpasswd -a -n -nas
sudo smbd restart # (so it definitely reloads stuff)
sudo nmbd restart
sudo smbpasswd -a nas #(again, because it did not let windows acces before)


bootsync.sh:
Code: [Select]
sudo chmod 777 /etc/init.d
sudo chmod 777 /etc/init.d/services # (make sure, smbd service has no problems to run and change stuff)
sudo mkdir -m 777 /usr/local/etc/samba/private #could not create configs before
/usr/bin/sethostname raid # why not?
/opt/bootlocal.sh &

sudo mount /dev/md0p1 /home/nas/raid

sudo smbpasswd -a -n nas # yeah, again - I know I am bad!


.filetools.lst:

Code: [Select]
opt
home
etc/init.d
usr/local/etc/samba
bin/false
etc/samba
usr/lib/systemd
mnt/mdop1 # (tried samba directly on standart mount folder)
home/nas/raid
etc
# half of the filetools.lst entries had a reason, but I lost memory of what went to where - basically I had problems, that many files where not there anymore, when rebooting, so samba gave out errors like "secrets.db" not found.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: MDADM with TinyCore - system hangs
« Reply #2 on: February 22, 2018, 01:25:53 PM »
Maybe something in your samba config has a wrong dir, and so the files went to RAM? edit: I see you backed up /home/nas/raid! That means everything gets saved to both your RAID and your 512mb CF.

Also, your setup between bootlocal and bootsync is quite curious, competing mount and password commands. Those should be in one file only.
The only barriers that can stop you are the ones you create yourself.

Offline HeartOfGermany

  • Newbie
  • *
  • Posts: 4
Re: MDADM with TinyCore - system hangs
« Reply #3 on: February 22, 2018, 01:40:31 PM »
Yes, it is a bit chaotic. Definitely!

It gets written to the RAID and the CF? Wow, did not think about that.


I guess the problem is, that the system mounts the home directory to the CF first on bootup and than the raid - so how do I stop the system from mounting the user "nas" to the CF, instead only to the RAID?

I mean, I guess it does not matter, where I mount my RAID - all files will be mounted to the CF. Is there some sort of exclusion list or so?



Edit:

Ok life sucks...

I manually ran the command "sudo mount /dev/md0p1 /home/nas/raid and it properly worked! I found out, that the RAID did not mount properly on bootup - the folder did show as a drive, but it was not working as a drive. Going on with troubleshooting... man I hate it, if it does not work as it is supposed to work.
« Last Edit: February 22, 2018, 01:54:21 PM by HeartOfGermany »

Offline HeartOfGermany

  • Newbie
  • *
  • Posts: 4
Re: Solution!
« Reply #4 on: February 22, 2018, 04:11:30 PM »
Solution - if anyone ever has the same problem:


to the shell just add a sleep timer (mine is 30s which is plenty!) and than sudo mount....

The problem seems, that the RAID is not ready to mount, when the command is run - just let the system boot up a few more secounds and it will/should work!

Good luck to everyone.


BTW: Read-speed on average is about 30-35MB/s and write is on average 25mb/s. Since the CPU is not at 100% and RAM is only 100/500, it seems the PCI add-in-card slows down the whole raid - so if you expect performance, stick to PCIe if possible. A single PCIe lane is much faster than that!


Guys, have a nice day! And still thanks.  ;)