USB Mounting Issues (dataMine2 won't start)

Ive been using DataMine2 successfully for the last few months. Recently it stopped logging.
Rebooted many times
Reloaded many many times
Uninstalled DataMine2 and reinstalled many times

Current scenario:
After a successful install,
run dataMine2 and it prompts for a USB device,
select device and reload,
Initially status bar gets to mounting /dataMine device on /dev/sda1 and sticks there. If I run dataMine2 at this point it just sits with a rotating circle.

If I reload at this point, the status bar indicates
“dataMine2 graphing and logging plugin [63] Startup Lua failed”
Datamine2 still just sits there with the rotating circle.

I do not have a dataMine2 debug log as dataMine2 never starts

Running a mount command from putty does show /datamine mounted at /dev/sda1

Any help appreciated

Oh dear! Can you post a full LuaUPnP.log somewhere or send me a PM and arrange to get it across to me and I’ll take a look. Instructions on how to get hold of LuaUPnP.log without root access are posted further up this forum. If you log to a USB device have you run out of memory?

@Woodside - as you have root access could you also run top and post the output for the line with bin/LuaUPnP in. E.g.

top -n1 | grep /bin/LuaUPnP 

I suspect your Vera box has run out of memory. What other plug-in do you have installed?

LuaUPnp.log is [url=https://www.dropbox.com/s/acuqinf01hwy346/LuaUPnP.log?dl=0]Dropbox - File Deleted

Output of top -n1 | grep /bin/LuaUPnP

3302 2153 root S 79016 62% 9% /usr/bin/LuaUPnP
3416 4435 root S 1672 1% 0% grep /bin/LuaUPnP

Other Plugins:
CurrentCost EnviR Energy Monitor
Power Arithmetic
Alternate UI
Foscam IP Camera
ERGY Plugin
MiOS Update Utility
Wunderground Weather Plugin
D_SerialPortRoot1.xml

Thanks

@Woodside - thanks for that. The top command output looks fine, so no issues with RAM when you ran that command. Can you also share the output of [tt]df[/tt].

Having looked through your log file I notice that there are no references to dataMine2 at all in there, so it would be good if you could reinstall dataMine2 and try to access it, wait for 10 minutes (as the logs are written delayed), and post that log file to your dropbox.

That said, I did notice lots of references to lines like this…

06	03/23/16 23:13:24.457	Device_Variable::m_szValue_set device: 24 service: urn:futzle-com:serviceId:CurrentCostEnviR1 variable: e[35;1mMonthlyHistorye[0m was: 010=28.5;019=16.5...

Did you attempt to log any of these CurrentCost history variables (e.g. MonthlyHistory, TwoHourlyHistory, DailyHistory etc)? They are a worry for me because some of these variables are thousands of bytes long and I’m not sure if dataMine2 would cope well with them - it wouldn’t be possible to graph such a variable anyway. Can you locate the dataMine2 config file /dataMine/dataMineConfig.json and post it here for me to take a look if that’s the case?

thanks

Uninstalled DataMine2 and reinstalled, waited >10 mins.

root@MiOS_30104840:/dataMine# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/root 4608 4608 0 100% /rom tmpfs 63728 1852 61876 3% /tmp tmpfs 512 0 512 0% /dev /dev/mtdblock7 11264 4572 6692 41% /overlay overlayfs:/overlay 11264 4572 6692 41% / /dev/mtdblock8 4480 4480 0 100% /mios /dev/sda1 7848900 31476 7817424 0% /dataMine /dev/sdb1 7848900 31476 7817424 0% /dataMine

DataMine2 now starts and repeatedly asks for confirmation of the USB stick to use. I select the correct one, reload, but it sticks in a loop.

I appear to have two dataMine directories mounted

root@MiOS_30104840:/dataMine# mount rootfs on / type rootfs (rw) /dev/root on /rom type squashfs (ro,relatime) proc on /proc type proc (rw,noatime) sysfs on /sys type sysfs (rw,noatime) tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime) tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755) devpts on /dev/pts type devpts (rw,noatime,mode=600) /dev/mtdblock7 on /overlay type jffs2 (rw,noatime) overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay) debugfs on /sys/kernel/debug type debugfs (rw,relatime) /dev/mtdblock8 on /mios type squashfs (ro,relatime) none on /proc/bus/usb type usbfs (rw,relatime) /dev/sda1 on /dataMine type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro) /dev/sdb1 on /dataMine type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

root@MiOS_30104840:/dataMine# blkid /dev/sdb1: LABEL="8GB STICK" UUID="37D1-7387"

[code]root@MiOS_30104840:/dataMine# fdisk

Disk /dev/mtdblock0: 0 MB, 524288 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/mtdblock0 doesn’t contain a valid partition table

Disk /dev/sdb: 8054 MB, 8054112256 bytes
1 heads, 62 sectors/track, 253720 cylinders
Units = cylinders of 62 * 512 = 31744 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 2 253721 7865284 c Win95 FAT32 (LBA)
Partition 1 does not end on cylinder boundary
[/code]

I may have turned logging on for one of those history variables several weeks ago, but only for a few days. As you say, there was no useful data. It has worked since I turned that off.

/dataMine/dataMineConfig.json is here [url=https://www.dropbox.com/s/m3m3dqfp7abreku/dataMineConfig.json?dl=0]Dropbox - dataMineConfig.json - Simplify your life
Note the modified date is 23/3/16 although I reinstalled dataMine2 today (25/3/16)

Updated LuaUPnP.log is here [url=https://www.dropbox.com/s/acuqinf01hwy346/LuaUPnP.log?dl=0]Dropbox - File Deleted

Thanks

@Woodside - thanks for all that.

Firstly I’m not sure why or how your dataMine directory is mounted to two different locations simultaneously. This is probably why it’s stuck in a loop asking for the USB stick. Can you try unmounting /dev/sda1? It’s probably advisable to hard reboot your box as well.

Your dataMineConfig.json file is unfortunately corrupted which won’t be helping matters - if you open it up you can see that it just stops part way through a line. If you check the directory, there should be back-up copies in there, you can either try renaming a back-up to be the main config file or you could just delete dataMineConfig.json and upon restarting, dataMine will find the most recent back-up and use it instead. Either way your existing dataMineConfig.json will be causing trouble and needs to go.

Once again your LuaUPnP.log doesn’t contain any references to dataMine. In fact the entire log only spans 24 minutes of activity. I suspect that dataMine got into stress when started (due to the corrupt dataMineConfig) and started filling the logs with junk - this caused the log file to grow rapidly, exceed it’s maximum allowed size and get rotated out.

Could you try the 2 suggestions above and get back to us with the outcome? I’m keen to know how you get on.

your dataMine directory is mounted to two different locations simultaneously

I’m still using the old datamine and this occurs occasionally. For some reason unknown, the stick randomly swaps around between/dev/sda1 and /dev/sdb1. I’ve never been able to catch the log when the swap occurs but a Luup engine restart doesn’t appear to be causing it. I first notice it when the log file keeps saying it can’t write to one of the datamine database files and the graphs have flat lined. I should put some code in there to alert me when it happens.

This indicates where the stick is “truely” mounted:

root@MiOS_30104840:/dataMine# blkid /dev/sdb1: LABEL="8GB STICK" UUID="37D1-7387

I use this manual process to fix:

  1. find to where the stick is mounted by identifying by its UUID
  2. unmount the other false point like so: umount /dev/sdx1 where x = a or b (note the missing ‘n’ in umount)
  3. make sure the dataMine variable “mountLocation” is the same as seen by the blkid command. If not change it so it is, which generally needs to be done
  4. restart the Luup engine.

I was going to change my datamine code, so it just mounted the /dataMine directory to wherever the command blkid said the stick with the correct UUID was mounted (as seen in the variable “SetMountUUID”), whether that be /dev/sda1 or /dev/sdb1 and ignore “mountLocation”. I would possibly also do this if a write to file failed but that’s a hack.H owever I’ve not gotten around to trying this and my datamine has been fine of late - go figure. Ultimately you can’t rely on the stick being on /dev/sda1 or /dev/sdb1 and the code should only rely on the UUID when mounting.

Couldn’t unmount /dev/sda1, returned device busy error.

Renamed dataMineConfig.json to dataMineConfig_corrupt.json and hard rebooted the box

Following boot I only had one device mounted to dataMine and the LuaUPnP.log did have references to dataMine.

DataMine2 started successfully :slight_smile:

What I do not understand is that the /dataMine directory is empty?

root@MiOS_30104840:/dataMine# ls -a . .. root@MiOS_30104840:/dataMine#

So all my graphs are flat lines and I cannot see the new dataMineConfig.json file. How can dataMine2 start with an empty /dataMine directory?

Thanks

So this info is easier to find, I’d like to put it in its own thread…
@akbooer - can you please move post 126 in this thread onward to a new thread called “dataMine2 won’t start”

@Woodside - good news that dataMine2 now starts :slight_smile:
In terms of why the dataMine directory is empty, let’s establish exactly where your database files are. Can you unplug your USB stick and put it into another machine and check that it actually has the files on it? It’s possible you’ve been writing to your Vera’s internal memory without realising (I was doing this for a while when I first started out). If there are no files on the USB stick then (with the USB stick unplugged) use the find command to locate the dataMine directory:

find / -name "database"

you seem to know your way around Linux, but I’ve spelled it out for anyone who reads this later. If the files under the database directory are on the Vera drive, copy them to the USB stick via a utility such as WinSCP. The top level directory needs to have the database directory and your dataMineConfig.json as a minimum. If they are on the stick then we need to work out why the stick hasn’t mounted properly. Make sure you have SetManualMount set to 0 in your advanced settings for the plug-in and that SetMountUUID is either blank or the correct UUID for your USB stick and SetDataDirectory is /dataMine/.

dataMine2 is quite capable of starting without anything in the dataMine directory (which is the default when you first install). If it doesn’t find anything it will simply create a blank config file and read your devices from your Vera config.

Let us know how you get on finding your database files and successfully mounting the USB stick.

@a-lurker - You should upgrade to dataMine2!

My Vera box only has one USB port so I don’t have the same issue. However, I have another Linux box for my home media set-up and I have seen the USB ports moving around on that, but only on a restart of the kernel. This is a documented Linux kernel issue. On that setup I got to fix the locations of the USB ports by creating a config file in modprobe.d. This is way outside the scope of this forum and I have no idea if the same principle can be used on a Vera box.

My Vera box restarts at 2.00am every day so this is likely when the USB locations will potentially change.

The process for mounting USBs in dataMine1 and dataMine2 is very similar (although there is a bug in dataMine1 which I’ve fixed in dataMine2 and I’ve added improved logging around USB mounting issues). It follows a similar sequence as you describe with finding the UUID using the blkid command, so it shouldn’t matter that the device numbers move around assuming they only move on a kernel restart which would also mean a Lua restart and a dataMine restart.

For this to work though you must have SetManualMount set to 0 and SetMountPoint blank in the advanced settings and SetMountUUID should either be blank (in which case you will be prompted to choose it in the UI) or the correct value for your stick.

There shouldn’t be any need to hack the dataMine code yourself to solve this. If you are still having trouble with your settings as above, I’d ask that you uninstall dataMine1, install dataMine2 and post a debug output after a Lua restart.

Checking this morning, still an empty /dataMine directory and blank graphs.

Removed USB stick and inserted into Windows machine. Looks like the correct files were on the stick, extract below:

14/03/2016 16:34 <DIR> database 26/03/2016 02:16 9,339 dataMineConfig.json 12/01/2016 17:06 13,948 Notifications [R2346].txt 16/03/2016 11:46 9,402 dataMineConfig.json.Wed Mar 16 12-07-11 2016.backup 17/03/2016 01:18 19,847 Notifications [R2410].txt 23/03/2016 17:27 0 more 12/01/2016 17:26 26,215 Notifications [R2347].txt 18/02/2016 00:05 20,216 Notifications [R2406].txt 16/03/2016 12:07 9,401 dataMineConfig.json.Wed Mar 16 12-33-47 2016.backup 20/03/2016 09:15 9,381 dataMineConfig.json.Mon Mar 21 17-24-39 2016.backup 26/03/2016 00:12 0 dataMineConfig_corrupt.json 03/03/2016 00:26 20,630 Notifications [R2408].txt 10/03/2016 01:07 20,106 Notifications [R2409].txt 12/01/2016 17:47 28,311 Notifications [R2348].txt 16/03/2016 12:33 9,403 dataMineConfig.json.Wed Mar 16 12-37-46 2016.backup 21/03/2016 17:24 9,385 dataMineConfig.json.Wed Mar 23 17-20-37 2016.backup 26/03/2016 00:16 9,384 dataMineConfig.json.Sat Mar 26 02-00-53 2016.backup 26/03/2016 02:16 6,279 Notifications [R2412].txt 11/02/2016 00:33 20,083 Notifications [R2405].txt 14/03/2016 15:47 8,917 dataMineConfig.json.Mon Mar 14 16-34-10 2016.backup 12/01/2016 18:09 23,715 Notifications [R2349].txt 14/03/2016 16:34 9,278 dataMineConfig.json.Mon Mar 14 16-34-20 2016.backup 15/03/2016 23:37 9,290 dataMineConfig.json.Wed Mar 16 02-01-09 2016.backup 26/03/2016 02:06 21,241 Notifications [R2411].txt 20/03/2016 08:59 9,398 dataMineConfig.json.Sun Mar 20 09-10-54 2016.backup 12/01/2016 18:19 13,965 Notifications [R2350].txt 12/01/2016 18:30 14,630 Notifications [R2351].txt 12/01/2016 18:40 14,630 Notifications [R2352].txt

With the stick still removed, on vera:

root@MiOS_30104840:/dataMine# find / -name "database" /overlay/dataMine/database root@MiOS_30104840:/dataMine#

root@MiOS_30104840:/overlay/dataMine# ls -lh | cut -f 6- -d ' ' root root 13.6K Mar 21 17:48 Notifications [R2346].txt root root 25.6K Mar 21 18:09 Notifications [R2347].txt root root 27.6K Mar 21 18:31 Notifications [R2348].txt root root 23.2K Mar 21 18:52 Notifications [R2349].txt root root 13.6K Mar 21 19:02 Notifications [R2350].txt root root 14.3K Mar 21 19:12 Notifications [R2351].txt root root 14.3K Mar 21 19:22 Notifications [R2352].txt root root 13.6K Mar 21 19:32 Notifications [R2353].txt root root 17.3K Mar 21 19:53 Notifications [R2354].txt root root 12.4K Mar 21 20:03 Notifications [R2355].txt root root 5.6K Mar 21 20:03 Notifications [R2358].txt root root 16.3K Mar 21 20:13 Notifications [R2359].txt root root 16.0K Mar 21 20:34 Notifications [R2360].txt root root 15.6K Mar 21 20:44 Notifications [R2361].txt root root 15.9K Mar 21 20:54 Notifications [R2362].txt root root 15.8K Mar 21 21:04 Notifications [R2363].txt root root 15.1K Mar 21 21:14 Notifications [R2364].txt root root 15.8K Mar 21 21:35 Notifications [R2365].txt root root 16.0K Mar 21 21:45 Notifications [R2366].txt root root 12.5K Mar 21 21:55 Notifications [R2367].txt root root 7.8K Mar 21 21:55 Notifications [R2368].txt root root 10.2K Mar 21 22:05 Notifications [R2369].txt root root 10.8K Mar 21 22:15 Notifications [R2370].txt root root 4.8K Mar 21 22:15 Notifications [R2371].txt root root 11.0K Mar 21 22:26 Notifications [R2372].txt root root 9.2K Mar 21 22:36 Notifications [R2373].txt root root 1.0K Mar 21 22:36 Notifications [R2374].txt root root 11.0K Mar 21 22:46 Notifications [R2375].txt root root 15.0K Mar 21 22:56 Notifications [R2376].txt root root 13.9K Mar 21 23:06 Notifications [R2377].txt root root 15.1K Mar 21 23:17 Notifications [R2378].txt root root 18.1K Mar 21 23:37 Notifications [R2379].txt root root 19.5K Mar 21 23:47 Notifications [R2380].txt root root 17.3K Mar 21 23:57 Notifications [R2381].txt root root 18.9K Mar 22 00:18 Notifications [R2382].txt root root 18.8K Mar 22 00:28 Notifications [R2383].txt root root 19.0K Mar 22 00:48 Notifications [R2384].txt root root 17.4K Mar 22 00:58 Notifications [R2385].txt root root 17.4K Mar 22 01:09 Notifications [R2386].txt root root 13.4K Mar 22 01:29 Notifications [R2387].txt root root 13.4K Mar 22 01:39 Notifications [R2388].txt root root 15.7K Mar 22 01:49 Notifications [R2389].txt root root 17.7K Mar 22 01:59 Notifications [R2390].txt root root 20.7K Mar 22 02:20 Notifications [R2391].txt root root 21.2K Mar 22 02:30 Notifications [R2392].txt root root 21.3K Mar 22 02:50 Notifications [R2393].txt root root 20.9K Mar 22 03:11 Notifications [R2394].txt root root 20.1K Mar 22 03:21 Notifications [R2395].txt root root 19.7K Mar 22 03:41 Notifications [R2396].txt root root 18.6K Mar 22 03:51 Notifications [R2397].txt root root 18.8K Mar 22 04:02 Notifications [R2398].txt root root 18.5K Mar 22 04:22 Notifications [R2399].txt root root 18.5K Mar 22 04:32 Notifications [R2400].txt root root 19.9K Mar 22 04:52 Notifications [R2401].txt root root 19.5K Mar 22 05:03 Notifications [R2402].txt root root 17.8K Mar 22 05:23 Notifications [R2403].txt root root 19.5K Mar 22 05:33 Notifications [R2404].txt root root 19.6K Mar 22 05:53 Notifications [R2405].txt root root 19.7K Mar 22 06:04 Notifications [R2406].txt root root 21.1K Mar 22 06:24 Notifications [R2407].txt root root 20.1K Mar 22 06:34 Notifications [R2408].txt root root 19.6K Mar 22 06:55 Notifications [R2409].txt root root 19.4K Mar 22 07:05 Notifications [R2410].txt root root 19.8K Mar 23 16:04 Notifications [R2411].txt root root 587 Mar 23 18:00 dataMineConfig.json root root 151 Mar 21 17:59 dataMineConfig.json.Mon Mar 21 18-06-58 2016.backup root root 530 Mar 21 18:09 dataMineConfig.json.Mon Mar 21 18-16-29 2016.backup root root 587 Mar 23 15:15 dataMineConfig.json.Wed Mar 23 15-59-11 2016.backup root root 588 Mar 23 16:04 dataMineConfig.json.Wed Mar 23 16-33-23 2016.backup root root 587 Mar 23 16:33 dataMineConfig.json.Wed Mar 23 17-09-13 2016.backup root root 587 Mar 23 17:09 dataMineConfig.json.Wed Mar 23 17-40-28 2016.backup root root 587 Mar 23 17:40 dataMineConfig.json.Wed Mar 23 17-41-05 2016.backup root root 587 Mar 23 17:41 dataMineConfig.json.Wed Mar 23 17-59-22 2016.backup root root 587 Mar 23 17:59 dataMineConfig.json.Wed Mar 23 18-00-33 2016.backup root root 0 Mar 21 18:06 database root root 138 Mar 23 06:02 sunriseSunset.txt root@MiOS_30104840:/overlay/dataMine#

Note the older dates in the /overlay files

Put the stick back in vera

root@MiOS_30104840:/dataMine# blkid /dev/sda1: LABEL="8GB STICK" UUID="37D1-7387"

root@MiOS_30104840:/dataMine# mount rootfs on / type rootfs (rw) /dev/root on /rom type squashfs (ro,relatime) proc on /proc type proc (rw,noatime) sysfs on /sys type sysfs (rw,noatime) tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime) tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755) devpts on /dev/pts type devpts (rw,noatime,mode=600) /dev/mtdblock7 on /overlay type jffs2 (rw,noatime) overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay) debugfs on /sys/kernel/debug type debugfs (rw,relatime) /dev/mtdblock8 on /mios type squashfs (ro,relatime) none on /proc/bus/usb type usbfs (rw,relatime) /dev/sdb1 on /dataMine type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

The stick was only mounted once on sdb1. Restarted dataMine2 and it correctly had /dev/sdb1 as mountLocation

However, /dataMine directory was still empty

root@MiOS_30104840:/dataMine# ls -a . .. root@MiOS_30104840:/dataMine#

@Woodside - most curious! I suspect that the file system on the USB has become damaged in such a way as to be still readable from Windows but not from within Linux. I’d recommend that you put the stick back into your Windows box and back-up all the files, then put it back into Vera and reformat it (be careful!)

mkfs.vfat /dev/sdb1

You can then copy the files back again either via WinSCP or plugging it back into your Windows machine. You may also wish to move the files you found in the overlay folder onto the stick.

I see that you are making use of the notifications feature but do you really need to? My experience with notifications is that the MCV servers are quite slow to respond and it ties Vera up waiting for a response making graphs slow to produce. If you don’t really need them, set the advanced plug-in variable SetEventsEnable to 0.

Let us know how you get on.

Backed up the USB stick files reformatted with mkfs.vfat /dev/sdb1 and copied the files back to the USB stick.

When inserted back into vera, blkid showed a new UUID and a single mount point at /dev/sdb1.

Reloaded vera and restarted datamine2.

dataMine directory still showing as empty via Putty and WinSCP

After several reloads, a hard reboot, several dataMine restarts still nothing showing in dataMine directory and I now have /dataMine mounted twice

root@MiOS_30104840:/dataMine# mount rootfs on / type rootfs (rw) /dev/root on /rom type squashfs (ro,relatime) proc on /proc type proc (rw,noatime) sysfs on /sys type sysfs (rw,noatime) tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime) tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755) devpts on /dev/pts type devpts (rw,noatime,mode=600) /dev/mtdblock7 on /overlay type jffs2 (rw,noatime) overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay) debugfs on /sys/kernel/debug type debugfs (rw,relatime) /dev/mtdblock8 on /mios type squashfs (ro,relatime) none on /proc/bus/usb type usbfs (rw,relatime) /dev/sda1 on /dataMine type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro) /dev/sdc1 on /dataMine type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro) root@MiOS_30104840:/dataMine#

Datamine2 plugin is showing /dev/sda1 and the correct UUID of 56F7-C7A5

Regarding the notifications. I haven’t knowingly turned these on and the value of SetEventsEnable is 0.

LuaUPnP.log is here [url=https://www.dropbox.com/s/acuqinf01hwy346/LuaUPnP.log?dl=0]Dropbox - File Deleted

Thanks

@Woodside - Here is what I can see in the logs:

12:56 dataMine2 starts and correctly mounts dev/sda1 to /dataMine/
12:56 config file is read and 21 variables enabled for logging
12:57 old back file “/dataMine/dataMineConfig.json.Mon Mar 14 16-34-10 2016.backup” successfully deleted
12:57 first of many Error: ‘/dataMine/database/19/raw/2412.txt: No such file or directory’

12:59 Lua Restarted
13:00 dataMine2 starts and reports that dev/sda1 is mounted to /dataMine/
13:00 dataMine2 reports that USB is now on dev/sdb1 and attempts to unmount dev/sda1 (nothing in log to say whether unmount was successful but it looks like it wasn’t)
13:00 dev/sdb1 successfully mounted to /dataMine/
13:00 internal check detects that dev/sda1 is still mounted and sets ERROR: Startup state is ‘uninitialised’!
13:00 empty config file is created and start up completes
13:00 attempt to check for free disk space on USB fails

13:00 Lua Restarted
13:01 dataMine2 reports that USB is now on dev/sdc1 and attempts to unmount dev/sda1 again
13:01 dev/sdc1 successfully mounted to /dataMine/
13:01 internal mount check again fails and sets ERROR: Startup state is ‘uninitialised’!
13:01 empty config file is created and start up completes

So it looks like it starts off all good until it can’t write to the database files. Can you check the database directory on your USB and make sure the numbered sub-directories exist? (e.g. 1,2,3,8,9,16,19 etc…), if not then your config file doesn’t match your database files and you either need to find another config file that does or find some more database files. Interestingly, it seems that dataMine2 has no trouble reading any of the config on the USB stick so that all works fine.

As for the USB stick jumping around device numbers, this can happen so I’m not so worried about it. What is not great is that attempts to unmount it fail once it’s moved and then it gets remounted and it can’t read the config. I’m not sure I can help with this as it’s not really my area.

Can you report back on whether you have the correct numbered sub-directories under the database directory? Also, if you could do some investigation into whether you can successfully unmount your USB from an old device when it is mounted to 2 devices at the same time that would be good.

@ConstantSphere

I have done some investigations since my last post around the multiple mount points of /dataMine.

As you have noted, dataMine seems to start correctly and prompt for confirmation of the UUID. I checked at this point and there was only one mount point. Following selection of the USB stick, dataMine prompts for a Reload of LuuP.

It is following the Reload that the second mount point appears. Thereafter, dataMine cannot read any of its files as there are two mount points specified.

Another Reload incremented the second mount point to /dev/sdc1. Previously the second mount point had been /dev/sdb1.

/dev/sda1 stayed mounted throughout.

I tried to unmount with umount -f /dev/sbc1
but that kept giving ‘resource busy error’

The only way I could unmount was using umount -l /dev/sdc1
I also unmounted /dev/sda1 and /dataMine

Unfortunately I cannot remember how many times I did the above restarted dataMine and Reloaded LuuP.

Eventually, I did get to the point where dataMine accepted the new UUID and I only had one mount point for /dataMine.

At this point dataMine was reading all the data on the stick and producing graphs, including the data before all this started. There was obviously no data collected whilst this was going on (so a flat line on the graphs) but otherwise all the data is intact.

Unfortunately, I have no confidence it wont happen again, as I lost track of exactly what I did at the end to sort it out :frowning:

How can I stop the Notification files from being produced, given that SetEventsEnable is already set to 0?

Thanks

@Woodside - great investigation work. It looks like I need to add the -l switch to the umount code and that should help. I’ll take a look at that and the events piece, but I’ll not be able to get to it for a couple of days.

@Woodside - I’ve created a patch release version 1.912b with a few things in that might help:

  1. Added the -l switch to the umount command when dataMine detects that the USB stick is attached to a different device. This is intended to fix the multiple mounts issue.
  2. Fixed a longstanding bug whereby the SetEventsEnable was not being checked properly which should stop Notification files being generated unnecessarily
  3. Fixed a bug introduced in the device cloning feature of 1.911 that broke monitoring of devices with device numbers > 1,000. Now cloned devices have devices numbers > 1,000,000.

However… I am away from home at the moment and have not been able to test the code, so I’d appreciate it if you could test it out for me. Many thanks.

I set this up successfully on a system with a Vera Lite. When I tried again on a system with a Vera Edge there is no USB drive in the initial DM2 dialog. Both systems are using UI7. I understand that there was a problem before a recent firmware update but it says I have the latest (1.7.1707). Tried two different flash drives & Fat32/ext3. Any idea what might be going on?

Hi @fullmoonguru - I’ve heard of USB issues on the Vera Edge too - see @Thomasss post 74 in this thread. Could you please post a dataMine debug report (see earlier posts in this thread if you are unsure how to get one) and I can take a look. Welcome!