Re: [linux-lvm] bug? shrink lv by specifying pv extent to be removed does not behave as expected

2023-04-11 Thread Roger Heflin
On Tue, Apr 11, 2023 at 1:44 AM matthew patton wrote: > > > my plan is to scan a disk for usable sectors and map the logical volume > > around the broken sectors. > > 1977 called, they'd like their non-self-correcting HD controller > implementations back. > > From a real-world perspective there

Re: [linux-lvm] bug? shrink lv by specifying pv extent to be removed does not behave as expected

2023-04-09 Thread Roger Heflin
On Sun, Apr 9, 2023 at 1:21 PM Roland wrote: > > > Well, if the LV is being used for anything real, then I don't know of > > anything where you could remove a block in the middle and still have a > > working fs. You can only reduce fs'es (the ones that you can reduce) > > by reducing off of the

Re: [linux-lvm] bug? shrink lv by specifying pv extent to be removed does not behave as expected

2023-04-09 Thread Roger Heflin
On Sun, Apr 9, 2023 at 10:18 AM Roland wrote: > > hi, > > we can extend a logical volume by arbitrary pv extends like this : > > > root@s740:~# lvresize mytestVG/blocks_allocated -l +1 /dev/sdb:5 >Size of logical volume mytestVG/blocks_allocated changed from 1.00 > MiB (1 extents) to 2.00 MiB

Re: [linux-lvm] lvconvert --uncache takes hours

2023-03-02 Thread Roger Heflin
On Thu, Mar 2, 2023 at 11:44 AM Gionatan Danti wrote: > > Il 2023-03-02 01:51 Roger Heflin ha scritto: > > A spinning raid6 array is slow on writes (see raid6 write penalty). > > Because of that the array can only do about 100 write operattions/sec. > > True. But does flu

Re: [linux-lvm] lvconvert --uncache takes hours

2023-03-02 Thread Roger Heflin
On Thu, Mar 2, 2023 at 2:34 AM Roy Sigurd Karlsbakk wrote: > > > - Original Message - > > From: "Roger Heflin" > > To: "linux-lvm" > > Cc: "Malin Bruland" > > Sent: Thursday, 2 March, 2023 01:51:08 > > Subject: Re:

Re: [linux-lvm] lvconvert --uncache takes hours

2023-03-01 Thread Roger Heflin
On Wed, Mar 1, 2023 at 4:50 PM Roy Sigurd Karlsbakk wrote: > > Hi all > > Working with a friend's machine, it has lvmcache turned on with writeback. > This has worked well, but now it's uncaching and it takes *hours*. The amount > of cache was chosen to 100GB on an SSD not used for much else

Re: [linux-lvm] LVM2 : performance drop even after deleting the snapshot

2022-10-14 Thread Roger Heflin
What is the underlying disk hardware you are running this on? virtual, spinning, ssd, nvme? On Thu, Oct 13, 2022 at 2:01 AM Pawan Sharma wrote: > > adding this to lvm-devel mailing list also. > > Regards, > Pawan > > From: Pawan Sharma > Sent: Wednesday, October

Re: [linux-lvm] How to change default system dir

2022-09-29 Thread Roger Heflin
Assuming you are write protecting /etc for a reason, simply mv everything in /etc/lvm to your new location and replace the lvm dir with a lvm symbolic link to your location. In the far past when booting with RO devices I had lots of links in /etc/ pointing to files that were not on the read-only

Re: [linux-lvm] Problem with partially activate logical volume

2022-08-04 Thread Roger Heflin
> wrote: >> >> The procedure outlined should at least get you back to a state where the lv >> is consistent but with blank sectors where the data is missing. I would >> suggest using dd to make a backup partition image. Then you can either work >> on that or t

Re: [linux-lvm] Problem with partially activate logical volume

2022-07-27 Thread Roger Heflin
I don't believe that is going to work. His issue is that the filesystem is refusing to work because of the missing data. man debugfs It will let you manually look at the metadata and structures of the ext2/3/4 fs. You will likely need to use the "-c" option. It will be very manual and you

Re: [linux-lvm] Recovering from a failed pvmove

2022-06-29 Thread Roger Heflin
Did your operating system have backups/archives of the old cfgs? Fedora/Redhat keeps around 20 old copies going back typically several months and so typically one of those can be used. My archive dir looks like this for the roovg (note I do not do a lot of vg work, typically ls -l

Re: [linux-lvm] Recovering from a failed pvmove

2022-06-29 Thread Roger Heflin
For a case like this vgcfgrestore is probably the best option. man vgcfgrestore. You need to see if you have archived vg copies that you can revert to before the "add" of the pv that went bad. The archives are typically in /etc/lvm/archiive/* on RedHat derivative OSes, not sure if they are

Re: [linux-lvm] lvm commands hanging when run from inside a kubernetes pod

2022-06-03 Thread Roger Heflin
Random thoughts. Make sure use_lvmetad is 0, and its systemd units for it are stopped/disabled. Are you mounting /proc and /sys and /dev into the /host chroot? /run may also be needed. you might add a "-ttt" to the strace command to give timing data. On Thu, Jun 2, 2022 at 1:41 AM Abhishek

Re: [linux-lvm] lvm commands hanging when run from inside a kubernetes pod

2022-05-30 Thread Roger Heflin
You need to rerun with an "strace -f". That way it will also strace the fork's one of which it appears to be waiting on. On Mon, May 30, 2022 at 1:52 AM Abhishek Agarwal < mragarwal.develo...@gmail.com> wrote: > When a kubernetes pod is scheduled on the node having lvm2 libraries > already

Re: [linux-lvm] LVM autoactivation and udev

2022-03-09 Thread Roger Heflin
On Wed, Mar 9, 2022 at 10:35 AM David Teigland wrote: > > > - if all three of those don't catch it, then filter-mpath will also > check if the component wwid is listed in /etc/multipath/wwids and > ignore the device if it is. > > If all four of those methods fail to exclude a multipath

[linux-lvm] Have tested dm-raid/lv mirroring with block guard on one leg but not the other, it fails to mirror the disk

2021-11-19 Thread Roger Heflin
I have tested dm-raid/lv mirroring and block guard on one leg but not on the other and it initially seems to copy/mirror the device and then random lv's start dropping the new block guard leg and set the refresh attribute on the lv. About this time we also start getting severe filesystem

Re: [linux-lvm] logical volume usage type code, equivalent to GPT partition type GUID

2021-11-03 Thread Roger Heflin
You have some basic problems. #1 with shared lvm you would need a way to tell where it should go, so you would have to have a mount_hostname type data in logical_volumes sections. #2 you would also need a mount_point entry, and a mount_opts entry. And then at the end you are basically moving

Re: [linux-lvm] Recovering "broken" disk ( 17th )

2021-10-21 Thread Roger Heflin
backup files. On Wed, Oct 20, 2021 at 1:01 PM Roger Heflin wrote: > is the pv in the root device vg? if not changing fstab to not mount the > missing fs(es) should get it bootable. I have a practice of putting > ",nofail" on all non-root filesystems (ie defaults,nofail)

Re: [linux-lvm] Recovering "broken" disk ( 17th )

2021-10-21 Thread Roger Heflin
the vg/lv uuids. Each pv has a uuid and each lv has a uuid and the vg has a uuid. On Wed, Oct 20, 2021 at 8:39 AM Brian McCullough wrote: > On Tue, Oct 19, 2021 at 05:06:37AM -0500, Roger Heflin wrote: > > I would edit the vgconfig you dd'ed with an editor and make sure it looks > >

Re: [linux-lvm] Recovering "broken" disk ( 17th )

2021-10-20 Thread Roger Heflin
, since there were 384 bytes of grub in the sector with the partition table that you know are missing. On Tue, Oct 19, 2021 at 1:04 AM Brian McCullough wrote: > On Mon, Oct 18, 2021 at 09:49:44AM -0500, Roger Heflin wrote: > > You will need a lvm backup file for the pvcreate --uuid

Re: [linux-lvm] Recovering "broken" disk ( 17th )

2021-10-18 Thread Roger Heflin
You will need a lvm backup file for the pvcreate --uuid I believe (there may be some option to get around needing the backup file). That will put the header back on if you either have an lvm backup and/or archive file, you might also need a vgcfgrestore afterwards depending on if anything else is

Re: [linux-lvm] " Failed to find physical volume

2021-09-28 Thread Roger Heflin
n. > > Many thanks, > > Alex > > Le jeu. 23 sept. 2021 à 23:48, Roger Heflin a écrit : >> >> If you have lvmetad running and in use then the lvm commands ask it >> what the system has on it. >> >> I have seen on random boots fairly separated syst

Re: [linux-lvm] " Failed to find physical volume

2021-09-23 Thread Roger Heflin
If you have lvmetad running and in use then the lvm commands ask it what the system has on it. I have seen on random boots fairly separated systems (rhel7 versions, and many years newer fedora systems) at random fail to find one or more pv.s I have disabled it at home, and in my day job we have

Re: [linux-lvm] Discussion: performance issue on event activation mode

2021-06-08 Thread Roger Heflin
wrote: > > On So, 2021-06-06 at 11:35 -0500, Roger Heflin wrote: > >> This might be a simpler way to control the number of threads at the > >> same time. > >> > >> On large machines (cpu wise, memory wise and disk wise). I have > >> only seen lvm timeout

Re: [linux-lvm] Issue after upgrading the LVM2 package from 2.02.176 to 2.02.180

2020-09-17 Thread Roger Heflin
filter = [ "r|^/dev/drbd.*|" ] >> >> >> Thanks. >> >> On Tue, 15 Sep 2020 at 16:36, Roger Heflin wrote: >>> >>> #1: >>> Device /dev/sda3 excluded by a filter.) >>> Failed to execute command: pvcreate -ffy /

Re: [linux-lvm] Issue after upgrading the LVM2 package from 2.02.176 to 2.02.180

2020-09-15 Thread Roger Heflin
reading device /dev/sdb2 at 0 length 4096. > Error reading device /dev/sdb3 at 0 length 4096. > Read-only locking type set. Write locks are prohibited. > Recovery of standalone physical volumes failed. > Cannot process standalone physical volumes > bash-4.4# > > Attached t

Re: [linux-lvm] Issue after upgrading the LVM2 package from 2.02.176 to 2.02.180

2020-09-14 Thread Roger Heflin
In general I would suggest fully disabling lvmetad from the config files and from being started up. Issues around it not answering (like above) and answering but somehow having stale/wrong info have burned me too many times to trust it. It may be a lvmetad bug, or be udevd weirdness. The only

Re: [linux-lvm] lvm raid5 : drives all present but vg/lvm will not assemble

2020-03-23 Thread Roger Heflin
cat /proc/mdstat, the 253,19 is likely an /dev/mdX device and to get an io error like that it has to be in a wrong state. On Mon, Mar 23, 2020 at 5:14 AM Bernd Eckenfels wrote: > > Do you see any dmesg kernel errors when you try to activate the LVs? > > Gruss > Bernd > > > -- >

Re: [linux-lvm] recover volume group & locical volumes from PV?

2019-05-11 Thread Roger Heflin
check to see if there are LVM copies in /etc/lvm/{archive,backup,cache}. if you find one that looks right then you can use vgcfgrestore to put it back onto the correct pv. The copies should document the last command ran before the copy was made, you need to make sure that no critical commands

Re: [linux-lvm] Unknown PV missing ?

2019-02-17 Thread Roger Heflin
pv0 the first pv in the vg, internally lvm keeps track of disks that way. It is an md device, do you have the md modules and pieces needed for boot in your dracut.conf and/or dracut.conf.d files? On Sun, Feb 17, 2019 at 8:58 AM Georges Giralt wrote: > > Hello, > > I've this computer running

Re: [linux-lvm] lvcreate from a setuid-root binary

2018-11-16 Thread Roger Heflin
Why aren't you just using sudo for this? On Fri, Nov 16, 2018 at 11:14 AM Christoph Pleger wrote: > > Hello, > > > How do you plan to 'authorize' passed command line options ?? > > My program has no command line options. It just takes PAM_USER from PAM > environment and creates a logical volume

Re: [linux-lvm] How to trash a broke VG

2018-08-03 Thread Roger Heflin
Assuming you want to completely eliminate the vg so that you can rebuild it from scratch and the lv's are no longer mounted, then this should work: IF the lv is mounted you should remove it from fstab and reboot, and see what state it comes up in and first attempt to vgchange it off as that is