[07:22] <lotuspsychje> that was a quickfix :p
[07:23] <icey> lotuspsychje: indeed :)
[07:27] <nb-ben> ok I managed to boot without u-boot
[07:28] <nb-ben> that's pretty cool. saved me some suffering
[09:28] <DK2> i have a pxe installation with initrd.gz and linux file for the installation. the installation does not find the nic of the server. i have the source files for the driver but i dont know how to integrate that in my initrd.gz any good guides to that?
[10:21] <Jenshae> Hi all. I am getting very frustrated with ZFS at the moment. I made a RAIDZ (RAID 5) with 4x SSD drives. Every time that I reboot or shutdown and boot up, I get a different status. Now, "zpool status" shows all drives "ONLINE" and CKSUM = 0. However, sometimes they are all "DEGRADED" and yesterday I had one degraded and the rest online.
[10:22] <Jenshae> I have tried S.M.A.R.T. I have tried scrubbing and I have rebuilt the pool from scratch.
[10:22] <Jenshae> I don't know how to diagnose this further, to work out where the problem lies, particular disk, ZFS itself, the hard drive controller, BIOS or some sort of kernel problem.
[10:23] <Jenshae> Corruption is happening, "zpool status -v" listing the files, I go to them and I can't open them.
[10:25] <Jenshae> (I also checked that all the drive cables are firmly and fully plugged in)
[11:51] <Jenshae> Anyone got some terms I could search around to try and figure this out?
[12:06] <RoyK> Jenshae: is this native zfs or fuse-zfs?
[12:06] <RoyK> Jenshae: also, please pastebin zpool status -v
[12:06] <Jenshae> I don't know what fuse-zfs is.
[12:06] <RoyK> Jenshae: I've seen zfs finding errors the drive didn't know about (so-called "silent" errors)
[12:07] <RoyK> zfs-fuse, perhaps - anyway - that's zfs running under fuse, that is, in usermode. If you have the spl/zfs kernel modules, it's native
[12:08] <Jenshae> https://pastebin.ubuntu.com/p/wK3nSVfMFX/
[12:18] <Jenshae> RoyK: Sorry, took awhile to sanitise it, most of my folders and file names are a bit too descriptive, so this is just a snippet https://pastebin.ubuntu.com/p/Yj4PHpTZbP/
[12:19] <RoyK> hm… that's wierd - too many errors on all four drives?
[12:19] <RoyK> which version of ubuntu and zfs/zpool is this?
[12:20] <Jenshae> Yeah, it is weird, some boot ups, all listed as "ONLINE" without "DEGRADED" against them, sometimes all drives are "DEGRADED" and only yesterday did I have a single drive result.
[12:20] <RoyK> weird, even
[12:21] <RoyK> how are these connected? standard sata from onboard controllers or something more fancy?
[12:21] <Jenshae> Ubuntu 18 ... what is the -v / -version, etc to get the ZFS version?
[12:21] <Jenshae> Standard board SATA, yes.
[12:21] <RoyK> probably --version
[12:21] <RoyK> I haven't worked with zfs for a while
[12:22] <RoyK> *in* a while
[12:22] <RoyK> damn
[12:22]  * RoyK complains about "bad language day"
[12:23] <Jenshae> zfsutils-linux is already the newest version (0.7.5-1ubuntu16.9).
[12:23] <Jenshae> I find that I get temporary brain damage and my typing goes to hell if I deprive myself of sleep.
[12:24] <Jenshae> Like, 3 hours sleep on day 1, 14 hours on day 2, 3 hours on day 3 but on the fourth day, still typing like I am malfunctioning.
[12:25] <Jenshae> (Have had one of those weeks, hence the slow responses and "like" twice in a sentence."
[12:25] <Jenshae> ... and a " instead of a ) ...
[12:26] <RoyK> https://xkcd.com/859/
[12:27] <Jenshae> Are you trying to cast a hex on me?! :o
[12:28] <Jenshae> What are these about? " vol2:<0x241ec> " I could restore the other files but I don't know how to manually fix what ever that is.
[12:29] <RoyK> hehe
[12:29] <RoyK> does it allow you to start a scrub?
[12:53] <Jenshae> scan: scrub in progress since Wed Jul  8 13:52:36 2020
[12:53] <Jenshae> 	2.13G scanned out of 593G at 545M/s, 0h18m to go
[12:53] <Jenshae> 	0B repaired, 0.36% done
[12:53] <Jenshae> Yes.
[12:55] <Jenshae> I am not too concerned about the data. I have backups. I just don't want to throw away money on a motherboard or drives a set of drives without knowing where the fault is and I am getting tired of restoring data while this problem persists.
[13:13] <RoyK> Jenshae: I can understand - it's rare to get errors on all drives at the same time
[13:14] <RoyK> Jenshae: btw, can you pastebin smart data from the drives?
[13:16] <Jenshae> RoyK: Is there a terminal interface for SMART? I can't copy out the GUI results.
[13:17] <RoyK> smartctl -a /dev/sdX | pastebinit
[13:17] <RoyK> that is - wait
[13:17] <RoyK> for dev in sd[abcd] ; do echo [13:17] <RoyK> for instance
[13:18] <RoyK> replace [abcd] with the real device names
[13:18] <Jenshae> Hmm ... "sudo: smartctl: command not found". I have Gnome Disks installed.
[13:18] <RoyK> apt install smartmontools
[13:19] <Jenshae> "sudo apt install msartmontools" I am so msart
[13:19] <RoyK> hehehe
[13:19] <Jenshae> Oh no, I am infected! M$-Art ...
[13:21] <RoyK> this has nothing to do with M$ ;)
[13:21] <Jenshae> https://help.ubuntu.com/community/Smartmontools describes the three tests but doesn't say how to initiate one.
[13:22] <RoyK> smartctl -t short /dev/sdX
[13:23] <Jenshae> " smartctl --test=long /dev/sda /dev/sdb /dev/sdc /dev/sdbd " will work?
[13:23] <RoyK> smartctl -l selftest /dev/sdX (or smartctl -a /dev/sdX - it'll normally show progress as well)
[13:23] <RoyK> no, it doesn't take more than one argument, so better 'for dev in /dev/sd{a..d} ; do smartctl -t long $dev ; done
[13:24] <RoyK> '
[13:24] <RoyK> well, it takes several arguments, but only one drive, for some reason
[13:24] <Jenshae> " sudo smartctl --test=long /dev/sda && sudo smartctl --test=long /dev/sdb && sudo smartctl --test=long /dev/sdc && sudo smartctl --test=long /dev/sdd "
[13:24] <RoyK> btw, if you have /dev/sdbd, it means you have a *lot* of drives :D
[13:25] <Jenshae> *Flex*
[13:25] <RoyK> that also works, obviously, but I prefer a little for loop
[13:26] <RoyK> just remember that with &&, it will only run the next command (etc) if the first succeeds
[13:26] <Jenshae> "RoyK: btw, if you have /dev/sdbd, it means you have a *lot* of drives :D" https://www.youtube.com/watch?v=YFk2_5RkwlA
[13:27] <RoyK> hehe
[13:28] <RoyK> linux starts off with sda, then sdb and so on until it reaches sdz and then starts over with sdaa, sdab etc, so if you have sdbd, it means you should have at least 55 drives
[14:05] <hallyn> what, vimoutliner package was removed in focal?
[14:15] <Jenshae> https://pastebin.ubuntu.com/p/3ZZPDJCkxJ/ https://pastebin.ubuntu.com/p/9F9MRWT99c/ https://pastebin.ubuntu.com/p/3HhZtmGMrP/ https://pastebin.ubuntu.com/p/25zJRCVd8G/
[14:15] <Jenshae> RoyK: Results are in.
[14:17] <Jenshae> Extended tests, all passed, no failures shown.
[14:18] <RoyK> hm - those "unknown attributes" - I wonder if you can find out something more if you compile smartmontools from scratch
[14:18] <RoyK> no need to install it - just run it from the source dir
[14:18] <Jenshae> Got a cmd for that?
[14:19] <RoyK> Jenshae: https://github.com/smartmontools/smartmontools
[14:19] <RoyK> Jenshae: mkdir -p src/git
[14:19] <RoyK> cd src/git
[14:19] <RoyK> git clone https://github.com/smartmontools/smartmontools.git
[14:20] <RoyK> cd smartmontools/smartmontools/
[14:20] <RoyK> ./autogen.sh ; ./configure ; make
[14:22] <Jenshae> https://pastebin.ubuntu.com/p/3HBKrX9JQp/
[14:24] <Jenshae> nvm, step by step.
[14:24] <RoyK> you may need some packages like the build-essential metapackage
[14:24] <Jenshae> It wouldn't "sudo ./autogen.sh" and needed "sudo sh ./autogen.sh" after that then each one with sudo in front of it.
[14:24] <RoyK> no need for sudo there
[14:25] <Jenshae> It didn't work without it. Done now. Command to run the compiled one?
[14:25] <RoyK> unless you ran 'sudo mkdir -p src/git'
[14:26] <RoyK> ./smartctl
[14:26] <RoyK> add a sudo in front of that and use the same parameters as last time
[14:27] <RoyK> looks like 6.6 is the one installed on my machine (debian buster 10) while the one from git is 7.2, so probably some new stuff there
[14:27] <RoyK> just check smartctl --version and ./smartctl --version
[14:28]  * Jenshae crosses fingers
[14:29] <Jenshae> See you again in 30+ minutes
[14:29] <Jenshae> Do you work with servers or do it as a hobby?
[14:29] <RoyK> a bit of both :D
[14:30] <RoyK> I've worked with IT and servers since around 1996
[14:30]  * Jenshae waves a feather duster around >;P
[14:30] <Jenshae> Actually, I started work in IT in 1998. IT cafe after school and weekends.
[14:31] <Jenshae> I haven't managed to get through my Linux+ manual yet. >.>
[14:32] <Jenshae> Keep going a few chapters on, then realising I can't remember anything from a chapter or two back. Go back and re-read.
[14:33] <Jenshae> I also keep having a background thought of, "I am unlikely to use that. I could look it up."
[14:34] <Jenshae> I am getting to the point where I might save up for a System76 work station. Building and configuring my own ones ... I am starting to doubt myself or the industry as a whole.
[14:35] <RoyK> hehe
[14:35] <RoyK> I first started working "mosttime" with linux in 1998 and fulltime in 2000
[14:36] <RoyK> linux has luckily evolved a bit since the first slackware 2.1 I installed in 1994
[14:47] <RoyK> Jenshae: btw, you don't ned to run a new test - that's done by the drive itself. Just run ./smartctl -l selftest /dev/sdX
[15:42] <Muligan> hey fellas, I've a server setup w/ldap access.  What/how would you suggest I give a single user from ldap ssh/sudo access?
[15:55] <Jenshae> Muligan: Personally, I would create a group, assign permissions to it and work from there but I am not an expert.
[15:55] <Jenshae> RoyK: Better results? https://pastebin.ubuntu.com/p/Tq3NB965rq/
[15:57] <Jenshae> They all passed with nothing in the Failed column.
[15:59] <RoyK> Muligan: using visudo should do
[15:59] <Muligan> Jenshae, I would agree
[15:59] <Muligan> I've just limited visibility/knowledge into our ldap server(s)
[15:59]  * Muligan is an old school AD guy
[15:59] <Muligan> :\
[16:00] <Muligan> anyhow, I'll get it figured out
[16:00] <RoyK> Muligan: but check with getent passwd first to see if the users are visible there
[16:00] <RoyK> Jenshae: looks good. How is the scrub going?
[16:01] <Jenshae> When you get used to " sudo chown user:group /folder[and/or file] " then it can be quite handy.
[16:02] <Jenshae> "scan: scrub repaired 1.08M in 0h8m with 120 errors on Wed Jul  8 14:01:23 2020"
[16:02] <RoyK> damn
[16:03] <RoyK> can you pastebin zpool status -v ?
[16:03] <RoyK> perhaps censor the filenames, they are irrelevant to me
[16:03] <Jenshae> All the really weird ones with <hexcode> looking stuff is gone.
[16:05] <Jenshae> I don't think it could have repaired any of these files if the data was missing.
[16:06] <Jenshae> It has actually managed to reduce errors this time, instead of finding more.
[16:07] <Jenshae> Going to restore the files, run the scrub and see if I can clear down the log.
[16:18] <RoyK> Jenshae: it's good you have a backup. Now, restore those files and reboot the thing, preferably cutting the power suddenly or something to see if you can provoke the error that way
[16:18] <RoyK> or just reboot -f
[16:19] <RoyK> if it fails again, well, there's a bug or something
[16:19] <RoyK> I doubt this is a hardware error
[16:27] <RoyK> Jenshae: also, if you experience this in the future, make sure to check dmesg. you should be able to find issues in the logs too, as in /var/log/kern.log.something
[16:27] <Jenshae> Thank you. Will let you know how it goes.
[16:28] <RoyK> Jenshae: You could check the old kernel logs now to see if you find anything from last crash
[16:28] <RoyK> as in whence the errors originated
[16:31] <Rusty_Almighty> Is there a way using the installer's busybox implementation to get disk manufacturer?
[16:31] <Rusty_Almighty> and model?
[16:33] <RoyK> I don't think so
[16:33] <Jenshae> I just saw that smartctl provided that.
[16:33] <RoyK> better use a live boot
[16:33] <Jenshae> Inxi also gives you the model number
[16:34] <RoyK> you can find it with 'ls -l /dev/disk/by-id/' too, but that requires udev and I'm not sure if busybox installs have that
[16:34] <Jenshae> Royk: These are listed as the important errors in my logs - https://pastebin.ubuntu.com/p/rnJBHB8qcR/
[16:34] <RoyK> Jenshae: from which file was that?
[16:38] <Jenshae> Other: Lightdm sends the pam error, Hardware: is the amdgpu error, Applications: spice-vdagent send the redhat.spice one, Other: systemd sent the Postfix one.
[16:39] <Jenshae> Is there a ZFS filter I can apply to look for something related to my problem?
[16:42] <RoyK> again, from which file were these error messages_
[16:42] <RoyK> ?
[16:43] <Jenshae> I don't know, as usually looking at a GUI, it has Important, All, Applications, System, Security and Hardware down the side as category options.
[16:44] <RoyK> oh
[16:44] <RoyK> learn the terminal, dude ;)
[16:46] <Jenshae> So much in the logs. :(
[16:48] <RoyK> Jenshae: just pastebin output of 'ls /var/log' and I'll do my best to guide you :)
[17:24] <Jenshae> RoyK: Sent via IM. Could it be a hard drive driver problem since SMART didn't pick every thing up the first time?
[17:27] <Jenshae> Could it also be my DE not doing a polite shutdown because it isn't notifying the ZFS subsystem that it is shutting down?
[17:34] <RoyK> Jenshae: nothing really suspicious there
[17:34] <RoyK> some wee errors, but that's normal
[17:42] <teward> rbasak: thanks for handling that bug triage.  It's nice when we have defined triage cases that come up regularly isn't it xD
[17:54] <Jenshae> Is there a command for a very polite shutdown, such as, "zfs umount pool2 && poweroff"?
[17:56] <rbasak> teward: :)
[18:08] <RoyK> Jenshae: poweroff should do that for you anyway
[18:40] <Jenshae> RoyK: I don't seem to have all of these options, only zpool status? https://docs.joyent.com/private-cloud/troubleshooting/disk-replacement
[18:44] <RoyK> Jenshae: zfs should anyway be robust enough to allow you to pull the plug at any time without the whole raidz going down. I started working with zfs on solaris some 12 years ago and it really works. I've done lots of "oops" reboots and similar. I guess an upgrade to 20.04 may help this if there's a more recent version of zfs there
[18:45] <Jenshae> Is there a checklist for in place upgrades? I haven't had any success with them so far.
[18:47] <RoyK> not really a checklist - just remember to backup what's important. I've done it several times without major issues. Some hichups sometimes, but not really anything that breaks major stuff
[18:47] <RoyK> that's with do-release-upgrade
[18:47] <RoyK> with 20.04 today, you'll need -d with that since 20.04.1 isn't out yet
[19:42] <Jenshae> It would also be the first time I was on the cutting edge of Ubuntu, I normally wait 6+ months for them to iron out bugs after general release.
[19:42] <RoyK> hehe
[19:42] <Jenshae> The other work station is still rocking 14.04
[19:42] <RoyK> well, good luck
[19:42] <RoyK> that isn't supported anymore, though - hope it's not available on the net
[19:45] <Jenshae> https://ubuntu.com/about/release-cycle still gets security updates.
[19:45] <Jenshae> I should try a kernel update on it when this one is fixed.
[19:46] <RoyK> that's Extended Security Maintenance (ESM), which you have to pay for
[20:00] <Jenshae> Sorry, getting my versions confused. Getting tired. It is on 16 and this one is 18. Thought for a moment it was 14 and 16
[20:02] <Jenshae> ... would manual upgrading work? Kernel, then repositories?
[20:03] <sarnold> it's usually better to just run do-release-upgrade and let the upgrader sort it out
[20:03] <Jenshae> Piece by piece to see where it fails?
[20:03] <sarnold> but I'm not aware of the context of your zfs problems
[20:03] <Jenshae> I am not sure about my ZFS problems. I seem to get corrupted files every time I reboot or shutdown and boot back up again.
[20:05] <sarnold> ouch :/
[20:05] <Jenshae> What is this resilvering thing about? Would it help?
[20:06] <sarnold> 'resilvering' is when zfs detects errors on a drive and repairs the errors with data from other drives or copies
[20:07] <Jenshae> Is it automatic and therefore won't help?
[20:07] <sarnold> if you've got errors in files visible to userspace but eg zpool status doesn't report errors, then perhaps it's bad memory or something similar?
[20:07] <Jenshae> As it has tried it?
[20:07] <sarnold> you could kick off a scrub, zpool scrub, to look for errors
[20:07] <Jenshae> I have a boot drive and then a ZFS pool. System files should be safe.
[20:08] <Jenshae> Yup, about to go and delete the remaining results of "zpool scrub -v", saved the list then reboot.
[20:10] <Jenshae> Umm ... I am discovering single corrupt files in empty folders that should be full ...
[20:13] <sarnold> hmm, lone files in directories that used to be full *might* also be files in a *mountpoint*, not in zfs; normally zfs refuses to mount datasets if the mountpoint has any files or directories in it, which means it's pretty easy for *one* failed mount for whatever reason to lead to data being in multiple places ..
[20:14] <sarnold> but if mount output shows a zfs dataset mounted in that location, then it's very strange, and might reinforce my thought that you've got bad memory, or perhaps memory errors due to power supply problems, etc
[20:17] <Jenshae> It is a fairly simple setup, four drives, freshly built into a RAIDZ (RAID 5), mounted to user folder point and data dumped in there.
[20:18] <Jenshae> Same goes for the other work station.
[20:18] <RoyK> zfs can withstand an unexpected reboot quite well
[20:18] <RoyK> this must be either a bug or some hardware issue
[20:19] <Jenshae> Which and where is the question.
[20:19] <RoyK> with four drives tagged TOO MANY ERRORS at once, well, there's the controller that might be the problem
[20:19] <RoyK> who knows
[20:19] <RoyK> it may also be the memory, unless it's ECC
[20:20] <RoyK> (which reminds me that producing ECC costs a cent or two more than non-ECC-memory, but costs the double, since they want to skim off a lot for "server" stuff)
[20:20] <Jenshae> It is not. This is a fairly budget build at about £800
[20:21] <RoyK> Jenshae: so better visit http://memtest.org/ and do a memory test
[20:21] <RoyK> you just download an iso and put in on a usb drive or something and boot directly into it
[20:21] <RoyK> some distros even come with it preinstalled in grub
[20:22] <RoyK> seems ubuntu is one of them
[20:22] <Jenshae> Will do.
[20:23] <Jenshae> Will run it over night.
[20:23] <Jenshae> I really wish that terminal was smart enough to read a space and figure out if it was a file name.
[20:23] <RoyK> Jenshae: I know a guy that works with supermicro machines and he said it usually failed before test 4 or 5 and the early tests are rather quick
[20:24] <Jenshae> scp /folder/file name.something can be such a nuisance.
[20:24] <RoyK> 'scp /folder/file\ name' or just 'scp "/folder/file name"'
[20:26] <Jenshae> Being able to do a find and replace to change "/home/etc" into "rm /home/etc" then straight up copy and paste them would be handy
[20:27] <Jenshae> I think I am picking up a pattern, it looks like a particular main folder within the pool had a problem.
[20:27] <Jenshae> Maybe something went wrong when I copied it over.
[20:27] <Jenshae> Could scp be at fault?
[20:28] <RoyK> nah
[20:28] <Jenshae> Does it have a buffer limit? Do I need to move subfolders individually?
[20:28] <RoyK> it works in userspace - the filesystem is in kernelspace
[20:39] <Jenshae> Could the other workstation have put its disk to sleep or scp's permission timed out?
[20:40] <Jenshae> If we figure this out and I ever end up lecturing IT, I will try and recreate the problem to give them a tough assignment.
[21:22] <Jenshae> Thoughts and prayers, thoughts and prayers. Please send me them, they apparently all that is needed. https://pastebin.ubuntu.com/p/D9ttcHmFnk/
[21:43] <Jenshae> RoyK: Okay, shutdown, waited awhile, booted up, ran a scrub and still no errors. So, I am thinking it might be a write or incomplete copy problem?
[21:44] <RoyK> that would have been fixed in the journal
[21:44] <RoyK> and not affected the filesystem itself, just the file
[21:45] <RoyK> so something is fishy there
[21:45] <Jenshae> "RoyK: that would have been fixed in the journal" I need some more context.
[21:45] <Jenshae> Are there any I/O stress tests that will tell me if there is an error reading or writing with ZFS?
[21:46] <RoyK> the filesystem has a journal, like all modern filesystems. when something is written, a journal entry is made and synced. when the file is commited to disk, another journal entry is made and commited, saying "this block is ok"
[21:47] <RoyK> you have to go back to FAT32 or ext2 and similar stuff to find filesystems lacking a journal
[21:48] <Jenshae> If it is a write problem, as a work around, can scrub and rsync work together?
[21:49] <Jenshae> I won't attempt to restore tonight, do a very cold boot in the morning.
[21:49] <RoyK> if there's a write problem, it'll be reported in dmesg and the kernel log
[21:49] <RoyK> and if there are no silent errors, the error is elsewhere
[21:49] <RoyK> I'll put my money on the memory
[21:50] <Jenshae> Haven't had any random application crashes.
[21:51] <Jenshae> Everything to, from and using the boot drive has given me no problems.
[21:51] <RoyK> so try a memory test first - if it fails, clean the memory connectors, both the motherboard and the chips, with isopropylic alcohol (if you can find it somewhere in these coronean times) and run a new test
[21:51] <RoyK> using a brush to clean the motherboard sockets is usually the way to go
[21:52] <Jenshae> I use the boot drive for my personal stuff because it isn't shared.
[21:52] <RoyK> but check the memory first, so that you can see if there's something there
[21:52] <RoyK> but I'm tired - ttyl
[21:52] <Jenshae> Sleep well.
[21:52] <Jenshae> Thank you for all the help.
[21:52] <RoyK> thanks
[21:53] <Jenshae> I have been asking around this problem for months on and off, this has gotten me a lot further than anywhere or anyone else.
[21:54] <quadrathoch2> i guess, zfs for linux is still pretty new, so not alot of people know stuff Jenshae
[21:55] <Jenshae> Trying to give Roy-K more of an accolade than critise the community.
[21:56] <quadrathoch2> I never thought you would critize the community
[21:57] <Jenshae> Sorry, read it more as an excuse or defence than an explanation.
[22:06] <Jenshae> See you all tomorrow / Friday. Thanks again for the help. o7