From owner-freebsd-stable@freebsd.org Tue Aug 21 13:21:03 2018 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15A281071C8E for ; Tue, 21 Aug 2018 13:21:03 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost2.sentex.ca (smarthost2.sentex.ca [IPv6:2607:f3e0:80:80::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smarthost2.sentex.ca", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5954182EB5 for ; Tue, 21 Aug 2018 13:21:01 +0000 (UTC) (envelope-from mike@sentex.net) Received: from lava.sentex.ca (lava.sentex.ca [IPv6:2607:f3e0:0:5:0:0:0:11]) by smarthost2.sentex.ca (8.15.2/8.15.2) with ESMTPS id w7LDL0SR038525 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 21 Aug 2018 09:21:00 -0400 (EDT) (envelope-from mike@sentex.net) Received: from [192.168.43.26] (saphire3.sentex.net [192.168.43.26]) by lava.sentex.ca (8.15.2/8.15.2) with ESMTP id w7LDKxnB088054; Tue, 21 Aug 2018 09:20:59 -0400 (EDT) (envelope-from mike@sentex.net) Subject: Re: gpart strangeness To: Eugene Grosbein , FreeBSD-STABLE Mailing List References: <4e5b6d81-7fc5-c538-2bd2-8cd5dd040a1d@sentex.net> <6be4ee74-c09d-b88f-e4ed-cadb1537e478@grosbein.net> From: Mike Tancsa Openpgp: preference=signencrypt Autocrypt: addr=mike@sentex.net; prefer-encrypt=mutual; keydata= xsBNBEzcA24BCACpwI/iqOrs0GfQSfhA1v6Z8AcXVeGsRyKEKUpxoOYxXWc2z3vndbYlIP6E YJeifzKhS/9E+VjhhICaepLHfw865TDTUPr5D0Ed+edSsKjlnDtb6hfNJ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wDbgIbDAAKCRCVx8DNpHPK 1+iQB/99aqNtez9ZTBWELj269La8ntuRx6gCpzfPXfn6SDIfTItDxTh1hrdRVP5QNGGF5wus N4EMwXouskva1hbFX3Pv72csYSxxEJXjW16oV8WK4KjKXoskLg2RyRP4uXqL7Mp2ezNtVY5F 9nu3fj4ydpHCSaqKy5xd70A8D50PfZsFgkrsa5gdQhPiGGEdxhq/XSeAAnZ4uVLJKarH+mj5 MEhgZPEBWkGrbDZpezl9qbFcUem/uT9x8FYT/JIztMVh9qDcdP5tzANW5J7nvgXjska+VFGY ryZK4SPDczh74mn6GI/+RBi7OUzXXPgpPBrhS5FByjwCqjjsSpTjTds+NGIY Organization: Sentex Communications Message-ID: <7886da80-d2e3-1562-07df-cb955d888e1b@sentex.net> Date: Tue, 21 Aug 2018 09:20:58 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <6be4ee74-c09d-b88f-e4ed-cadb1537e478@grosbein.net> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.83 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2018 13:21:03 -0000 On 8/20/2018 11:34 PM, Eugene Grosbein wrote: >> I was trying to create a single partition on a 16G mSata drive and >> whenever I add a partition, all of a sudden the secondary GPT partion is >> borked. Any idea whats going on here ? >> > > Did you look to "dmesg -a" output for additional hints? > What is system version? RELENG11 r337953 AMD64 ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 ada0: ACS-3 ATA SATA 3.x device ada0: Serial Number DED9075313EC01677930 ada0: 600.000MB/s transfers (SATA 3.x, PIO4, PIO 8192bytes) ada0: Command Queueing enabled ada0: 15272MB (31277232 512 byte sectors) Other than the message when I create the partition, nada GEOM: diskid/DISK-DED9075313EC01677930: the secondary GPT table is corrupt or invalid. GEOM: diskid/DISK-DED9075313EC01677930: using the primary only -- recovery suggested. I tried different alignment options for the partition, and no changes. Doing MBR however seems to work for some reason 0# gpart destroy -F ada0 ada0 destroyed 0# gpart create -s mbr ada0 ada0 created 0# gpart add -t freebsd ada0 ada0s1 added 0# ls -l /dev/ada0* crw-r----- 1 root operator - 0x4b Jan 19 23:59 /dev/ada0 crw-r----- 1 root operator - 0x7a Jan 20 22:09 /dev/ada0s1 crw-r----- 1 root operator - 0x7c Jan 20 22:09 /dev/ada0s1a 0# newfs -U -O2 /dev/ada0s1a /dev/ada0s1a: 15272.1MB (31277168 sectors) block size 32768, fragment size 4096 using 25 cylinder groups of 626.09MB, 20035 blks, 80256 inodes. with soft updates super-block backups (for fsck_ffs -b #) at: 192, 1282432, 2564672, 3846912, 5129152, 6411392, 7693632, 8975872, 10258112, 11540352, 12822592, 14104832, 15387072, 16669312, 17951552, 19233792, 20516032, 21798272, 23080512, 24362752, 25644992, 26927232, 28209472, 29491712, 30773952 0# However, when I try to write to the disk, it crashes the box. I wonder if this is a bad batch of mSata SSDs.... Hmmm login: panic: ufs_dirbad: /mnt: bad dir ino 2 at offset 0: mangled entry cpuid = 3 KDB: stack backtrace: #0 0xffffffff80642407 at kdb_backtrace+0x67 #1 0xffffffff805fbc37 at vpanic+0x177 #2 0xffffffff805fbab3 at panic+0x43 #3 0xffffffff808255d1 at ufs_lookup_ino+0xe21 #4 0xffffffff80929f6c at VOP_CACHEDLOOKUP_APV+0x7c #5 0xffffffff806a9c86 at vfs_cache_lookup+0xd6 #6 0xffffffff80929e4c at VOP_LOOKUP_APV+0x7c #7 0xffffffff806b3691 at lookup+0x6d1 #8 0xffffffff806b2b59 at namei+0x489 #9 0xffffffff806c9168 at kern_statat+0x98 #10 0xffffffff806c931c at sys_fstatat+0x2c #11 0xffffffff80889778 at amd64_syscall+0xa38 #12 0xffffffff8086a1fd at fast_syscall_common+0x101 Uptime: 1m6s PCEngines apu3 coreboot build 20170302 4080 MB ECC DRAM SeaBIOS (version rel-1.10.0.1) Press F10 key now for boot menu Booting from Hard Disk... F1 FreeBSD F2 FreeBSD F5 Drive 1 F6 PXE Boot: F1 /boot/config: -h -S115200 If I create a gpart, I can write to the disk, but there is corruption behind the scenes 0# gpart create -s gpt ada0 ada0 created 0# gpart add -t freebsd-ufs ada0 ada0p1 added 0# newfs newfs newfs_msdos 0# newfs -U -O2 /dev/ada0p1 /dev/ada0p1: 15272.0MB (31277152 sectors) block size 32768, fragment size 4096 using 25 cylinder groups of 626.09MB, 20035 blks, 80256 inodes. with soft updates super-block backups (for fsck_ffs -b #) at: 192, 1282432, 2564672, 3846912, 5129152, 6411392, 7693632, 8975872, 10258112, 11540352, 12822592, 14104832, 15387072, 16669312, 17951552, 19233792, 20516032, 21798272, 23080512, 24362752, 25644992, 26927232, 28209472, 29491712, 30773952 0# mount /dev/ada0p1 /mnt 0# dd if=/dev/urandom of=/mnt/test1 bs=4096k count=200 200+0 records in 200+0 records out 838860800 bytes transferred in 44.383275 secs (18900381 bytes/sec) 0# md5 /mnt/test1 MD5 (/mnt/test1) = 02fba9e2f3795f13b864c8613c8ae49e 0# umount /mnt 0# mount /dev/ada0p1 /mnt 0# dd if=/dev/urandom of=/mnt/test2 bs=4096k count=100 100+0 records in 100+0 records out 419430400 bytes transferred in 22.194061 secs (18898317 bytes/sec) 0# md5 /mnt/test1 MD5 (/mnt/test1) = 318ee3900564460b14e4e80e0bb8f358 0# ---Mike -- ------------------- Mike Tancsa, tel +1 519 651 3400 x203 Sentex Communications, mike@sentex.net Providing Internet services since 1994 www.sentex.net Cambridge, Ontario Canada