Syslog to NTFS Kingston Card Reader Unassigned Device

Recommended Posts

I have a very special use case which will apply to very few unRAID users, but I will document it here in case it is useful to others.


Caveat:  Officially, unRAID does not support card readers as boot flash devices.  Don't tell Limetech, but I and others have been doing this for years. 😁  However, this solution involves using the card reader/flash card as an unassigned device.


By default, the Syslog must be written to an existing share on unRAID with the option to mirror it to the flash drive if you need to do some troubleshooting.  It is not recommended to have the syslog mirrored to the flash drive constantly as that could result in a lot of writes to the flash drive and you don't want unnecessary wear and tear on your boot flash.


If your server will not boot, writing to a share won't do you much good as you will not be able to access the syslog.


With some tweaking of the config files, you can get the syslog mirrored to an unassigned device.  This has already been documented.


What I want to accomplish:  Use the unused Micro SD card slot in my Kingston MobileLite G2 card reader as a location to which to write the syslog.  The SD card slot is currently used as the flash drive from which unRAID boots.  If I can do this, I never need to mirror the syslog to the boot flash drive.  NOTE: this card reader is no longer available (perhaps on eBay in addition to the link above) but it has a unique GUID and is USB 2.0 which is preferred for unRAID.  I also have the MobileLite G3 USB 3.0 version in another server and it works great.  Others do not have a unique GUID.


Keep in mind, this flash drive will count against the drive total in your unRAID license as it will be an Unassigned Device that is installed at the time the system boots.  It counts even if the Micoro SD slot in empty!  Might as well use it for something.


I have been using the Kingston reader as my boot flash drive for 10 years.  It's great as the GUID is associated with the reader, and I can swap flash cards to my heart's content to test different unRAID configurations. If the flash card fails, I just copy a backup onto a new flash card with no need to license a new flash drive.  The Micro SD slot has always been unused and has showed up as an unassigned device.


Steps to make this work:


  1.  Format a Micro SD card as an NTFS partition.  You could do FAT32 like with the boot drive as well.  I had a spare 32GB Micro SD card and I chose to format it as NTFS as this is supported by Unassigned devices and makes it directly readable in Windows as is FAT32.  If the server won't boot, I can just remove the card from the reader and view the syslog in Windows or post it to the forums for help.  Of course, you could also do this with the boot flash drive if you mirrored the syslog there, but I want to avoid that.
  2. Put the card in the reader and mount it as an Unassigned Device in unRAID (I named the card SYSLOG when formatted).  As seen below, the boot flash is in the SD slot and I now have the SYSLOG card in the Micro SD slot. Yes, the flash drive is public while I did this.image.png.6e5b89a240d90a475a8c79fd5b82f770.png
  3. Edit the Unassigned Device (UD) settings to enable automount and sharing:image.png.6e7ca8e6166705ad1d731f7553e60fe8.png
  4. Modify the syslog config files on the boot flash drive to point to the UD location:
    • Change the server_folder line in /boot/config/rsyslog.cfg to point to the UD location:
      • server_folder="/mnt/disks/SYSLOG/"
    • Change the $template remote variable to point to the UD location:
      • $template remote,"/mnt/disks/SYSLOG//syslog-%FROMHOST-IP%.log"
  5. If you want to preserve your existing syslog info, copy syslog-[ip address of server].log from the selected share to the UD location.
  6. Disable and then Enable the syslog server to restart it and force it to read the new config.  The local syslog folder should now show <custom>image.thumb.png.c4804241ae554cc5aa136558d2b7058d.png
  7. If you want to test that syslog is now writing to the new location, log out the GUI and log back in.  This should be recorded in the syslog in the UD location.


Celebrate your success in writing the syslog to a removable and replaceable UD location that does not hammer your boot flash drive and does not use an unRAID share.

Edited by Hoopster
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.