From owner-freebsd-stable@freebsd.org Fri Aug 28 16:10:37 2020 Return-Path: Delivered-To: freebsd-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4C3973B5E1D for ; Fri, 28 Aug 2020 16:10:37 +0000 (UTC) (envelope-from mr.xanto@gmail.com) Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdPhX49SLz3XZF for ; Fri, 28 Aug 2020 16:10:36 +0000 (UTC) (envelope-from mr.xanto@gmail.com) Received: by mail-lj1-x235.google.com with SMTP id e11so1908246ljn.6 for ; Fri, 28 Aug 2020 09:10:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:message-id:to:subject:mime-version :content-transfer-encoding; bh=M4ehoXVc4/yHREEQTmTqYrMc+Rs3cXaYGvmQuPLYjns=; b=usfJ1n9WhAowJSjf6z9mDMY6uRmgoOSwKV/G5mBTbRin8a10HGPxHYK34zzDwWXTIH LfSKxmHAXJwinzTErYQq+Dam7mVOp62HiJTPUb7qJXwY5heacTfeq8DH/9z7zHsFND+2 eXqKX94U2fSB+dgEo1nPUbpsYaQGPQhe+tOIqSSvBEpEcBJaOudz7L48GiaeFrezv8Md tJ+CvmX5m1Jq6N69Zl4Snk8SixGskmTzqV3BRgH/Bdm0lW4Pwtg4W4CVixmwJ+GDDHZB B70nSjb9PX+MVdb8NXsYUyJyvkjh69gEkdzFGcWsdrcgwB1go0lObrZTbDLC6CLAfwLs XtWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:message-id:to:subject:mime-version :content-transfer-encoding; bh=M4ehoXVc4/yHREEQTmTqYrMc+Rs3cXaYGvmQuPLYjns=; b=VS+OfP5pajKpQ/NwD6Tw5J+b8lfj6ZnWewg5zpPZzn4PjLVhKUWnabKLtwgq+muAJE OncVk2BOzFuMmHsOfSoXmagSA+s3+FZTWpB02Q7d5vEnfTH0KvX0ekl3eK7BLEtm/Cbn CtDW5k1vOZGthHafR5GPWgcFWH0E2d6ksFDnb6A84qkwu1K1WKXflshy1AIL29S+Sugh tAh0Hp4+gfSjRN/4IKcXUS/1QqTtWnIRriyX+LkJrpaS0GQCzq8hxL+HNiH1p86cCzWU Fbrk56Xzow5e88Nuuoq+YUAswCePUs/ZjoiIpnCGqLYaq6sFwPBQ5d5iHLWaQQle1UAN 3XRQ== X-Gm-Message-State: AOAM533EKaHFgSnomA6pej4Auxn1YHOL/9LvZMI1vf7U88UeC2Bs5sDB AdpqfuZQbygmxqKv7HpMilU9DvVeqWc= X-Google-Smtp-Source: ABdhPJxgmyvwcB/aArJjHa9gg1yEvZYXp814a27M8tCfAISBt5iXi4mh4HsKiQ/iWTpaesg9aokbuw== X-Received: by 2002:a2e:a36a:: with SMTP id i10mr1221789ljn.46.1598631034160; Fri, 28 Aug 2020 09:10:34 -0700 (PDT) Received: from [192.168.70.95] ([37.235.174.147]) by smtp.gmail.com with ESMTPSA id e14sm389952lfd.19.2020.08.28.09.10.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Aug 2020 09:10:33 -0700 (PDT) Date: Fri, 28 Aug 2020 19:10:31 +0300 From: Mamontov Roman Message-ID: <558957699.20200828191031@gmail.com> To: freebsd-stable@freebsd.org Subject: How prevent GEOM providers to use adaX labels? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BdPhX49SLz3XZF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=usfJ1n9W; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mrxanto@gmail.com designates 2a00:1450:4864:20::235 as permitted sender) smtp.mailfrom=mrxanto@gmail.com X-Spamd-Result: default: False [-2.72 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.71)[-0.712]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.03)[-1.034]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.97)[-0.973]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; RECEIVED_SPAMHAUS_PBL(0.00)[37.235.174.147:received]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::235:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-stable] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Aug 2020 16:10:37 -0000 Hello. I have two disk with next partitions: #gpart show => 40 11721045088 ada0 GPT (5.5T) 40 1024 1 freebsd-boot (512K) 1064 16777216 2 freebsd-swap (8.0G) 16778280 11704266848 3 freebsd-zfs (5.5T) => 40 11721045088 ada1 GPT (5.5T) 40 1024 1 freebsd-boot (512K) 1064 16777216 2 freebsd-swap (8.0G) 16778280 11704266848 3 freebsd-zfs (5.5T) Then these partitions are combined on GEOM and ZFS mirrors: #gmirror status Name Status Components mirror/swap COMPLETE ada0p2 (ACTIVE) ada1p2 (ACTIVE) #zpool status pool: zroot state: ONLINE status: Some supported features are not enabled on the pool. The pool can still be used, but some features are unavailable. action: Enable all features using 'zpool upgrade'. Once this is done, the pool may no longer be accessible by software that does not support the features. See zpool-features(7) for details. scan: resilvered 841G in 0 days 01:26:32 with 0 errors on Sat Jan 11 18:41:40 2020 config: NAME STATE READ WRITE CKSUM zroot ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 ada0p3 ONLINE 0 0 0 ada1p3 ONLINE 0 0 0 errors: No known data errors I try to change using adaX labels to diskid labels on both mirrors: first I disabled load gmirror via boot/loader.conf and etc/fstab, then i boot from live-cd and import/export zfs pool: ... #zpool import -d /dev/diskid -o altroot=/tmp/zroot zroot #zpool export #reboot After reboot to normal mode I see, that zpool change their adaX labels to diskid labels: #zpool status pool: zroot state: ONLINE status: Some supported features are not enabled on the pool. The pool can still be used, but some features are unavailable. action: Enable all features using 'zpool upgrade'. Once this is done, the pool may no longer be accessible by software that does not support the features. See zpool-features(7) for details. scan: resilvered 841G in 0 days 01:26:32 with 0 errors on Sat Jan 11 18:41:40 2020 config: NAME STATE READ WRITE CKSUM zroot ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 diskid/DISK-SERIAL1p3 ONLINE 0 0 0 diskid/DISK-SERIAL2p3 ONLINE 0 0 0 errors: No known data errors Then I've destroying gmirror and re-created it with diskid labels: #gmirror destroy swap #gmirror label -v -b round-robin swap diskid/DISK-SERIAL1p2 #gmirror insert swap diskid/DISK-SERIAL2p2 #gmirror status Name Status Components mirror/swap COMPLETE diskid/DISK-SERIAL1p2 (ACTIVE) diskid/DISK-SERIAL2p2 (ACTIVE) But after I've re-enabled gmirror in boot/loader.conf and /etc/fstab and rebooted, I've see adaX labels on both mirrors: #gmirror status Name Status Components mirror/swap COMPLETE ada0p2 (ACTIVE) ada1p2 (ACTIVE) #zpool status pool: zroot state: ONLINE status: Some supported features are not enabled on the pool. The pool can still be used, but some features are unavailable. action: Enable all features using 'zpool upgrade'. Once this is done, the pool may no longer be accessible by software that does not support the features. See zpool-features(7) for details. scan: resilvered 841G in 0 days 01:26:32 with 0 errors on Sat Jan 11 18:41:40 2020 config: NAME STATE READ WRITE CKSUM zroot ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 ada0p3 ONLINE 0 0 0 ada1p3 ONLINE 0 0 0 errors: No known data errors It look's like gmirror loaded before zfs and use search gmirror on adaX first instead diskid labels. Is there a way to prevent gmirror use adaX labels? #uname -rv 12.1-STABLE FreeBSD 12.1-STABLE r361496 GENERIC #sysctl kern.geom.label kern.geom.label.disk_ident.enable: 1 kern.geom.label.gptid.enable: 1 kern.geom.label.gpt.enable: 1 kern.geom.label.ufs.enable: 1 kern.geom.label.ufsid.enable: 1 kern.geom.label.reiserfs.enable: 1 kern.geom.label.ntfs.enable: 1 kern.geom.label.msdosfs.enable: 1 kern.geom.label.iso9660.enable: 1 kern.geom.label.flashmap.enable: 1 kern.geom.label.ext2fs.enable: 1 kern.geom.label.debug: 0