MySQL server has gone away – how to get it back

Has MySQL/MariaDB server ever run away from you? If it hasn’t, you’re lucky or you’re likely to use PostgreSQL instead. Today I’m trying to restore a database from backup (database dump) onto a new MariaDB server. This is what happened: # mysql -u db_user -p db4 < db4-4.4.2_02-08-2018.sql Enter password: ERROR 2006 (HY000) at line 354: MySQL server has gone away The database size is 1.7G, and this should not surprised a database administrator. But it did surprise me because: firstly I’m not a db admin, and secondly I had this issue before just a few weeks ago. So here is a blog post to make sure I won’t forget it for the 3rd time. Basically, I just need to increase the max_allowed_packet size from the default 16MB to something bigger. I chose 128MB. ...

February 8, 2018 · 1 min · 182 words · kenno

FreeBSD Recover GTP Table

Recently one of my servers that runs FreeBSD 11.1 keeps hanging on boot. Usually, the 2nd hard reboot will fix it. The root file system on this server is using ZFS and the ZFS pool report it as healthy. nas:~ # zpool status [136/462] pool: zroot state: ONLINE scan: scrub repaired 0 in 0h0m with 0 errors on Tue Jan 23 23:54:42 2018 config: NAME STATE READ WRITE CKSUM zroot ONLINE 0 0 0 gpt/zfs0 ONLINE 0 0 0 errors: No known data errors So I’ve been reluctant to do anything about it. Until tonight, when I accidentally list the partition of that drive (ada4): ...

February 3, 2018 · 2 min · 332 words · kenno

Blacklisting Local Disk from Multipath

In my previous post, I wrote about my quest to identify a disk presented by the Dell server itself. At the end of the post, I mentioned that I should be able to resume with creating a LVM volume on the new disk. LVM stands for Logical Volume Management. There is a good tutorial available at this page if you’re interested in – How To Use LVM To Manage Storage Devices on Ubuntu 16.04. ...

January 28, 2018 · 3 min · 474 words · kenno

How to identify a disk on a Dell server

I have a Dell R730 server at work, which connects to a back-end storage with optical fiber cables. In addition, the server itself also has 6 disks. Two of the disks have already been configured as RAID1 and has the operating system installed on it. Today, I want to configure the remaining 4 disks as RAID10, and setup logical volume on it. The first part was easy. All I had to do was to login to the Integrated Dell Remote Access Controller (iDRAC), and create a new Virtual Disk from the 4 physical disks. The second part is a bit tricky. As the server is connected to the stroage server, it sees a lot of disks. ...

January 24, 2018 · 4 min · 765 words · kenno

How to find the motherboard model on Windows 10

To find the motherboard model number on Windows (10), run cmd, and type: C:\Users\kenno>wmic baseboard get product,Manufacturer,version,serialnumber Manufacturer Product SerialNumber Version Gigabyte Technology Co., Ltd. Z170N-Gaming 5 To be filled by O.E.M. x.x Ref & credit: How to Find Computer and Motherboard Model Serial Number on Windows 10

January 14, 2018 · 1 min · 48 words · kenno