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

2021-10-18 Thread heming.z...@suse.com
On 10/18/21 23:04, David Teigland wrote: On Mon, Oct 18, 2021 at 06:24:49AM +, Martin Wilck wrote: I'd like to second Peter here, "RUN" is in general less fragile than "IMPORT{PROGRAM}". You should use IMPORT{PROGRAM}" if and only if - the invoked program can work with incomplete udev

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

2021-09-30 Thread heming.z...@suse.com
On 9/30/21 7:41 PM, Peter Rajnoha wrote: On 9/30/21 10:07, heming.z...@suse.com wrote: On 9/30/21 3:51 PM, Martin Wilck wrote: On Thu, 2021-09-30 at 00:06 +0200, Peter Rajnoha wrote: On Tue 28 Sep 2021 12:42, Benjamin Marzinski wrote: On Tue, Sep 28, 2021 at 03:16:08PM +, Martin Wilck

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

2021-09-30 Thread heming.z...@suse.com
On 9/30/21 3:51 PM, Martin Wilck wrote: On Thu, 2021-09-30 at 00:06 +0200, Peter Rajnoha wrote: On Tue 28 Sep 2021 12:42, Benjamin Marzinski wrote: On Tue, Sep 28, 2021 at 03:16:08PM +, Martin Wilck wrote: I have pondered this quite a bit, but I can't say I have a concrete plan. To avoid

Re: [linux-lvm] [RFC PATCH] lvconvert: fix the size of log device when converting, from linear to mirror

2021-07-14 Thread heming.z...@suse.com
Hello, This patch looks good to me. I give a little more explain. Scenario: there is a "--type mirror" LV with two legs: one leg is linear dev, another leg is striped devs. the disks (LV) layout: ``` # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:00

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

2021-07-03 Thread heming.z...@suse.com
On 7/3/21 6:02 AM, David Teigland wrote: On Fri, Jul 02, 2021 at 09:22:03PM +, Martin Wilck wrote: On Fr, 2021-07-02 at 16:09 -0500, David Teigland wrote: On Sun, Jun 06, 2021 at 02:15:23PM +0800, heming.z...@suse.com wrote: dev_cache_scan //order: O(n^2)  + _insert_dirs //O(n

Re: [linux-lvm] Does LVM have any plan/schedule to support btrfs in fsadm

2021-06-27 Thread heming.z...@suse.com
On 6/25/21 6:57 PM, Zdenek Kabelac wrote: Dne 25. 06. 21 v 7:28 heming.z...@suse.com napsal(a): Hello Zdenek & David, From URL: https://fedoraproject.org/wiki/Btrfs The btrfs becomes default filesystem for desktops. Do we have any plan to add btrfs code for scripts/fsadm.sh? If the an

[linux-lvm] Does LVM have any plan/schedule to support btrfs in fsadm

2021-06-25 Thread heming.z...@suse.com
Hello Zdenek & David, From URL: https://fedoraproject.org/wiki/Btrfs The btrfs becomes default filesystem for desktops. Do we have any plan to add btrfs code for scripts/fsadm.sh? If the answer is yes. I could share a suse special patch, this patch had been run about 4 years in suse products.

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

2021-06-17 Thread heming.z...@suse.com
On 6/17/21 12:38 AM, David Teigland wrote: On Thu, Jun 17, 2021 at 12:18:47AM +0800, heming.z...@suse.com wrote: I don't know if I missed something, the result didn't show any progress. the result of "devices/obtain_device_list_from_udev=0" even got regression: from 23.3 => 3

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

2021-06-16 Thread heming.z...@suse.com
On 6/16/21 1:03 AM, David Teigland wrote: On Tue, Jun 08, 2021 at 10:39:37AM -0500, David Teigland wrote: I think it would be an improvement to: . Make obtain_device_list_from_udev only control how we get the device list. Then we can easily default to 0 and readdir /dev if it's better. .

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

2021-06-09 Thread heming.z...@suse.com
On 6/9/21 12:18 AM, heming.z...@suse.com wrote: On 6/8/21 5:30 AM, David Teigland wrote: On Mon, Jun 07, 2021 at 10:27:20AM +, Martin Wilck wrote: Most importantly, this was about LVM2 scanning of physical volumes. The number of udev workers has very little influence on PV scanning

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

2021-06-08 Thread heming.z...@suse.com
On 6/8/21 4:26 PM, Martin Wilck wrote: On Mo, 2021-06-07 at 16:30 -0500, David Teigland wrote: On Mon, Jun 07, 2021 at 10:27:20AM +, Martin Wilck wrote: Most importantly, this was about LVM2 scanning of physical volumes. The number of udev workers has very little influence on PV scanning,

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

2021-06-08 Thread heming.z...@suse.com
On 6/8/21 5:30 AM, David Teigland wrote: On Mon, Jun 07, 2021 at 10:27:20AM +, Martin Wilck wrote: Most importantly, this was about LVM2 scanning of physical volumes. The number of udev workers has very little influence on PV scanning, because the udev rules only activate systemd service.

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

2021-06-06 Thread heming.z...@suse.com
Hello David & Zdenek, I send this mail for a well known performance issue: when system is attached huge numbers of devices. (ie. 1000+ disks), the lvm2-pvscan@.service costs too much time and systemd is very easy to time out, and enter emergency shell in the end. This performance topic had

Re: [linux-lvm] [PATCH] [PATCH] stable-2.02 - lvresize: deny operation on swap dev without force option

2021-03-24 Thread heming.z...@suse.com
On 3/24/21 5:07 PM, Zdenek Kabelac wrote: - Original Message - From: "Zhao Heming" To: linux-lvm@redhat.com, zkabe...@redhat.com, teigl...@redhat.com Cc: "Zhao Heming" Sent: Wednesday, March 24, 2021 6:09:09 AM Subject: [PATCH] [PATCH] stable-2.02 - lvresize: deny operation on swap

Re: [linux-lvm] discuss: about master branch vgcreate parameter "--clustered"

2020-12-30 Thread heming.z...@suse.com
On 12/30/20 3:03 AM, Zdenek Kabelac wrote: Dne 28. 12. 20 v 9:35 heming.z...@suse.com napsal(a): Hello, On master branch, clvmd had been removed, the "-c | --clustered" is deprecated. ``` ~> sudo vgcreate -c n vg1 /dev/sda The clustered option is deprecated, see --shared. Run `vg

[linux-lvm] discuss: about master branch vgcreate parameter "--clustered"

2020-12-28 Thread heming.z...@suse.com
Hello, On master branch, clvmd had been removed, the "-c | --clustered" is deprecated. ``` ~> sudo vgcreate -c n vg1 /dev/sda The clustered option is deprecated, see --shared. Run `vgcreate --help' for more information. ~> echo $? 3 ``` It looks the -c is useless, it only shows deprecated info

[linux-lvm] suggestion: replace security_context_t with char *

2020-12-26 Thread heming.z...@suse.com
Hello, When I was compiling lvm2 for opensuse package, I met warning about security_context_t. I found below URL, which show some reasons: https://www.redhat.com/archives/libvir-list/2020-July/msg00778.html I suggest lvm2 to follow the rule, to replace security_context_t with char *. Thanks.

Re: [linux-lvm] discussion about activation/auto_activation_volume_list

2020-11-19 Thread heming.z...@suse.com
On 11/19/20 2:23 AM, David Teigland wrote: > On Wed, Nov 18, 2020 at 09:28:21AM +0800, Gang He wrote: >> I prefer to use a metadata flag for each VG or LV to skip auto-activation. >> Otherwise, it is not easy for the pacemaker cluster to manager a local >> VG(e.g. local or systemid type) in a

Re: [linux-lvm] discussion about activation/auto_activation_volume_list

2020-11-18 Thread heming.z...@suse.com
On 11/18/20 12:17 AM, David Teigland wrote: > On Tue, Nov 17, 2020 at 04:00:10PM +0800, heming.z...@suse.com wrote: >> Hello LVM-maintainers, >> >> Currently activation/auto_activation_volume_list is not enable and it does >> the default behavior: >>pvs

Re: [linux-lvm] issue about return value in _lvchange_activate_single

2020-11-18 Thread heming.z...@suse.com
On 11/17/20 11:45 PM, David Teigland wrote: > On Tue, Nov 17, 2020 at 11:52:28AM +0800, heming.z...@suse.com wrote: >> In lvm functions, it treats "return 0" as error case. >> >> if _lvchange_activate() return ECMD_FAILED, the caller >> _lvcha

[linux-lvm] discussion about activation/auto_activation_volume_list

2020-11-17 Thread heming.z...@suse.com
Hello LVM-maintainers, Currently activation/auto_activation_volume_list is not enable and it does the default behavior: pvscan will activate all the devices on booting. This rule will trigger a clumsy process in HA (corosync+pacemaker stack) env. ## let me show the scenario: 2 nodes (A & B)

[linux-lvm] issue about return value in _lvchange_activate_single

2020-11-16 Thread heming.z...@suse.com
Hello List, David & Zdenek, I met a boring problem when executing lvchange cmd. In lvm tools/errors.h, there are defines return values: ``` #define ECMD_PROCESSED 1 #define ENO_SUCH_CMD2 #define EINVALID_CMD_LINE 3 #define EINIT_FAILED4 #define ECMD_FAILED 5 ``` In

Re: [linux-lvm] Suggestion: lvm2 filters lib needs to show some readable info for end user

2020-10-15 Thread heming.z...@suse.com
3 fd -1 ``` On 10/15/20 11:16 PM, David Teigland wrote: > On Thu, Oct 15, 2020 at 11:05:38PM +0800, heming.z...@suse.com wrote: >> Hello David, >> >> I don't know why I could use "git show >> 1fa48ba9d60ad34c5957b80024ef660ffb11161f" to >> see your patc

Re: [linux-lvm] Suggestion: lvm2 filters lib needs to show some readable info for end user

2020-10-15 Thread heming.z...@suse.com
David Teigland wrote: > On Mon, Jul 20, 2020 at 07:02:15PM +0800, heming.z...@suse.com wrote: >> So, in my opinion, I suggest there should be some code improvement for >> all filter failed info. Some filter failed debug log should convert from >> debug level to standard out

Re: [linux-lvm] [PATCH v2] lvs: add -o lv_usable

2020-09-18 Thread heming.z...@suse.com
On 9/18/20 7:38 PM, Heinz Mauelshagen wrote: > > On 9/18/20 9:07 AM, heming.zhao wrote: >> On 9/17/20 6:18 PM, Heinz Mauelshagen wrote: >>> On 9/10/20 8:34 AM, heming.zhao wrote: On 9/10/20 1:17 AM, Zdenek Kabelac wrote: > Dne 09. 09. 20 v 18:47 Zhao Heming napsal(a): >> report LV

Re: [linux-lvm] [PATCH 1/2] metadata: check pv->dev null when setting PARTIAL_LV

2020-09-11 Thread heming.z...@suse.com
On 9/11/20 8:17 PM, Zdenek Kabelac wrote: > Dne 10. 09. 20 v 17:37 Zhao Heming napsal(a): >> The code in vg_read(): >> ``` >> if (missing_pv_dev || missing_pv_flag) >> vg_mark_partial_lvs(vg, 1); >> ``` >> the missing_pv_dev not zero when pv->dev is null. >> the missing_pv_flag not zero

Re: [linux-lvm] [PATCH] lvs: add -o lv_usable

2020-09-07 Thread heming.z...@suse.com
On 9/5/20 5:06 PM, Zhao Heming wrote: > report LV is usable for upper layer. > > Signed-off-by: Zhao Heming > --- > lib/activate/activate.h | 2 + > lib/activate/dev_manager.c | 67 > lib/metadata/metadata-exported.h | 1 + > lib/metadata/metadata.c

Re: [linux-lvm] [PATCH] lvs: add -o lv_usable

2020-09-05 Thread heming.z...@suse.com
On 9/5/20 5:06 PM, Zhao Heming wrote: > report LV is usable for upper layer. > > Signed-off-by: Zhao Heming > --- > lib/activate/activate.h | 2 + > lib/activate/dev_manager.c | 67 > lib/metadata/metadata-exported.h | 1 + > lib/metadata/metadata.c

Re: [linux-lvm] [PATCH] gcc: change zero-sized array to fexlible array

2020-09-03 Thread heming.z...@suse.com
m: Zdenek Kabelac Date: Fri, 28 Aug 2020 19:15:42 +0200 Subject: [PATCH] tools: move struct element before variable lenght lis ``` Thanks, On 9/2/20 11:22 PM, Zdenek Kabelac wrote: > Dne 29. 08. 20 v 5:11 heming.z...@sus

Re: [linux-lvm] [PATCH] lib/metadata: add new api lv_is_available()

2020-09-01 Thread heming.z...@suse.com
On 9/1/20 11:07 PM, David Teigland wrote: > On Tue, Sep 01, 2020 at 05:09:23PM +0800, heming.zhao wrote: >> 'broken' is acceptable and good word. >> I'm only afraid end user don't know there is a new string item for lvs. >> like me, I just know the lv_health_status string item from Zdenek's

Re: [linux-lvm] [PATCH] lib/metadata: add new api lv_is_available()

2020-08-30 Thread heming.z...@suse.com
Hello David, & Zdenek, I got your meaning. Thanks to take time to review my patch and explain the reason. --- For Dave's question: > Zhao, I think we should revert that commit, and come up with a new word to > describe this thing (which also needs a clear definition), and report it > in lvs.

Re: [linux-lvm] [PATCH] gcc: change zero-sized array to fexlible array

2020-08-28 Thread heming.z...@suse.com
On 8/29/20 3:32 AM, Zdenek Kabelac wrote: > Dne 26. 08. 20 v 7:18 heming.z...@suse.com napsal(a): >> ping. >> >> @Marian & other maintainers >> >> >> On 8/21/20 12:05 AM, Zhao Heming wrote: >>> this patch makes gcc happy with compiling option

Re: [linux-lvm] [PATCH v2] lib/metadata: add new api lv_is_available()

2020-08-27 Thread heming.z...@suse.com
one line bug: ``` @@ -2061,8 +2149,11 @@ static int _lv_mark_if_partial_single(struct logical_volume *lv, void *data) if (!_lv_each_dependency(lv, _lv_mark_if_partial_collect, )) return_0; - if (baton.partial) + if (baton.partial) { lv->status

Re: [linux-lvm] [PATCH] lib/metadata: add new api lv_is_available()

2020-08-27 Thread heming.z...@suse.com
please ignore this patch. I forgot to add [patch v2] & history info. On 8/28/20 12:05 AM, Zhao Heming wrote: > It commit is enhancement for 1d0dc74f9147e3c1f3681efa4166cbe2edcb6571 > 1d0dc74f9147 only supports all raid type, this commit adds new api > and extends support scope with linear/mirror

Re: [linux-lvm] [PATCH] lvdisplay: dispaly correct status on linear type

2020-08-27 Thread heming.z...@suse.com
thank you for your kindly review. On 8/27/20 1:03 AM, David Teigland wrote: > On Wed, Aug 26, 2020 at 11:50:44PM +0800, Zhao Heming wrote: >> It commit is enhancement for 1d0dc74f9147e3c1f3681efa4166cbe2edcb6571 >> 1d0dc74f9147 only supports all raid type, this commit adds linear type. >> >> With

Re: [linux-lvm] [PATCH] lvdisplay: dispaly correct status on linear type

2020-08-26 Thread heming.z...@suse.com
Same as the commit writing, this commit is code enhancement not bugfix. Last commit 1d0dc74f9147e3c1f3681efa4166cbe2edcb6571 had been verified by one of suse customer. They did test for types: mirror, raid0, raid1, raid5, linear. For this commit, I only verified linear & raid cases. I have

Re: [linux-lvm] [PATCH] tests: use correct RA size, underly dev & delay time.

2020-08-12 Thread heming.z...@suse.com
a little more info about my patch. in one of my test env, system default read_ahead size is 1024 sector (512K), which bigger than 128k in test case. which causes _set_dev_node_read_ahead() to deny to set up RA. On 8/12/20 7:18 PM, Zhao Heming wrote: > lvconvert-repair-raid.sh: > - in some env,

[linux-lvm] how often does lvm team update source code in ftp site

2020-08-10 Thread heming.z...@suse.com
Hello, I have a question about the release freq. The lvm2 2.03.10 tag had been created on yesterday But in ftp site: ftp://sources.redhat.com/pub/lvm2/releases/ The latest lvm2 version is 2.03.05. How often does lvm2 team update for this site? Or are there some reasons/rules for not putting

[linux-lvm] Suggestion: lvm2 filters lib needs to show some readable info for end user

2020-07-20 Thread heming.z...@suse.com
Hello list, first, I give a example, if a disk (/dev/sdb) has md metadata info. the pvcreate cmd will be failed and show info: ``` # pvcreate /dev/sdb Device /dev/sdb excluded by a filter ``` For developer, if he wants to know the reason, he may execute below command: ``` # pvcreate -

[linux-lvm] question about vg underlying pv devs order

2020-05-26 Thread heming.z...@suse.com
Hello list, one our customer reported a issue. After executing lvextend, the vg underlying pv devs changed. I do a summary from my watching. first, pv devies in /etc/lvm/backup/systemvg & /etc/lvm/archive/systemvg-xxx are correct. but using pvdissect (url:

Re: [linux-lvm] issue (or bug): when vgremove does removing lvmcache

2020-05-26 Thread heming.z...@suse.com
Hello David, very stupid mistake, I used master branch not not latest code to verify this issue. after switching to latest code, this issue disappeared. Thank you for your help. On 5/27/20 5:30 AM, David Teigland wrote: On Sat, May 23, 2020 at 10:03:50PM +0800, heming.z...@suse.com wrote

[linux-lvm] issue (or bug): when vgremove does removing lvmcache

2020-05-23 Thread heming.z...@suse.com
Hello List, when using below reproduced steps, lvm command show error info. ``` # pvcreate /dev/sda /dev/sdb # vgcreate test /dev/sda /dev/sdb # lvcreate --name main --size 200m test /dev/sda # lvcreate --name fast --size 50m test /dev/sdb # lvconvert -y --type cache --cachevol fast

[linux-lvm] stable-2.02 missing patch files for lib/device/bcache.c

2020-02-27 Thread heming.z...@suse.com
Hello lvm team, below 2 patches of stable-2.02 for lib/device/bcache.c are missing: 7550665ba49ac7d497d5b212e14b69298ef01361 36523a398d50381f8355e719b98c3ce584b81a23 They were overwriten by Joe Thornber recent bug fix. Please re-apply them. Thank you.

Re: [linux-lvm] commit c527a0cbfc3 may have a bug

2020-02-14 Thread heming.z...@suse.com
Hello David, I accept your points. the commit c527a0cbfc3 is correct. I still not sure if the correct fix would have unintended consequences. I think the most of people should only config device/filter in their machine. After this commit, machine with duplicated devs should config 2 same copies

[linux-lvm] commit c527a0cbfc3 may have a bug

2020-02-14 Thread heming.z...@suse.com
Hello list & David, The stable-2.02 branch commit c527a0cbfc391645d30407d2 may intruduce a bug. There is a new function label_scan_pvscan_all(), which uses cmd->lvmetad_filter to create devices list for scan. code: ``` label_scan_pvscan_all if (!(iter = dev_iter_create(cmd->lvmetad_filter,