From unknown Fri Jun 20 07:10:15 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#63890 <63890@debbugs.gnu.org> To: bug#63890 <63890@debbugs.gnu.org> Subject: Status: automatic alignment using 0% broken Reply-To: bug#63890 <63890@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:10:15 +0000 retitle 63890 automatic alignment using 0% broken reassign 63890 parted submitter 63890 Harald Dunkel severity 63890 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 04 06:09:24 2023 Received: (at submit) by debbugs.gnu.org; 4 Jun 2023 10:09:24 +0000 Received: from localhost ([127.0.0.1]:45095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5kfs-0007Od-EZ for submit@debbugs.gnu.org; Sun, 04 Jun 2023 06:09:24 -0400 Received: from lists.gnu.org ([209.51.188.17]:39474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5kfo-0007OT-I2 for submit@debbugs.gnu.org; Sun, 04 Jun 2023 06:09:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q5kfo-0007Bn-8I for bug-parted@gnu.org; Sun, 04 Jun 2023 06:09:20 -0400 Received: from mordac.selfhost.de ([82.98.82.6] helo=outgoing.selfhost.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q5kfm-0001UJ-Ab for bug-parted@gnu.org; Sun, 04 Jun 2023 06:09:20 -0400 Received: (qmail 7293 invoked from network); 4 Jun 2023 10:09:13 -0000 Received: from unknown (HELO mailhost.afaics.de) (postmaster@xqrsonfo.mail.selfhost.de@79.192.207.44) by mailout.selfhost.de with ESMTPA; 4 Jun 2023 10:09:13 -0000 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on marvin.afaics.de X-Spam-Level: * X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 2.5 TO_NO_BRKTS_PCNT To: lacks brackets + percentage X-Spam-Status: No, score=1.5 required=5.0 tests=ALL_TRUSTED=-1, TO_NO_BRKTS_PCNT=2.499 autolearn=no autolearn_force=no version=_VERSION Received: from [10.42.100.14] (cecil.afaics.de [10.42.100.14]) by marvin.afaics.de (OpenSMTPD) with ESMTP id e8ba7eae; Sun, 4 Jun 2023 12:09:12 +0200 (CEST) Message-ID: Date: Sun, 4 Jun 2023 12:09:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 To: bug-parted@gnu.org Content-Language: en-US From: Harald Dunkel Subject: automatic alignment using 0% broken Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: none client-ip=82.98.82.6; envelope-from=harri@afaics.de; helo=outgoing.selfhost.de X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi folks, How comes that sometimes "mkpart test 0% ..." is properly aligned, and sometimes it isn't? Sample: {root@lola:code () 589} parted -a optimal /dev/sda GNU Parted 3.5 Using /dev/sda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) mklabel gpt Warning: The existing disk label on /dev/sda will be destroyed and all data on this disk will be lost. Do you want to continue? Yes/No? yes (parted) mkpart test 0% 1% (parted) u s p Model: ASMT USB 3.0 TOSATA (scsi) Disk /dev/sda: 976773168s Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 65535s 9764714s 9699180s test (parted) rm 1 (parted) mkpart test 0% 4GiB Warning: The resulting partition is not properly aligned for best performance: 34s % 65535s != 0s Ignore/Cancel? i (parted) u s p Model: ASMT USB 3.0 TOSATA (scsi) Disk /dev/sda: 976773168s Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 34s 8388607s 8388574s test (parted) {root@lola:code () 589} cat /sys/block/sda/queue/optimal_io_size 33553920 {root@lola:code () 590} cat /sys/block/sda/queue/minimum_io_size 512 {root@lola:code () 591} cat /sys/block/sda/alignment_offset 0 {root@lola:code () 592} cat /sys/block/sda/queue/physical_block_size 512 Why is the start of the partition not properly aligned for the 2nd mkpart? It is "0%", as in the first case. Is there some way to tell parted to *always* align start and end properly, even if they were given in MiB instead of multiples of 65535s? I would be fine if parted adds a few sectors to the partition. Regards Harri