Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Rescue Toaster
Mar 13, 2003
I had two questions in relation to a small NAS machine I want to build.

A) Is it straightforward to set it up so me & my roommate can both use VNC (are the kids still using VNC these days?) at the same time to connect to separate X instances logged in as ourselves? Seems like this might not even be possible due to the way X works with video hardware and such...

B) I'll be doing software RAID5 via md. I don't want extra discs that can fail in the machine (and it only has 4 SATA ports anyway). Is it practical to use a small compact flash (connected to IDE) or even a USB flashstick as the /boot partition so root and everything else can be on the RAID array? Does /boot get written to a lot - wearing out the flash?

Thanks!

Adbot
ADBOT LOVES YOU

Rescue Toaster
Mar 13, 2003
I posted earlier that I'm building a little RAID NAS machine and I've ordered the parts. My plan is to use ubuntu just since I'm comfortable with it, and my questions now primarily concern permissions.

It seems easy enough to put all the users in a group and give the group permissions to a large shared folder, and then each user having their own folder as well. Even though none of the accounts will ever be logged in locally they'll still have home folders.

Since everyone in the group will have write access to the shared folder, I need to make sure someone on a windows machine (in particular) can't accidentally delete everything.

So I'm looking at three things here:

A) Is there a way using samba and the 'sticky bit' to make it so NO-ONE (even the original owner, preferably) can delete files from a group shared folder. If we have to log into a third 'super' account (even VNC'ing to the machine) to delete files that is OK. Though this is the least favorable option.

B) Does the trash/undelete system in ubuntu (or any similar systems) work if a file is deleted via someone connected to the samba server? Sounds like this can be done with vfs_recycle for vfs, but I'm not real familiar with vfs stuff.

C) Have the system set a volume shadow copy point every day, and release the one that's 2-3 days old automatically. This seems very fire & forget which I like. If the shadow volume was the entire system drive I could in theory recover from a trashed OS too.

RAID5 should protect me from hardware failure, now I need to find a good strategy for user failure.

Rescue Toaster
Mar 13, 2003
Samba performance is so bad it has caused me to start smoking again.

I have Debian up & running on my little NAS machine. Getting md Raid 5 configured during install was a breeze and the machine was a snap to setup.

Setting up the samba shares/permissions took a little time but I think I have it behaving correctly.

Connecting to the samba shares from a Win XP machine, I can transfer files *extremely* fast. In excess of 60MB/s with my gigabit setup. The transfer begins instantly and finishes normally with no apparent hangs/trouble at all.

EDIT: Cut out me talking about various media player skipping/dropping frames problems because I discovered this more clear source of the problem...

While I can copy files TO the samba machine at speeds in excess of 60MB/s, copying files BACK (from the samba share to my Win XP machine's local HD) is about 1/250th as fast. A 1 GB file takes ~15 seconds to copy to the samba machine and over an hour to copy back. Speed from Win XP -> Samba machine= ~533 Mbit, from Samba -> Win XP machine= 2 Mbit (tops).

Rescue Toaster fucked around with this message at 02:37 on Mar 2, 2008

Rescue Toaster
Mar 13, 2003

deimos posted:

What filesystem? Samba plays much nicer with some FSes than others, XFS is one of the better ones IIRC, ext3 one of the worst.

Yeah, it's ext3... but I can WRITE to the drive at over 60MB/s when copying to the samba share, and read from it at only 2Mb/s when reading from it. The very, very, very little helpfull information I've found online shows it happens independent of hard drive types or filesystem.


EDIT: Turns out the default kernel module for the Realtek RTL8111-series network cards has extremely bad performance w/ samba when sending data out. Replacing the R8169 module with the one downloaded from realtek's site (R8168) almost totally fixed it. It's still asymmetric... 60MB to samba, 40MB/s from samba, but it's usable. Those network controllers are pretty common on Intel's ICH9 systems so I hope debian/ubuntu switch the default driver.

Rescue Toaster fucked around with this message at 09:26 on Mar 2, 2008

Rescue Toaster
Mar 13, 2003
I've got a pretty hopeless question...

Is there any reason certain programs/daemons would not be able to access the network whatsoever even though everything else is working properly?

I've got XBMC-Live running on Ubuntu 10.04 LTS. Internet works perfectly from command line, even as the xbmc user. I have other servers and daemons (smb, deluge) that access the network perfectly, as does SSH from my desktop.

But for some reason xbmc-live cannot access the network whatsoever. The XBMC forums (The Least Helpful Place On Earth) are of course useless. The only thing I can think is somewhere in the init scripts (it uses upstart) something is happening that the program is being denied internet access when it starts.

Rescue Toaster
Mar 13, 2003
When I, for instance, try to scrape, I see some DNS requests:

192.168.1.5 -> 192.168.1.254 DNS Standard Query AAAA api.themoviedb.org

and finally a response:

192.168.1.254 -> 192.168.1.5 DNS Standard Query response CNAME[Packet size limited during capture]

But there are never any http (or otherwise) attempts after that point.



From what I can see, it's the ubiquitous ipv6 & ubuntu incredibly-slow-web-browsing problem screwing up libcurl. Supposedly setting ipv6.disable=1 in the grub kernel line fixes it. I'll have to test that.

EDIT: Yeah it was ipv6. I had it before a long time ago on my laptop. Something about my ISP reporting it supports ipv6 at least partially, so ubuntu always tries that first and chokes unless you disable it completely.

Rescue Toaster fucked around with this message at 01:07 on Nov 27, 2010

Rescue Toaster
Mar 13, 2003
EDIT: Once again, I blame linux for something that was microsoft's fault (probably). Adding these lines to Win7's registry:

; Speedup settings
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System]
"SlowLinkDetectEnabled"=dword:00000000
"DeleteRoamingCache"=dword:00000001
"WaitForNetwork"=dword:00000000
"CompatibleRUPSecurity"=dword:00000001

Brought my samba performance from 2MB/s to 70MB/s... but as far as I can tell, none of these settings should have anything to do with network performance, only profile timeouts and the like. :bang:

Rescue Toaster fucked around with this message at 17:56 on Apr 7, 2011

Rescue Toaster
Mar 13, 2003
Can anyone tell me what it is that's failing to load here? Window manager? Some part of compiz? I don't even know what log to inspect (ubuntu 11.04). I'm running the nvidia proprietary drivers. Usually just doing a log out and back in fixes it, but not always. I'm getting sick of the 'Windows 2000' theme if you will.

Only registered members can see post attachments!

Rescue Toaster
Mar 13, 2003
Thanks. It's hard to search when you don't even know how to describe the problem.

Rescue Toaster
Mar 13, 2003
Any advice on how to track down mystery kernel panics? I have two ryzen systems, a 2700 and a 3600, both doing lots of VM stuff (qemu, xen at different times). The 3600 has no problems with any kernel, but the 2700 has started mystery reboots whenever the host or dom0 (for xen) is running newer kernels. I think some of the earlier 5.x kernels were okay... ish... though they would still crash very occasionally, but newer stuff 5.11+ crashes like crazy. Memtest still runs just fine and the system is absolutely rock solid on a 4.x kernel.

The machine freezes for a few seconds and then reboots into the BIOS startup. I tried disabling reboot on panic but it still resets, and the /sys/fs/pstore stuff doesn't seem to work even though kernel config says it's enabled. Pretty sure modern PC motherboards don't have a JTAG connector to hook up to so I'm at a loss. Just stay on a 4. kernel literally forever? My only other thought would be to try to add a serial console to the kernel cmdline and monitor it from another computer to see if it spits anything out when it happens, but I don't think that motherboard has a real serial port, unless I add a PCIe serial port card maybe.

Rescue Toaster
Mar 13, 2003

CaptainSarcastic posted:

Is the BIOS appropriately updated on the problem machine? Microcode up to date?

It looked like the newer BIOS updates were only for adding newer Ryzen support, there was no mention of anything for the older 2000 series. But there is newer AGESA obviously so maybe I'll give it a shot. Who knows, maybe that'll fix the pstore not working since it's tied in to the UEFI variables.

Just to be sure, if /etc/sysctl.conf has the panic.reboot = 0, and then /proc/sys/kernel/panic is 0, that should do it as far as auto-reboot?

Rescue Toaster
Mar 13, 2003

Klyith posted:

Complete speculation warning: one thing that's different between Zen+ (the 2700) and Zen 2 & higher is hardware support of Mode-Based Execution Control, which is part of the virtualization feature set.

I can't imagine that a default kernel would try to use MBEC on a CPU that doesn't have it. The kernel should know the capabilities of a CPU it's running on. But if you've doing something like imaged the same set-up between both PCs complete with custom kernel flags, that might do it? Or especially if you're compiling your own kernel on the 3600 and then copying to the 2700.

Anyways if you're doing the same thing on both CPUs, that's the one big thing I know is not the same between the two.

Interesting. I haven't messed with anything so I'm assuming the kernel is detecting it right. But it does seem to specifically be related to VM launching/stopping, so that's a clue for a difference anyway.

Rescue Toaster
Mar 13, 2003
What am I missing there, FUTEX_WAKE doesn't block, and the fact that strace of the call has a return value means it's complete. And if you're talking about _PRIVATE stuff, once the process is gone, all its private futexes are too?

These are in the docker cli?

Rescue Toaster
Mar 13, 2003
Yeah the = 0 at the end means, the call returned and there's no errors.

For instance, if you do a
code:
strace sleep 5
You'll see it temporarily hangs like this:
code:
clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=5, tv_nsec=0}, NULL)
And then after the sleep is complete you'll see the return value and the last few calls:
code:
clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=5, tv_nsec=0}, NULL) = 0
close(1)                                = 0
close(2)                                = 0
exit_group(0)                           = ?
+++ exited with 0 +++
So what's really going on is either A) the program is busy doing something that doesn't involve system calls. or more likely B) there is another thread blocked on something previously. Use strace -f to see threads. For example, I created this program that creates two threads and they each sleep for different amounts of time, so you'll see output like this:

code:
[pid 18628] clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=1, tv_nsec=0},  <unfinished ...>
[pid 18629] clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=2, tv_nsec=0},  <unfinished ...>
<snip some other crap>
[pid 18628] <... clock_nanosleep resumed>0x7fb5754b7dc0) = 0
Now if we were to get stuck here... it would look like we were sitting at a 'completed' syscall, but we're really waiting for the 2 second delay that started above in thread 18629...
[pid 18629] <... clock_nanosleep resumed>0x7fb574cb6dc0) = 0
Short version, if you want to see what you're actually blocked on with strace, you need to at minimum use -f to see all the threads and look for previous unfinished calls.

Rescue Toaster
Mar 13, 2003

ExcessBLarg! posted:

As with everything, the situation with modern SSDs is more complicated. I've yet to see a SSD in the field that just has "a few" unrecoverable sectors. In my experience if something goes wrong with them it's always more catastrophic. That could just be anecdotal though.

You're correct, most people are grossly overestimating how reliable SSDs are. Lots of 'Well when it fails it just becomes read-only!' kind of bullshit gets repeated constantly. They fail in strange hard to diagnose ways too. Like you can write to a block, read it back, and it's correct, and then seconds/minutes/hours later it drifts out and the data is corrupted next time it is read. Everything depends entirely on how the controller firmware was implemented, and they can really be all over the map. Though things are probably better these days if you're sticking to the main brands, there is a lot of god awful SSD firmware kicking around out there waiting to blow up in weird ways.

Rescue Toaster
Mar 13, 2003
My weird-rear end un-diagnose-able panics that kept happening with Xen and other VM stuff finally went away when I upgraded to kernel 6.x! If anybody else is having problems with Ryzen 2000 series & VMs, give that a shot I guess.

And when I shut down, my machine actually shuts down instead of rebooting! Holy cow, it's a miracle.

Rescue Toaster
Mar 13, 2003
Is there a way to mount a gvfs mount from the command line?

I have some samba shares setup and there's a 'Places' entry in Thunar like "/shared/ on 192.168.x.y"... and if you click it it will auto-mount in /run/user/<uid>/gvfs/smb-share:server=blahblahblah/ using credentials it stored... somewhere? The keyring?

The issue is I have a couple apps that freak out if the share isn't mounted when they launch, and will flush their music libraries and other dumb poo poo. For now I've set the launcher to be a script that checks if the folder exists and doesn't launch if not, but it would be nice to trigger the mount from the command line, as if I had clicked on it in Thunar. But I can't really find exactly the right syntax, in particular how to use the same saved credentials.

Rescue Toaster
Mar 13, 2003
Sorry I should have said I know it's possible to mount it as root via fstab or systemd or something. Thank you though.

I'm genuinely interested if it's possible to do it with the same kind of gvfs mount somehow using the same credentials. When mounted this way they don't even show up with 'mount' in a terminal which is an interesting quirk.

Rescue Toaster
Mar 13, 2003
Should the installation images for modern distros support secure boot? I know lots of distros can do various secure boot configurations and there's instructions once you're up and running and need to update a kernel and so forth.

I tried a couple and got secure boot errors, and so ok well I'll disable it and think about enabling it later. But that does sort of defeat the purpose. I verified the hash and signature on the install medium so it's not that, and I'm not like, worried about it or anything, more a curiosity.

Rescue Toaster
Mar 13, 2003
Man docking station stuff still seems like an absolute train wreck in linux.

A) Power management settings can't seem to differentiate between on a standalone USB-C power pack or on the dock, so if you want the laptop to only stay on when the lid is closed if it's on the dock, not just on the power adapter, doesn't seem to be a way to do that.

B) Window management stuff is an absolute shitshow. Every single version of every distro and window manager handles it differently (or not at all). Right now on mint-mate there's seemingly no way to disable the built-in screen at all when docked, even if the lid is closed. It's possible to create some command line udev scripts maybe? But if it ever gets out of sync or boots up in the wrong mode, you might be stuck with no display unless you were to... I don't know, have a process running continually monitoring for the presence of the USB-C dock device?

In fact I think the *easiest* thing might be to write from scratch my own daemon in python or something to continually monitor for the presence of the dock and run xrandr commands from a shell when necessary, and that's frankly loving pathetic.

Rescue Toaster
Mar 13, 2003

Subjunctive posted:

you could probably use udev triggers to set things up, but you’d need to be careful about things like undocking while suspended if udev doesn’t synthesize the right events

Yeah that's the exact kind of situation I'm worried about. You could try to catch all the insert/remove of the dock, power actions, lid open/close, sleep/suspend/startup etc... and still end up missing something. That's why I almost feel like it needs continuous monitoring (Every 3-5 seconds or something).

The other side of it is it's for my wife so it really needs to just work. She's been totally happy with linux but she's not going to put up with "Oh just put some shell scripts on your desktop to fix the broken poo poo and run them manually." which doesn't even work if the desktop isn't showing on the right screen. First time I tried the dock it happily detected the second monitor, but then when I locked the screen it only showed the login prompt on the laptop monitor even though it was sitting there with the lid closed.

Rescue Toaster fucked around with this message at 02:22 on Dec 7, 2023

Rescue Toaster
Mar 13, 2003
I mean people have been doing software RAID5/6 and ZFS raid for decades. I know I had a RAID5 mdadm setup running on a freaking celeron in ~2007 or so. Spinning disks are maybe like 2-3x as fast as they were then, while CPUs and memory are astronomically more powerful. I don't think it'll be an issue.

Unless you're using SSDs in your raid I guess.

Rescue Toaster
Mar 13, 2003
A dumb syslog/journal question:

I have a debian machine that's only running journald, no rsyslogd. (So there is no /var/log/syslog*) There's a service (nut-client, aka upsmon) that writes to syslog.

Shouldn't this be putting stuff into the journal? I can't see any of the messages I used to expect from upsmon with journalctl -u nut-client.service nor journalctl -xe.

Adbot
ADBOT LOVES YOU

Rescue Toaster
Mar 13, 2003

hifi posted:

Lol, but it's also depressing that there's not really a way to get testing infrastructure to find this stuff out until some gormless idiot using arch linux steps right into a cow pie. I remember reading... a linus email? about this kind of situation about kernel testing RCs. God bless you bleeding edge rolling releasers

This was first discovered in debian sid, and I don't think this ever got into Arch. Even the arch security notice is overly cautious. Not only does sshd not link against libsystemd on arch, my understanding is the payload is only packaged in .rpm and .deb formats, it literally never went out to arch users at all. They rebuilt from the repo source, but I've seen at least one person say the 'fixed' and 'bad' binaries are identical anyway.

That said, everybody needs to (and most already are) looking at how to roll everything back before this person got involved two years ago. There's hundreds and hundreds of commits that are all questionable.

This was I think even more lucky than people realize too. It sounds like libsystemd was removing the dependency on liblzma soon, so there was a window here for the big debian & fedora spring releases to hit the sweet spot, and they probably rushed things too much and got caught.

Rescue Toaster fucked around with this message at 23:18 on Apr 1, 2024

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply