Linux - Reddit – Telegram
Linux - Reddit
764 subscribers
4.19K photos
207 videos
39.9K links
Stay up-to-date with everything Linux!
Content directly fetched from the subreddit just for you.

Powered by : @r_channels
Download Telegram
Dynamic disks, switch them too

# Little story

*I have to tell a story here, if you just want the important main information: TL;DR at the bottom my dude. :\**

Two identical mini PCs that were intended for use in a control cabinet were disposed of at work. One of them had a simple defect: the hard drive was dead. These devices are disposed of even if they are repairable. (Because of reasons)

So I quickly replaced the hard drive and one of them worked again. Pretty nice, passively cooled single-board computer, relatively powerful. (As a new purchase, it would cost around €500.)

So I took it with me to build a small homemade NAS, because it still had two free SATA ports and some space in the case for two 2.5" hard drives. I quickly installed Linux on it to test it out. It worked wonderfully and without any additional driver searches.

But there was a problem: there was no standard way to power the additional SSDs. Fortunately, there was a free USB 2.0 header on the board. I read up on this and found that these things deliver around 2.5W @ 5V. The sources were contradictory on this point. And unfortunately, the mind-reading, perfect Google of 2013 no longer exists. :P So I was not sure. I decided to just give it a try. I ordered an SSD that, according to the shop filter, needed around 2.5W. And I powered it via the USB header. It, worked! (Even if datasheet said afterwards: yo need 3W on write.)

From this point on, I invested a lot of time reading up on the subject. I had to rack my brains a lot because some things didn't work right away the way I imagined they would.

I set up Openmediavaul, but it was buggy, so I switched to a server distro with SFTPGo because it looked nice and simple. And it was.

Just as I had started migrating the data, I noticed a problem that would keep me busy for a month: data transfers were painfully slow. Definitely not what I wanted.

So I did a lot of research because I didn't want to wipe the setup again. But I just couldn't find any useful information. ^((Google bad)) I benchmarked my network connection between PC \~ NAS, 980Mbps, everything fine. So I suspected the problem was with SFTPGo and eventually gave up.

Next attempt: TrueNAS. Everything set up, which took longer again due to problems with access rights and stuff, because of multiprotocol overlaps. Then I started migrating the data... Slow again, \~ 5MB/s -.-

I continued to suspect that the problem was with the software and spent ages researching solutions and configuration options. Nothing. Maybe it is a problem with the power supply after all? I connected it to my PC's power supply. Same problem. Then I benchmarked the hard drive. (Yes, I realize I should have done that beforehand. :P)

dd if=/dev/zero of=/mnt/ssd/test/test.txt bs=1G count=1 oflag=dsync
1+0 Datensätze ein
1+0 Datensätze aus
1073741824 Byte (1,1 GB, 1,0 GiB) kopiert, 3,52969 s, 304 MB/s

Everything is fine. So WTF is wrong!? Why are data transfers as slow as with a fucking old USB stick!?

Yea... How about a benchmark of the read speed on my PC? Even though I don't think that can be the reason...

time dd if=/mnt/dynamic-ntfs/Videos/Filme/Interstellar.mp4 of=/dev/null bs=8k
^C77409+0 Datensätze ein
77408+0 Datensätze aus
634126336 Byte (634 MB, 605 MiB) kopiert, 39,8158 s, 15,9 MB/s

o\_\_\_\_\_o

Yea... Thing is: I switched to Linux. And did you notice where the file is? Yea, its a mount.

I've created an dynamic disk under windows. Thats something like LVM, to access multiple physical drives as one logical one. But when I switched to Linux, I didn't want to wipe them out. So I looked for a way to mount them under Linux. The ldmtool is available for this purpose. ([ArchWiki](https://wiki.archlinux.org/noscript/Dynamic_disks))

It didn't even occur to me. I hadn't even remembered that I had mounted the SSDs that way. So I was looking in the wrong place the whole time. And I never noticed it before, but ldmtool mounted drives are just really slow.

A little story about how you can spend a long time looking for the cause of a
problem in the wrong place(s)...

^((Nevertheless, Google is now only a shadow of its former self. And that was time consuming as well.))

# TL;DR

If you are using ldmtool to mount windows dynamic disks, you should know: that the overall I/O performance is really low. Consider to switch them to LVM, BTRFS in JBOD config or something like that.

https://redd.it/1m97p1c
@r_linux
This media is not supported in your browser
VIEW IN TELEGRAM
Yall wanna see so many people that hate Linux for some reason but don't even know what they're talking about?
https://redd.it/1m9i46t
@r_linux
SPDIF TosLink Troubles (GNU-Linux)

If anyone has had issues with PCM 48 over TosLink—Zorin OS for some reasons cooks Fedora based distros and NixOS in the task.

I don't really know why and I've already spent way too much time trying to solve it on NixOS.

But basically, distros other than Zorin were just crackling on playback no matter what I'd do. So in the off chance you have this issue too, give Zorin OS a go before you give up 💙

And if you know the reason why, feel free to leave a comment about it! There aren't many conversations about TosLink around.

https://redd.it/1m9irc6
@r_linux
The Linux Concept Journey — kexec (Kernel Execute)

“kexec” (Kernel Execute) is a set of Linux system calls (https://medium.com/@boutnaru/the-linux-concept-journey-syscalls-system-calls-efcd7703e072) which provides the ability to load and boot\\reboot into a new kernel from the currently running kernel. It can help in cases in which we want to reboot very fast without waiting for an entire boot process (https://wiki.archlinux.org/noscript/Kexec). Moreover, we can use the “/sbin/kexec” binary for that using the following syntax: “kexec -l kernel-image — append=command-line-options — initrd=initrd-image” (https://linux.die.net/man/8/kexec).

Overall, the difference between a normal “system boot” and a “kexec boot” is that the hardware initialization performed by the firmware (like BIOS\\UEFI) is not done in case of a “kexec boot” (https://linux.die.net/man/8/kexec). Thus, “kexec boot” loads a new kernel and jumps to it while bypassing the firmware and the bootloader like GRUB (https://medium.com/@boutnaru/the-linux-concept-journey-gnu-grub-gnu-grand-unified-bootloader-0a1e64067315). Examples of use-case are: first step in generating a crash dump and during kernel development when frequently building and rebooting the kernel (https://blogs.oracle.com/linux/post/reboot-faster-with-kexec).

Lastly, a new kernel image can be loaded from a memory segment using the “kexec_load” syscall (https://elixir.bootlin.com/linux/v6.15.5/source/kernel/kexec.c#L242) or from a file using the “kexec_file_load” syscall (https://elixir.bootlin.com/linux/v6.15.5/source/kernel/kexec\_file.c#L332). Also, for enabling the “kexec” system call we should enable “CONFIG_KEXEC” (https://elixir.bootlin.com/linux/v6.15.5/source/kernel/Kconfig.kexec#L20). By the way, “kdump” (Kernel Dump) is based on kexec for quickly booting to a dump-capture kernel in case a dump of the system kernel’s memory needs to be taken. An example is when the system panics (https://docs.kernel.org/admin-guide/kdump/kdump.html) — as shown in the diagram below (https://cloud.tencent.com/developer/article/2431825).

https:\/\/cloud.tencent.com\/developer\/article\/2431825



https://redd.it/1m9ocdh
@r_linux
Which is the single most time saving hack you used in Linux?

Which commands, tool or hack or anything has saved a lot of time for you on repeated tasks that you do daily? What thing in your experiences saved you much time and effort that you thought you should have learned earlier?
I just used alias "c" for clear and it saves a lot of time and effort.

https://redd.it/1m9ra4r
@r_linux
Suggestions for M.2 WiFi / Bluetooth card that have good compatibility with Linux?

Hey all - noscript says it all. Looking for suggestions for M.2 WiFi / Bluetooth cards that have good compatibility with Linux?


I've got 2 little HP Elitedesk 701 AMD A10-powered mini PCs with Intel 7200-something series WiFi cards that do not play nice with Linux at all, so was just looking for something that would work and is plug and play.

Thanks!

https://redd.it/1m9sjae
@r_linux
My local Lowe's has its check-out computers running Linux.
https://redd.it/1m9v28p
@r_linux
parallel-disk-usage (pdu) is a CLI tool that renders disk usage of a directory tree in an ASCII graph. Version 0.20.0 now has the ability to detect and remove hardlink sizes from totals.
https://redd.it/1m9v27o
@r_linux
Oh blessed day, my dad was down with a dual boot to try and daily drive Linux Mint! His first Linux distro!

Hello everyone, my dad who got me into computers back in 2006 or so has gotten out of them and just stuck to windows, but today after he's gotten a new desktop a while back he's down with trying to daily drive linux mint!

He uses SDRs and other radios and softwares but they're usually old so I feel we should be able to use them on wine, if not that's the reason for the dual boot, he doesn't use it daily or even weekly.

He spends a lot of time trying to make windows faster, more secure, etc. but he really can't so I think he'll love playing with this, not having to play with it, or maybe even learning about real security (I'm in Purple Team security so I can help guide him and teach him) like firewalls and static code scanners and stuff instead of Geek Squad and random youtube tutorials lol

Just was excited and wanted to share!

Cheers!

https://redd.it/1ma7ogk
@r_linux
finally got linux installed on this computer...yay
https://redd.it/1maat5c
@r_linux
Why I do not like to see AI tools are implemented to distros!
https://redd.it/1mahi8o
@r_linux