Re: Running FreeBSD on M.2 SSD

2020-03-10 Thread Mario Olofo
Hi Rebecca, I checked when I had the problem but the machine was up to date. I already solved this problem with the fix in the bugzilla and a lot of help from the great people here to try to narrow down the problem, but the little detail is that the installer wasn't using the ZFS volumes as 4k. So

Re: Running FreeBSD on M.2 SSD

2020-03-10 Thread Rebecca Cran
>> On Feb 26, 2020, at 9:20 PM, Warner Losh wrote: >> >> On Wed, Feb 26, 2020, 8:54 PM Mario Olofo wrote: >> >> Hello Mark, >> Yes, I think that it's related to the WD Green SSD. >> Today I found this bug on FreeBSD's bugzilla: >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225666 >> Tr

Re: Running FreeBSD on M.2 SSD

2020-03-01 Thread Mario Olofo
Yes, I installed with TRIM on and used the system with it on, but now I expanded the partition, reinstalled and rebuild the kernel with the quirk of broken TRIM to be safe but it appears to not be needed as far as I can tell. Will continue to work on the wifi driver now that the filesystem is stabl

Re: Running FreeBSD on M.2 SSD

2020-02-29 Thread Daniel Kalchev
Is TRIM still on? I understand the quirks patch indicates the drive has some trouble with 4K aligned writes. If memory serves it I also indicated broken TRIM so to be safe you need both. Daniel > On 29 Feb 2020, at 2:46, Mario Olofo wrote: > > Hello guys, a little update that let me more c

Re: Running FreeBSD on M.2 SSD

2020-02-29 Thread Antony Uspensky
On Fri, 28 Feb 2020, Chris wrote: The TLDR of 4k vs 512 largely has to do with the size of the files going onto your medium. Many files of a smaller size fit better on a 512 boundary. Whereas larger mp3s or archives fair better on a 4k boundary. BTW these are called SECTOR sizes. Not pages. :

Re: Running FreeBSD on M.2 SSD

2020-02-29 Thread Mario Olofo
Hello, sorry my lack of vocabulary and thanks for the clarification I think that it's a waste of space for me, and I'm afraid that this empty space is making the problem just less frequent. I remember that many years ago I implemented a FFS for an embedded system, and the SD Card was 4k "aligned",

Re: Running FreeBSD on M.2 SSD

2020-02-28 Thread Chris
On Fri, 28 Feb 2020 21:44:45 -0300 Mario Olofo mario.ol...@gmail.com said Hello guys, a little update that let me more confused I reinstalled the FreeBSD with 4k pages using the sysctl vfs.zfs.min_auto_ashift = 12 and no errors after a lot of stress I put on it. One thing that I noticed is that

Re: Running FreeBSD on M.2 SSD

2020-02-28 Thread Mario Olofo
Hello guys, a little update that let me more confused I reinstalled the FreeBSD with 4k pages using the sysctl vfs.zfs.min_auto_ashift = 12 and no errors after a lot of stress I put on it. One thing that I noticed is that with the pool as 4k, the disk fill up very fast, recompiling the kernel used

Re: Running FreeBSD on M.2 SSD

2020-02-28 Thread Mario Olofo
Yes, tried 4k quirk but not on install because don't know how to, I did a clean install then patch and rebuild the kernel, but the volume was already configured for 512bytes, I think I would need to create manually the volume, but don't remember how to anymore xD But I'll search some tutorials and

Re: Running FreeBSD on M.2 SSD

2020-02-28 Thread Theron
On 2020-02-28 09:14, Mario Olofo wrote: Thanks! The only thing that I didn't checked was the questions of Theron, about misaligned data. The layout of the disk is as follows: Disco /dev/sdb: 447,1 GiB, 480113590272 bytes, 937721856 setores Unidades: setor de 1 * 512 = 512 bytes Tamanho de setor

Re: Running FreeBSD on M.2 SSD

2020-02-28 Thread Mario Olofo
Thanks! The only thing that I didn't checked was the questions of Theron, about misaligned data. The layout of the disk is as follows: Disco /dev/sdb: 447,1 GiB, 480113590272 bytes, 937721856 setores Unidades: setor de 1 * 512 = 512 bytes Tamanho de setor (lógico/físico): 512 bytes / 512 bytes Ta

Re: Running FreeBSD on M.2 SSD

2020-02-27 Thread Pete Wright
On 2020-02-27 20:44, Mario Olofo wrote: Thanks for the update. May you share what quirks was detected for your card and firmware to see if it matches mine? The only way I was able to run FreeBSD 12-STABLE on the SSD was using the suggested sysctl vfs.zfs.trim.enabled=0 Maybe the problem real

Re: Running FreeBSD on M.2 SSD

2020-02-27 Thread Stefan Huerter
Hello Mario I am sorry, my comment contains no help for your case, but is treading my problems with FreeBSD in the past. Am Fr, 28.02.2020, 04:58 schrieb Pete Wright: >> root@~ # camcontrol devlist          at >> scbus0 target 0 lun 0 >> (ada0,pass0) >>   at scbus1 target 0 lun 0 (ada1

Re: Running FreeBSD on M.2 SSD

2020-02-27 Thread Mario Olofo
Thanks for the update. May you share what quirks was detected for your card and firmware to see if it matches mine? The only way I was able to run FreeBSD 12-STABLE on the SSD was using the suggested sysctl vfs.zfs.trim.enabled=0 Maybe the problem really is a combination of factors, for the person

Re: Running FreeBSD on M.2 SSD

2020-02-27 Thread Pete Wright
On 2/24/20 11:13 AM, Mario Olofo wrote: Hi Pete, The nvmecontrol devlist don't found any devices. pciconf -lv nvme0 didn't found anything either. The camcontrol devlist output was as follows: root@~ # camcontrol devlist at scbus0 target 0 lun 0 (ada0,pass0)   at scbus1 target 0 lun

Re: Running FreeBSD on M.2 SSD

2020-02-27 Thread Mario Olofo
Hello Daniel, Indeed setting the sysctl variable on install and after that on loader.conf appears to solve the data corruption problem =O Did the same as before, install git, node, npm, etc and all good. I will build the kernel and install xorg and xfce to use more disk space and see if some probl

Re: Running FreeBSD on M.2 SSD

2020-02-27 Thread Theron
On 2020-02-26 22:54, Mario Olofo wrote: Hello Mark, Yes, I think that it's related to the WD Green SSD. Today I found this bug on FreeBSD's bugzilla: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225666 Tried to reinstall and recompile the kernel with the patch but it didn't work, I continu

Re: Running FreeBSD on M.2 SSD

2020-02-27 Thread Mario Olofo
This was supposed to be disabled by the quirk 0x02 (ADA_Q_NCQ_TRIM_BROKEN) right? There's some command to disable trim on installer boot and then permanently after the install? Mario Em qui., 27 de fev. de 2020 às 01:20, Warner Losh escreveu: > > > On Wed, Feb 26, 2020, 8:54 PM Mario Olofo wr

Re: Running FreeBSD on M.2 SSD

2020-02-26 Thread Warner Losh
On Wed, Feb 26, 2020, 8:54 PM Mario Olofo wrote: > Hello Mark, > > Yes, I think that it's related to the WD Green SSD. > Today I found this bug on FreeBSD's bugzilla: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225666 > > Tried to reinstall and recompile the kernel with the patch but it d

Re: Running FreeBSD on M.2 SSD

2020-02-26 Thread Mario Olofo
Hello Mark, Yes, I think that it's related to the WD Green SSD. Today I found this bug on FreeBSD's bugzilla: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225666 Tried to reinstall and recompile the kernel with the patch but it didn't work, I continue to see corrupted data. I think that the

Re: Running FreeBSD on M.2 SSD

2020-02-25 Thread Mario Olofo
Hello, I reinstalled FreeBSD 12.1 on my SSD (in the swap partition of my Linux to test) and on my Hybrid HDD. Just configured and rc.conf to start my wifi dongle, downoaded git, node and npm via pkg and... as you can see in my screenshot, the ZFS already shows corrupted data... Can't been able t

Re: Running FreeBSD on M.2 SSD

2020-02-25 Thread Mario Olofo
Hello, I reinstalled FreeBSD 12.1 on my SSD (in the swap partition of my Linux to test) and on my Hybrid HDD. Just configured and rc.conf to start my wifi dongle, downoaded git, node and npm via pkg and... as you can see in my screenshot, the ZFS already shows corrupted data... Can't been able t

Re: Running FreeBSD on M.2 SSD

2020-02-25 Thread Mario Olofo
Guys, just a little update: I was able to boot from the HDD, just had to remove the FreeBSD partition from the SSD because the loader always load from the first pool that it founds (I say first because the two installations was on zfs/root, so it never boot the second pool). After one hour of usa

Re: Running FreeBSD on M.2 SSD

2020-02-25 Thread Mario Olofo
Hybrid HDD are the norm for notebooks, that is, 1TB hard drive with 16GB of SSD internal memory for fast writes and hot data (most used pages). In my case, the notebook came with a ST1000LX015, but the problem happened on the SSD, not on this HDD. The SSD is a WD Green m.2, Rebecca already posted a

Re: Running FreeBSD on M.2 SSD

2020-02-25 Thread George Michaelson
you said "hybrid HDD" is this possibly about write-back vs write-through cache integrity and some confusion in a driver over what is committed back in disk, and what is not? this feels like a very nasty corner case. Could you be explicit about versions and vendors? I am asking for selfish reason

Re: Running FreeBSD on M.2 SSD

2020-02-25 Thread Mario Olofo
Hello, I reinstalled FreeBSD 12.1 on my SSD (in the swap partition of my Linux to test) and on my Hybrid HDD. Just configured rc.conf to start my wifi dongle, downoaded git, node and npm via pkg and... as you can see in my screenshot, the ZFS already shows corrupted data... Can't been able to lo

Re: Running FreeBSD on M.2 SSD

2020-02-25 Thread Karl Denninger
On 2/25/2020 9:53 AM, John Kennedy wrote: On Tue, Feb 25, 2020 at 11:07:48AM +, Pete French wrote: I have often wondered if ZFS is more aggressive with discs, because until very recently any solid state drive I have used ZFS on broke very quicky. ... I've always wondered if ZFS (and oth

Re: Running FreeBSD on M.2 SSD

2020-02-25 Thread Paul Mather
On Feb 25, 2020, at 9:03 AM, Daniel Kalchev wrote: > FreeBSD does not technically have driver for different disks. People asked > whether it is an NVMe device or SATA device, because those interfaces have > different drivers. > > But for FreeBSD, an mechanical SATA, hybrid SATA or SSD SATA wi

Re: Running FreeBSD on M.2 SSD

2020-02-25 Thread John Kennedy
On Tue, Feb 25, 2020 at 11:07:48AM +, Pete French wrote: > I have often wondered if ZFS is more aggressive with discs, because until > very recently any solid state drive I have used ZFS on broke very quicky. ... I've always wondered if ZFS (and other snapshotting file systems) would help ki

Re: Running FreeBSD on M.2 SSD

2020-02-25 Thread Daniel Kalchev
If my memory serves well, TRIM was originally not enabled by default on FreeBSD, because there were many drives that claimed to support it, but didn’t, or didn’t support it properly. That sort of is resolved today and WD Green is supposedly relatively recent drive. I am not aware of disabling T

Re: Running FreeBSD on M.2 SSD

2020-02-25 Thread Pete French
On 25/Feb/2020 13:28, Mario Olofo wrote: Good morning all, @Pete French, you have trim activated on your SSDs right? I heard that if its not activated, the SSD disc can stop working very quickly. On the curent dfives, yes, but I have run with trim disabled in the past, It kinds of depends

Re: Running FreeBSD on M.2 SSD

2020-02-25 Thread Daniel Kalchev
FreeBSD does not technically have driver for different disks. People asked whether it is an NVMe device or SATA device, because those interfaces have different drivers. But for FreeBSD, an mechanical SATA, hybrid SATA or SSD SATA will use exactly the same SATA driver. It depends on the chipset.

Re: Running FreeBSD on M.2 SSD

2020-02-25 Thread Karl Denninger
On 2/25/2020 8:28 AM, Mario Olofo wrote: Good morning all, @Pete French, you have trim activated on your SSDs right? I heard that if its not activated, the SSD disc can stop working very quickly. @Daniel Kalchev, I used UFS2 with SU+J as suggested on the forums for me, and in this case the file

Re: Running FreeBSD on M.2 SSD

2020-02-25 Thread Mario Olofo
Good morning all, @Pete French, you have trim activated on your SSDs right? I heard that if its not activated, the SSD disc can stop working very quickly. @Daniel Kalchev, I used UFS2 with SU+J as suggested on the forums for me, and in this case the filesystem didn't "corrupted", it justs kernel p

Re: Running FreeBSD on M.2 SSD

2020-02-25 Thread Pete French
On 25/Feb/2020 10:52, Daniel Kalchev wrote: It might well be, that FreeBSD is more agressive with your motherboard/chipset or does not implement known quirk of that — which might trigger some edge cases for the SSD. Ultimately, if you can move that SSD to another motherboard and test it, it

Re: Running FreeBSD on M.2 SSD

2020-02-25 Thread Daniel Kalchev
I have had disks, that work “perfectly" under UFS and various RAID controllers (and DOS and Windows), but always reported checksum errors when running under ZFS. It would happen on any motherboard or controller. That made me never use anything but ZFS on data that I cannot recreate 100%, fast… b

Re: Running FreeBSD on M.2 SSD

2020-02-25 Thread Bob Bishop
Hi, > On 25 Feb 2020, at 01:35, Mario Olofo wrote: > > Hi Mike, thanks for the insight. > > I tried both, but not at the same time. > When I found that the ZFS was corrupting the filesystem, I reinstalled the > FreeBSD using UFS but no luck. > Ulf told me that he had the same problem and it tur

Re: Running FreeBSD on M.2 SSD

2020-02-24 Thread Mario Olofo
Hi Mike, thanks for the insight. I tried both, but not at the same time. When I found that the ZFS was corrupting the filesystem, I reinstalled the FreeBSD using UFS but no luck. Ulf told me that he had the same problem and it turned out the problem was a defective RAM, but here I just ran the tes

Re: Running FreeBSD on M.2 SSD

2020-02-24 Thread Mike Karels
Mario, have you ruled out the possibility that the UFS and ZFS filesystems are overlapping? It would be worth a careful check of the partition table and filesystem sizes. You can check the actual UFS size with dumpfs. I ask in part because UFS has a tendency to write to the last cylinder group.

Re: Running FreeBSD on M.2 SSD

2020-02-24 Thread Matt Garber
On Mon, Feb 24, 2020 at 3:56 PM Mario Olofo wrote: > Hi Matt, > > The ext4 don't have data checksum, but have metadata checksum, which would > probably be corrupted as well, as I reinstalled my Linux over the same > partition the FreeBSD was using, and by > now I have a lot more files on it than

Re: Running FreeBSD on M.2 SSD

2020-02-24 Thread Mario Olofo
Hi Matt, The ext4 don't have data checksum, but have metadata checksum, which would probably be corrupted as well, as I reinstalled my Linux over the same partition the FreeBSD was using, and by now I have a lot more files on it than I had on FreeBSD. If you look at the forum post I created, you'l

Re: Running FreeBSD on M.2 SSD

2020-02-24 Thread Matt Garber
On Mon, Feb 24, 2020 at 2:44 PM Mario Olofo wrote: > Hi Pete, in the logs there's nothing wrong, I only see the problem on zpool > status after the first scrub, even if I just > reinstall the FreeBSD and some basic packages (didn't even need a lot of > files as I thought). Mario, Out of curios

Re: Running FreeBSD on M.2 SSD

2020-02-24 Thread Mario Olofo
Hi Pete, in the logs there's nothing wrong, I only see the problem on zpool status after the first scrub, even if I just reinstall the FreeBSD and some basic packages (didn't even need a lot of files as I thought). Hello Rebecca, indeed is this model I'm using, the SATA versions is cheaper so I in

Re: Running FreeBSD on M.2 SSD

2020-02-24 Thread Rebecca Cran
On 2/24/20 12:13 PM, Mario Olofo wrote: root@~ # camcontrol devlist at scbus0 target 0 lun 0 (ada0,pass0)   at scbus1 target 0 lun 0 (ada1,pass1) at scbus2 target 0 lun 0 (pass2,da0) Ok, so it's a SATA M.2 SSD - one of these: https://shop.westerndigital.com/products/inte

Re: Running FreeBSD on M.2 SSD

2020-02-24 Thread Pete Wright
On 2020-02-24 11:13, Mario Olofo wrote: Hi Pete, The nvmecontrol devlist don't found any devices. pciconf -lv nvme0 didn't found anything either. The camcontrol devlist output was as follows: root@~ # camcontrol devlist at scbus0 target 0 lun 0 (ada0,pass0) at scbus1 target 0 lun

Re: Running FreeBSD on M.2 SSD

2020-02-24 Thread Mario Olofo
Hi Pete, The nvmecontrol devlist don't found any devices. pciconf -lv nvme0 didn't found anything either. The camcontrol devlist output was as follows: root@~ # camcontrol devlist at scbus0 target 0 lun 0 (ada0,pass0) at scbus1 target 0 lun 0 (ada1,pass1) at scbus2 target

Re: Running FreeBSD on M.2 SSD

2020-02-24 Thread Pete Wright
On 2020-02-24 09:58, Mario Olofo wrote: Hello John, thank you for your reply. Yesterday I reinstalled the 12.1 on a VirtualBox virtual machine, did the same steps and it didn't corrupted the ZFS, so I think that the problem is in the FreeBSD's driver for m.2 SSD. Besides the corruption of the

Re: Running FreeBSD on M.2 SSD

2020-02-24 Thread Mario Olofo
Hello John, thank you for your reply. Yesterday I reinstalled the 12.1 on a VirtualBox virtual machine, did the same steps and it didn't corrupted the ZFS, so I think that the problem is in the FreeBSD's driver for m.2 SSD. Besides the corruption of the filesystem, I forgot to mention that I notic

Re: Running FreeBSD on M.2 SSD

2020-02-24 Thread John Kennedy
On Sun, Feb 23, 2020 at 11:18:08PM -0300, Mario Olofo wrote: > Some time ago I tried to switch from Linux to FreeBSD 12.1, used a WiFi > dongle and all good, until I found that both ZFS and UFS corrupted the > filesystem very fast. > I work with a lot of small files because of web programming (node

Running FreeBSD on M.2 SSD

2020-02-23 Thread Mario Olofo
Hello guys, Some time ago I tried to switch from Linux to FreeBSD 12.1, used a WiFi dongle and all good, until I found that both ZFS and UFS corrupted the filesystem very fast. I work with a lot of small files because of web programming (node_modules), so after a clean install, after installing th