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
Storm One
Jan 12, 2011
If you mount filesystems noatime, as one should, atime will sort of work like NTFS creation time. Preserving the atime across filesystems is harder than NTFS creation time, GNU cp can preserve atime with the -a option but tar and rsync won't.

Adbot
ADBOT LOVES YOU

Storm One
Jan 12, 2011
I use it on all my data drives with no issues so far :shrug: root is on ext4 because APT doesn't like COW filesystems.

I don't think most users care about RAID, btrfs is the only major fs with data checksumming on the kernel.

Storm One
Jan 12, 2011

FishBowlRobot posted:

Intel Core 2 Duo @ 2.93 ghz
4gb RAM
Radeon HD 5750, 1GB

What would run smoothly on my machine? Any distros I should avoid?
I have a Core 2 Duo @ 2.4 GHz but with 8GB RAM and a garbage AMD GPU, Debian with XFCE desktop runs wonderfully. The 4GB shouldn't be a concern because memory use stays consistently below 2.5GB for me, even when browsing. My AMD GPU does require the AMD firmware package from the nonfree repo, don't know about yours.

Storm One
Jan 12, 2011
yeah, that's not how you spell ohtori

Storm One
Jan 12, 2011
+1 for KeePassXC, and as you've noticed JS-heavy browsing on an old dual-core is going to suck no matter. I'm running Xfce and average RAM usage is under 3 GB, with over 1/3 of that going to Firefox alone.

Storm One
Jan 12, 2011
I want to launch a GUI file manager as root from my user session, "pkexec thunar" did that, now it doesn't anymore. What do I need to fix? Debian, Xfce.

Storm One
Jan 12, 2011
gksudo is not part of Debian anymore, so no.

EDIT: fixed by rebooting :doh: apparently

Storm One fucked around with this message at 03:09 on Sep 27, 2020

Storm One
Jan 12, 2011

xtal posted:

Probably had to restart polkit? It's the daemon pkexec uses right? Clearly I have not caught up since gksudo though.

Maybe? Earlier in the day, I did have to puleaudio --start because I had no sound, so that's probably it.

In hindsight, I should have started by reporting that this happened after moving the root drive from one computer to another and expecting it to Just Work (which tbf it mostly did) and having to install AMD firmware from nonfree because of the GPU in the new (actually older) motherboard. All of which also happended to coincide with the day Debian updated from 10.5 to 10.6.

Storm One
Jan 12, 2011

xtal posted:

Advantages of zfs over btrfs:
- More sophisticated checksumming

What do you mean, what are the differences between the two? (checksumming is 100% the reason I use btrfs)

Storm One
Jan 12, 2011
I'm fairly sure that's wrong and btrfs and ZFS are equal in that regard, it's NILFS2 that's fully checksummed but doesn't actually verify the data CRC when reading from disk.

Storm One
Jan 12, 2011

pseudorandom posted:

since being prompted for a password is so common in Linux having to copy and paste that would be inconvenient, or impossible if the situation means I can't have it open. Usually, I just want to type `sudo` real quick and just be done, which means right now my password is miserably low quality.

My user password is <30 bits, my root password is not much stronger.

As long as you use full disk encryption on your root partition with a really good password (60+ bits entropy, but you only type it once when booting) to thwart offline brute-forcing, it doesn't matter that your user password is low quality because it can't be online brute forced, the OS should have mitigations against that (if it doesn't then fix it ASAP).

Try inputting a wrong password and observe how long you have to wait between retries.

Storm One
Jan 12, 2011

fletcher posted:

Trying to use LVM with encryption on my Debian 10 system for the first time. I need to add a crypttab entry now and wasn't sure if it should be:
code:
/dev/raid0vg0/raid0lv0 UUID=b31086c9-f24c-41b9-9c2f-94d9c3011cc8 /etc/keyfiles/main luks
or is it:
code:
raid0lv0encrypted UUID=b31086c9-f24c-41b9-9c2f-94d9c3011cc8 /etc/keyfiles/main luks

No experience with LVM but judging from that blkid output it's probably EDIT: no it's probably not, this is why I hate LVM
code:
raid0vg0-raid0lv0 UUID=b31086c9-f24c-41b9-9c2f-94d9c3011cc8 /etc/keyfiles/main luks
scratch that, it should be your second example:

code:
raid0lv0encrypted UUID=b31086c9-f24c-41b9-9c2f-94d9c3011cc8 /etc/keyfiles/main luks
/dev/mapper/raid0lv0encrypted is the unecrypted LUKS volume containing the ext4 filesystem

/dev/mapper/raid0vg0-raid0lv0 is the 25TB RAID0 LVM volume containing the encrypted LUKS volume

lsblk -fp should make parsing a bit easier

Storm One fucked around with this message at 23:22 on May 8, 2021

Storm One
Jan 12, 2011

"In defence of swap: common misconceptions posted:

tl;dr:

1. Having swap is a reasonably important part of a well functioning system. Without it, sane memory management becomes harder to achieve.

2. Swap is not generally about getting emergency memory, it's about making memory reclamation egalitarian and efficient. In fact, using it as "emergency memory" is generally actively harmful.

3. Disabling swap does not prevent disk I/O from becoming a problem under memory contention. Instead, it simply shifts the disk I/O thrashing from anonymous pages to file pages. Not only may this be less efficient, as we have a smaller pool of pages to select from for reclaim, but it may also contribute to getting into this high contention state in the first place.

4. The swapper on kernels before 4.0 has a lot of pitfalls, and has contributed to a lot of people's negative perceptions of swap due to its overeagerness to swap out pages. On kernels >4.0, the situation is significantly better.

5. On SSDs, swapping out anonymous pages and reclaiming file pages are essentially equivalent in terms of performance and latency. On older spinning disks, swap reads are slower due to random reads, so a lower vm.swappiness setting makes sense there (read on for more about vm.swappiness).

6. Disabling swap doesn't prevent pathological behaviour at near-OOM, although it's true that having swap may prolong it. Whether the global OOM killer is invoked with or without swap, or was invoked sooner or later, the result is the same: you are left with a system in an unpredictable state. Having no swap doesn't avoid this.

7. You can achieve better swap behaviour under memory pressure and prevent thrashing by utilising memory.low and friends in cgroup v2.

Storm One
Jan 12, 2011

Klyith posted:

For normal people noscript is easier, but if you're in this thread you can probably handle an impenetrable UI.

Maybe it's changed since then but last time I used noscript its interface sure as hell was much less intuitive then uBO, advanced user or not.

There's also the master setting to allow/deny all JS execution (1st and 3rd-party) that can be toggled for each site with a click on the </> icon on the right-side of the panel, and that functionality is available even when "advanced user" mode isn't.

Storm One
Jan 12, 2011
Anyone know of a way to force Linux to never reclaim the slab cache automatically, only when echo 2 or echo 3 > /proc/sys/vm/drop_caches is invoked?

And no, I don't want to add a cronjob for locate updatedb :colbert:

Storm One
Jan 12, 2011

Subjunctive posted:

what the actual hell people

for real

i can't believe no one's yet answered the very important question i posted in the previous page

Storm One
Jan 12, 2011

Twerk from Home posted:

Both at work and at home, I have machines with a ton of RAM but using network storage that is better at continuous reads rather than low latency IOPS. When I've needed random read access to a file, I've found that it's much faster to start a "cat /path/thefile > /dev/null" as I start accessing it to get the whole file into page cache. This feels like a terrible hack, is there a better way to tell the OS that I want a whole file preloaded into page cache to better consolidate reads?

If the the list of files you want preloaded is fixed, you can mlock them all at startup by running vmtouch in daemon mode, or even plain vmtouch -t if you don't expect their pages to be evicted by the time you need them. You might be forced to raise the memlock limit in /etc/security if it's too low for your needs.

If it's not predictable, then your cat > /dev/null has probably the same effect as vmtouch.

e:fb

Storm One
Jan 12, 2011

Storm One posted:

your cat > /dev/null has probably the same effect as vmtouch.

I tested it and they're both equally fast, the bottleneck seems to be my HDD:

code:
cat bigfile > /dev/null
real	0m28.199s
user	0m0.000s
sys	0m1.454s
code:
vmtouch -t bigfile
real	0m28.342s
user	0m0.191s
sys	0m1.515s

Storm One
Jan 12, 2011

Klyith posted:

I think the main answer is privacy. If you have stuff you'd prefer nobody sees including if you get hit by a bus, encrypt it.

That's not it, the threat model is offline attacks only, and that's enough of a reason to always encrypt all partitions except /boot.
It's not a "I've got nothing to hide lol" thing, there's no way anyone does not have information they shouldn't make public somewhere in their / and/or data filesystems.

Now when the HDD dies and can't be overwritten with zeros because the computer isn't seeing it anymore (or it's an SSD and wiping is useless anyway) there'e no need to worry about physically destroying it before disposal.

Storm One
Jan 12, 2011

Klyith posted:

An offline attack against my desktop is not going to happen. My dead HDD is not going to be recovered from the trash and taken to a data recovery operation to get my PII. (But also I harvest the magnets from a dead HDD, so you'd have do it from bare platters.) I take no security precautions against the mossad in the same way that I don't worry about being hit by a meteor. If the mossad wants my data they can have it.

You're bringing up movie plot threat models when I'm talking about bare minimum data protection:

1. laptop gets stolen, it it's encrypted offline attacks are impossible unless the password really sucks, if it's not anyone can remove the disk and mount it in another computer

2. drive has bad sectors and a corrupted filesystem, user sends it to a repair shop, anyone can run ddrescue and get most of the data out, unless of course it is encrypted

3. user buys new pc, doesn't know how computers work and sells old one on ebay as is, etc

Really, not using FDE for eveything is comparable to not using an adbloker because you don't really care about seeing ads. It's just good practice, and the the less tech-literate one is the greater the potential benefit from using it.

Storm One
Jan 12, 2011

Klyith posted:

(Though TBQH I'm not sure if #2 counts as good or bad -- the number of people who want data recovery because they don't backup is much higher than the number of malicious tech shop employees.

Fair point, the biggest reason NOT to use crypto of any kind is how it complicates data recovery in general, it's yet another footgun.
(#2 was more from the perspective of someone who just wants the PC to function again and isn't concerned at all with recovering any of their old data but doesn't know how to reinstall the OS)


Volguus posted:

That's not a good analogy. Since I use the browser every day, not having an adblocker would be a daily nuisance.

If it's a nuisance for you, it means you DO care about the ads; the analogy was about a tech-illiterate person who does NOT care about the ads and also doesn't know about ransomware. They would be better off with an adblocker even if they don't fully understand everything it can protect against.

Storm One
Jan 12, 2011

some kinda jackal posted:

I'm trying to think of how to explain what I'm trying to do conceptually and there's no great analogy, but imagine that you've got a CD iso that you want to present to a VM as a read-write hard disk image, to which the VM can make all the subsequent modifications it wants and they persist in the form of a different backing file.

Unless I'm missing something, that's what XFS and Btrfs do by default with cp --reflink=always (or =auto, which I also think is the default behaviour of cp now).

IOW, take the original iso and make how many copies of it you need and no extra space will be used. Mark the original read-only, it has its own inode so it won't affect the copies like hardlinks would, but the extents are still 100% shared. As each of the copies is written to, only the modified extents of each get CoW'd back to disk.

Storm One
Jan 12, 2011

Klyith posted:

You can recover the wasted space with btrfs filesystem defragment but defrag will unlink files in snapshots.
Sorry for off-topic, but does anyone know if this is also the case with XFS and bcachefs?

I avoid using reflinks for dedup and stick to hardlinks exclusively because of this but I'm not sure if it's a Btrfs specific issue or something intrinsic to all reflink-capable filesystems.

Storm One
Jan 12, 2011

Klyith posted:

I'd think XFS would be completely different since it's not a CoW filesystem

If I'm not mistaken, XFS has been data-only CoW for a few years now, ever since reflink support was added.

It's not true (metadata + data) CoW like ZFS etc but good enough for reflink dedupe, which I wouldn't mind using if only I could be assured that extent unsharing on defrag is not an issue like with Btrfs.

Storm One
Jan 12, 2011
How many disks does your PC have?
During the brief transition period where I "dual-booted" Windows and Linux I simply cheated by installing Linux on one disk and Windows on another, and using the BIOS boot drive selection to choose OS at power on. No bootloader nonsense to worry about that way.

Make the Windows disk the default boot device in the BIOS (and don't ever change it) so your wife can keep using the computer as usual, then when you need to use Linux reboot and press whatever the "boot drive temporary override" shortcut key is for your motherboard and select the Linux disk.

Adbot
ADBOT LOVES YOU

Storm One
Jan 12, 2011

Subjunctive posted:

You can do that with a single disk and UEFI boot selection too, such as per the earlier post.

I'm sure you can, but bootloaders and UEFI are all black magic to me, and all the horror stories of Window's installer ruining people's Ubuntu partitions and vice-versa from long ago have put me firmly in the "don't know, don't really care to learn if some dipshit OS installer can just ruin everything anyway".

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