[gentoo-user] Backing up KDE config files
Howdy, As some know, I've rearranged some hard drives and data recently. Got the data moved into the new places. Given those changes, I'm also having to adjust my backups as well. Before, I just backed up /home/dale and told rsync to exclude a few large directories that needed to be stored on other drives. I reversed for the other drive. Anyway, I'm splitting things up differently now. What I'm not sure about is KDE config files. I googled and found out some I was pretty sure of already. Examples, .config, .local, and .kde4 but there could be others that need to be backed up as well. Anyone know if that is all of them or am I missing some? I already have .mozilla backed up locally. That takes care of my web browsers, Seamonkey and Firefox which includes emails. Thanks. Dale :-) :-)
[gentoo-user] LVM and the /usr Logical Volume
My new laptop is set up to dual boot and has a clean Gentoo install as the second operating system. It looks like there may be an issue with the /usr Logical Volume (LV) somewhere between LVM, initramfs and udev. Only the base system has been installed and updated (no desktop). The issue is the /usr logical volume is not mounted as expected. After booting without the livecd: * The df -h command show /usr on /dev/dm-1 and not /dev/mapper/vg0-usr like the in the fstab. * My expectation is it should follow the other LVs (home, var, opt, vm) and be in the vg0 Volume Group on /dev/mapper . * However the mount /usr command indicates that it is mounted correctly: mount: /usr: /dev/mapper/vg0-usr already mounted or mount point busy. Is there something off here or is this correct behavior? The laptop is a new HP Envy x360, 2-in-1 Flip Laptop, 15.6" Full HD Touchscreen, AMD Ryzen 7 5700U Processor, 64GB RAM and 1TB PCIe SSD. Below is the /etc/fstab and output from lsblk, df -h and the links in the volume group after booting to the livecd and booting to the ssd. Thank you # * # /etc/fstab: This is a dual boot system (Windows 11 & Gentoo), the # same results occurred using straight mount points, LABEL and UUID. # * # #/dev/nvme0n1p1 /efi vfat noauto,noatime 1 2 #/dev/nvme0n1p2 / #/dev/nvme0n1p3 /Win11 #/dev/nvme0n1p4 /Win11Data #/dev/nvme0n1p5 /Win11Recovery /dev/nvme0n1p6 /boot ext2 defaults,noatime 0 2 /dev/nvme0n1p7 none swap sw 0 0 /dev/nvme0n1p8 / ext4 defaults,noatime,discard 0 1 /dev/nvme0n1p9 /lib/modules ext4 defaults,noatime,discard 0 1 /dev/nvme0n1p10 /tmp ext4 defaults,noatime,discard 0 2 #/dev/mapper/vg0-usr /usr ext4 defaults,noatime,discard 0 0 #/dev/mapper/vg0-home /home ext4 defaults,noatime,discard 0 1 #/dev/mapper/vg0-opt /opt ext4 defaults,noatime,discard 0 1 #/dev/mapper/vg0-var /var ext4 defaults,noatime,discard 0 1 #/dev/mapper/vg1-vm /vm ext4 noauto,noatime,discard,user 0 1 #Use blkid /dev/mapper/* to get the LABEL and UUID (quotes cause errors). LABEL=usr /usr ext4 defaults,noatime,discard 0 0 LABEL=home /home ext4 defaults,noatime,discard 0 1 LABEL=opt /opt ext4 defaults,noatime,discard 0 1 LABEL=var /var ext4 defaults,noatime,discard 0 1 LABEL=vm /vm ext4 noauto,noatime,discard,user 0 1 #UUID=d9237094-6589-4e90-989d-17bfe74082a4 /usr ext4 defaults,noatime,discard 0 0 #UUID=53831f3e-6266-4186-a7e1-90ecd027b981 /home ext4 defaults,noatime,discard 0 1 #UUID=cbdfcbb5-dff1-4b21-8eca-d1684b621fb2 /opt ext4 defaults,noatime,discard 0 1 #UUID=d43c8c7a-1a83-42f7-958d-9402e7bcc48f /var ext4 defaults,noatime,discard 0 1 #UUID=95ea1fcc-df9d-4c0b-bce4-a979f8430728 /vm ext4 noauto,noatime,discard,user 0 1 /dev/cdrom /mnt/cdrom auto rw,exec,noauto,user 0 0 # * # Booting to the livecd and before chroot, all looks good. # * livecd ~ # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 7:0 0 385.7M 1 loop /mnt/livecd sda 8:0 1 2G 0 disk └─sda1 8:1 1 2G 0 part /mnt/cdrom nvme0n1 259:0 0 931.5G 0 disk ├─nvme0n1p1 259:1 0 100M 0 part ├─nvme0n1p2 259:2 0 16M 0 part ├─nvme0n1p3 259:3 0 52.2G 0 part ├─nvme0n1p4 259:4 0 40.2G 0 part ├─nvme0n1p5 259:5 0 608.6M 0 part ├─nvme0n1p6 259:6 0 2.8G 0 part /mnt/gentoo/boot ├─nvme0n1p7 259:7 0 4.7G 0 part [SWAP] ├─nvme0n1p8 259:8 0 9.3G 0 part /mnt/gentoo ├─nvme0n1p9 259:9 0 3.7G 0 part /mnt/gentoo/lib/modules ├─nvme0n1p10 259:10 0 2.8G 0 part /mnt/gentoo/tmp ├─nvme0n1p11 259:11 0 186.3G 0 part │ ├─vg0-usr 253:1 0 25G 0 lvm /mnt/gentoo/usr │ ├─vg0-var 253:2 0 20G 0 lvm /mnt/gentoo/var │ ├─vg0-home 253:3 0 80G 0 lvm /mnt/gentoo/home │ └─vg0-opt 253:4 0 20G 0 lvm /mnt/gentoo/opt ├─nvme0n1p12 259:12 0 186.3G 0 part │ └─vg1-vm 253:0 0 150G 0 lvm /mnt/gentoo/vm ├─nvme0n1p13 259:13 0 93.1G 0 part ├─nvme0n1p14 259:14 0 93.1G 0 part ├─nvme0n1p15 259:15 0 46.6G 0 part ├─nvme0n1p16 259:16 0 46.6G 0 part ├─nvme0n1p17 259:17 0 46.6G 0 part ├─nvme0n1p18 259:18 0 46.6G 0 part ├─nvme0n1p19 259:19 0 46.6G 0 part └─nvme0n1p20 259:20 0 23.5G 0 part livecd ~ # df -h Filesystem Size Used Avail U
RE: [gentoo-user] LVM and moving things around
> -Original Message- > From: Rich Freeman > Sent: Tuesday, April 5, 2022 11:59 AM > To: gentoo-user@lists.gentoo.org > Subject: Re: [gentoo-user] LVM and moving things around > > On Tue, Apr 5, 2022 at 11:10 AM Wols Lists wrote: > > > > I don't know how you take advantage of it, but linux by default caches > > disk i/o. You can tell it to "don't cache" and apparently it makes a > > major difference. Given that rsync reads once and then never uses it > > again, you don't want it cached. > > > > I suggest reading: > man posix_fadvise > https://insights.oetiker.ch/linux/fadvise/ > http://rdiez.shoutwiki.com/wiki/The_Linux_Filesystem_Cache_is_Braindead > https://lwn.net/Articles/806980/ > https://bugzilla.samba.org/show_bug.cgi?id=9560 > > There might be something more recent, but my overall impression is that this > problem is less solved than it probably ought to be. > > -- > Rich > I remember seeing something more with regard to "please cache/please discard/this can be immediately swapped because I won't need it for a while" stuff for like the 5.15 kernel or something, but the actual system programs will have to be updated to use it before it'll make any difference. LMP
Re: [gentoo-user] LVM and moving things around
On Tue, Apr 5, 2022 at 11:10 AM Wols Lists wrote: > > I don't know how you take advantage of it, but linux by default caches > disk i/o. You can tell it to "don't cache" and apparently it makes a > major difference. Given that rsync reads once and then never uses it > again, you don't want it cached. > I suggest reading: man posix_fadvise https://insights.oetiker.ch/linux/fadvise/ http://rdiez.shoutwiki.com/wiki/The_Linux_Filesystem_Cache_is_Braindead https://lwn.net/Articles/806980/ https://bugzilla.samba.org/show_bug.cgi?id=9560 There might be something more recent, but my overall impression is that this problem is less solved than it probably ought to be. -- Rich
Re: [gentoo-user] LVM and moving things around
On 05/04/2022 14:58, Laurence Perkins wrote: -Original Message- From: Dale Sent: Monday, April 4, 2022 4:37 PM To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] LVM and moving things around One thing that annoys me, it trying to use swap. I don't want to disable it because on occasion Firefox goes nuts and starting hogging memory really bad. I have swappiness set to like 5 or something which means it shouldn't use it but when using rsync, it creeps some in. When it does, that results in some slowness. I have a little script thing that clears all that but still, I may set it to 3 or maybe 2 for a bit. Me ponders the thought. I'm making progress. Feel sorry for those hard drives tho. ;-) Dale :-) :-) I'm told that you can use cgroups for dealing with that kind of thing such that, for example, only Firefox is allowed to be swapped. I haven't had time to dig into it, but it seems like a useful tool. Also, the compressed swap and zram swap devices with backing stores offer a fairly significant boost to the speed of swap so long as the data being swapped is compressible. I don't know how you take advantage of it, but linux by default caches disk i/o. You can tell it to "don't cache" and apparently it makes a major difference. Given that rsync reads once and then never uses it again, you don't want it cached. I guess that would improve things for you massively if you could use it. Cheers, Wol
RE: [SUSPECTED SPAM] Re: [gentoo-user] Choose a wireless access point
> -Original Message- > From: William Kenworthy > Sent: Monday, April 4, 2022 8:05 PM > To: gentoo-user@lists.gentoo.org > Subject: [SUSPECTED SPAM] Re: [gentoo-user] Choose a wireless access point > > > On 4/4/22 23:12, Jack wrote: > > On 4/4/22 01:31, William Kenworthy wrote: > >> Is there a way force openrc and wpa_supplicant to map a particular > >> access point to an interface or fail? > >> > >> I have two AP's (each on a different ssid) to connect to so have two > >> wifi interfaces - unfortunately they are not equal so I want wlan0 to > >> connect to only one particular AP, and wlan1 to the other ... reliably! > >> I can manually force it to connect but invariably at the first glitch > >> they both end up connected to the same AP (usually the strongest > >> which is often not what I want :( > >> > >> BillK > > > > I don't know about wpa-supplicant, but I'm using open-rc and KDE, and > > KDE's systemsettings Network / Connections screen lets you restrict a > > network connection so a specific device. Not sure if this helps you > > any, but it would indicate that what you want is possible. > > > > Jack > > > Hi Jack, unfortunately its a headless, wifi only system which is why getting > openrc to behave is important! > > BillK The bit where specifying the SSID in conf.d/net doesn't work sounds like a bug to me, but one that may take a while to be fixed since I'm not sure how many people use netifrc with wireless. If you're open to experimenting, NetworkManager will let you specify that connections may only be used with specific adapters. While normally considered a GUI tool it does have nmcli and nmtui for configuring it on headless systems. LMP
RE: [gentoo-user] LVM and moving things around
>-Original Message- >From: Dale >Sent: Monday, April 4, 2022 4:37 PM >To: gentoo-user@lists.gentoo.org >Subject: Re: [gentoo-user] LVM and moving things around > > >One thing that annoys me, it trying to use swap. I don't want to disable it >because on occasion Firefox goes nuts and starting hogging memory really bad. >I have swappiness set to like 5 or something which means it shouldn't use it >but when using rsync, it creeps some in. When it does, that results in some >slowness. I have a little script thing that clears all that but still, I may >set it to 3 or maybe 2 for a bit. Me ponders the thought. > >I'm making progress. Feel sorry for those hard drives tho. ;-) > >Dale > >:-) :-) > > I'm told that you can use cgroups for dealing with that kind of thing such that, for example, only Firefox is allowed to be swapped. I haven't had time to dig into it, but it seems like a useful tool. Also, the compressed swap and zram swap devices with backing stores offer a fairly significant boost to the speed of swap so long as the data being swapped is compressible. LMP
Re: [gentoo-user] Choose a wireless access point
On 5/4/22 16:05, Michael wrote: On Tuesday, 5 April 2022 08:46:52 BST Neil Bothwick wrote: On Tue, 5 Apr 2022 11:16:10 +0800, William Kenworthy wrote: On 5/4/22 07:09, Michael wrote: On Monday, 4 April 2022 16:12:53 BST Jack wrote: On 4/4/22 01:31, William Kenworthy wrote: Is there a way force openrc and wpa_supplicant to map a particular access point to an interface or fail? I have two AP's (each on a different ssid) to connect to so have two wifi interfaces - unfortunately they are not equal so I want wlan0 to connect to only one particular AP, and wlan1 to the other ... reliably! I can manually force it to connect but invariably at the first glitch they both end up connected to the same AP (usually the strongest which is often not what I want :( BillK I don't know about wpa-supplicant, but I'm using open-rc and KDE, and KDE's systemsettings Network / Connections screen lets you restrict a network connection so a specific device. Not sure if this helps you any, but it would indicate that what you want is possible. Jack Look at the example provided in: /usr/share/doc/netifrc-0.7.3/net.example.bz2 You can set a different ssid for each wireless NIC. The wpa_supplicant can be set with credentials for the two APs only. Unfortunately, this does not work as I want ...wpa_supplicant's behaviour makes sense in that it provides a fallback if the allocated access point cant connect ... it will pick the next available one (seemingly based on signal strength) if it is in its conf file (and does not care that its another ssid) - so it does not fail. As only one of the two networks has internet access the device often ends up not being able to be connected to (its headless so that's a problem!). I have fallen back to openrc for the main connection and will do the other manually - it would be nice to have everything properly controlled but its not working for me. Could you run two instances of wpa_suplicant, each listening on a different interface and using a config with only the AP for that interface? As I recall wpa_cli can be launched by specifying a particular interface. Therefore two instances of wpa_cli launched by a script should be possible. However, isn't the purpose of /etc/conf.d/net to specify how individual interfaces are configured? I still think - but have not tried it - each wireless NIC can be configured via this file to use a particular access point/ channel and not go scanning for others, while the wpa_supplicant can be left to deal with the authentication mechanism after each NIC has found its specified ESSID. The section in the netifrc example file which starts as follows, merits reading: ### # SETTINGS # Hard code an SSID to an interface - leave this unset if you wish the driver # to scan for available Access Points . . . Something like this ought to work: essid_wlan0="foo" essid_wlan1="bar" Didnt work - what did work was setting up the main network using normal openrc and scripting the other interface after making it config_wlan1="null" in conf.d/net. I am putting this part of the problem as solved. Routing is still an issue but once I have a couple of diagnostic packages installed (compiling is slow on a pi!) I will be better able to see whats gone wrong. BillK
Re: [gentoo-user] Choose a wireless access point
On Tuesday, 5 April 2022 08:46:52 BST Neil Bothwick wrote: > On Tue, 5 Apr 2022 11:16:10 +0800, William Kenworthy wrote: > > On 5/4/22 07:09, Michael wrote: > > > On Monday, 4 April 2022 16:12:53 BST Jack wrote: > > >> On 4/4/22 01:31, William Kenworthy wrote: > > >>> Is there a way force openrc and wpa_supplicant to map a particular > > >>> access point to an interface or fail? > > >>> > > >>> I have two AP's (each on a different ssid) to connect to so have two > > >>> wifi interfaces - unfortunately they are not equal so I want wlan0 > > >>> to connect to only one particular AP, and wlan1 to the other ... > > >>> reliably! I can manually force it to connect but invariably at the > > >>> first glitch they both end up connected to the same AP (usually the > > >>> strongest which is often not what I want :( > > >>> > > >>> BillK > > >> > > >> I don't know about wpa-supplicant, but I'm using open-rc and KDE, and > > >> KDE's systemsettings Network / Connections screen lets you restrict a > > >> network connection so a specific device. Not sure if this helps you > > >> any, but it would indicate that what you want is possible. > > >> > > >> Jack > > > > > > Look at the example provided in: > > > > > > /usr/share/doc/netifrc-0.7.3/net.example.bz2 > > > > > > You can set a different ssid for each wireless NIC. The > > > wpa_supplicant can be set with credentials for the two APs only. > > > > Unfortunately, this does not work as I want ...wpa_supplicant's > > behaviour makes sense in that it provides a fallback if the allocated > > access point cant connect ... it will pick the next available one > > (seemingly based on signal strength) if it is in its conf file (and > > does not care that its another ssid) - so it does not fail. As only > > one of the two networks has internet access the device often ends up > > not being able to be connected to (its headless so that's a problem!). > > > > I have fallen back to openrc for the main connection and will do the > > other manually - it would be nice to have everything properly > > controlled but its not working for me. > > Could you run two instances of wpa_suplicant, each listening on a > different interface and using a config with only the AP for that > interface? As I recall wpa_cli can be launched by specifying a particular interface. Therefore two instances of wpa_cli launched by a script should be possible. However, isn't the purpose of /etc/conf.d/net to specify how individual interfaces are configured? I still think - but have not tried it - each wireless NIC can be configured via this file to use a particular access point/ channel and not go scanning for others, while the wpa_supplicant can be left to deal with the authentication mechanism after each NIC has found its specified ESSID. The section in the netifrc example file which starts as follows, merits reading: ### # SETTINGS # Hard code an SSID to an interface - leave this unset if you wish the driver # to scan for available Access Points . . . Something like this ought to work: essid_wlan0="foo" essid_wlan1="bar" signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] Choose a wireless access point
On Tue, 5 Apr 2022 11:16:10 +0800, William Kenworthy wrote: > On 5/4/22 07:09, Michael wrote: > > On Monday, 4 April 2022 16:12:53 BST Jack wrote: > >> On 4/4/22 01:31, William Kenworthy wrote: > >>> Is there a way force openrc and wpa_supplicant to map a particular > >>> access point to an interface or fail? > >>> > >>> I have two AP's (each on a different ssid) to connect to so have two > >>> wifi interfaces - unfortunately they are not equal so I want wlan0 > >>> to connect to only one particular AP, and wlan1 to the other ... > >>> reliably! I can manually force it to connect but invariably at the > >>> first glitch they both end up connected to the same AP (usually the > >>> strongest which is often not what I want :( > >>> > >>> BillK > >> I don't know about wpa-supplicant, but I'm using open-rc and KDE, and > >> KDE's systemsettings Network / Connections screen lets you restrict a > >> network connection so a specific device. Not sure if this helps you > >> any, but it would indicate that what you want is possible. > >> > >> Jack > > Look at the example provided in: > > > > /usr/share/doc/netifrc-0.7.3/net.example.bz2 > > > > You can set a different ssid for each wireless NIC. The > > wpa_supplicant can be set with credentials for the two APs only. > > Unfortunately, this does not work as I want ...wpa_supplicant's > behaviour makes sense in that it provides a fallback if the allocated > access point cant connect ... it will pick the next available one > (seemingly based on signal strength) if it is in its conf file (and > does not care that its another ssid) - so it does not fail. As only > one of the two networks has internet access the device often ends up > not being able to be connected to (its headless so that's a problem!). > > I have fallen back to openrc for the main connection and will do the > other manually - it would be nice to have everything properly > controlled but its not working for me. Could you run two instances of wpa_suplicant, each listening on a different interface and using a config with only the AP for that interface? -- Neil Bothwick Help a man when he is in trouble and he will remember you when he is in trouble again pgpZgGfAGG3EL.pgp Description: OpenPGP digital signature