Check for unmounted drive - any OS - when the Channels database and recordings are located there

Ive spent the past few days on my first ubuntu install and have channels dvr nostly up and running on the

Ive run into an issue discussed on the thread. Its not specific to the ATOPNUC, but rather linux.

In my case thanks to several posts by @kelson at the last minute before traveling to where this installation will reside in another state, i installed a spare internal SSD and pointed the channels directories to a DVR folder on this drive.

An issue that was pointed out is that when rebooting headless this second drive doesnt mount.

Is there a way to have the channels dvr server, which runs automatically when booting, to have it detect an unmounted drive and mount it? This is especially important as the whole database and recordings are located there.

For now i need to VNC in and mount the drive…not a terrible big deal, but an annoyance.

As an aside - what is the terminal command line syntax to reboot the dvr server over SSH - not the machine, just channels dvr.
Or from the web admin interface.

Mounting is handled with either fstab, or .mount and .automount units.

(Internally, systemd uses the .mount units; at startup it parses the fstab file to generate appropriate .mount and .automount units. However, editing a single line in the fstab is FAR easier than crafting unit files.)

I believe you want systemctl restart channels-dvr.

1 Like

This is not a channels problem automounting a drive in linux is not that hard there is documentation all over the internet.

I didnt say it was a channels dvr problem. It was a feature request.

Im a linux novice. If it wasnt for @kelson pointing out in a very kind manner the auto mount issue running headless, i would have know way to know what was going on. The gui through the disk manager shows the drive with auto mount enabled.

At the very least, as a feature request, the error message when playing a recording from channels saying “file not found”, could be expanded to say something like “file not found - check if dvr disk is mounted” , especially if the entire channels database is on the unmounted drive! And especially if this is such a common linux issue.

I appreciate the links you provided me, but they were a little intimidating for a linux novice to implement a fix at the last minute. I have a 99.9% working DVR machine packed in a suitcase traveling with me on a plane, and at least for now i didnt have the time to implement the long term fix. Ill have to do it remotely later via tailscale and SSH or vnc.

Well this is interesting, if i can get into terminal later and do this. Even a novice can edit a single line - lol.

What i didnt want to do is screw up the drive in any way, because ive already got channels dvr working and pointing to a dvr folder with a working database there. And the gui interface was showing auto mount enabled, which is confusing to someone new to linux. I didnt even have time to test booting the machine non headless to see if the auto mount was working.

No rush, but can you point out specifically what line in the fstab needs to be modified, and how to do it. I couldnt decipher the links @Edwin_Perez gave me in the other thread - at least on first glance while packing the machine in a suitcase.

In the meantime for others following ive got this loaded on my ipad and ill read on the plane

Read the linked article. It will vary depending upon your particular system.

If you want to manage your system, you need to read the documentation. If you don't read and learn, then you're just going to keep running into issues. Relying on other people to provide you with copypasta answers is going to do nothing but introduce bigger problems down the road.

(If you didn't want to administer a Linux server, why did you install your DVR on one?)

“If you didn't want to administer a Linux server, why did you install your DVR on one?”

It was an interesting cheap linux pc for $89 bucks and i saw the ATOPNUC thread.

The channels community, has been a tremendous blessing and distraction for me as I happen to be permanently disabled and experiencing excruciating chronic pain most of the time - sometimes so intense that it is hard to think.

Overall it was the right decision to administer this on a linux machine because within 2 days Im way much less of a novice. Secondly, through the support of the amazing forum, I got over my fear of trying out and unknown os.

I didnt want to go with another mac - even a used one, and i didnt want to deal with windows. I have a pi hole setup running here at home and i havent had to touch it in years other than running occasional updates.

So i bought the bullet knowing there would be a learning curve. It was the right choice.

My mistake was deciding at the last minute 2 days before my trip to start to learn ubunto. Lol

Reading through these threads I'm a bit confused as to why if you want headless are you messing with Ubuntu desktop? There is a headless version of Ubuntu, its called server. You say you are a novice but you have gone through quite a bit to get desktop to function like server. Cli can be intimidating but Google is your friend. I was also a Linux novice but with the help of Google I leterally had every question answered.

Hindsight is 20/20

You shouldn't be confused. The internet marketing has led people to believe that Ubuntu = Linux = Server. They don't care that Ubuntu (of any flavor) is spear-heading snaps, which are some sorry bastardization of Docker and AppImage joined together, when there are superior solutions to all three issues addressed by those technologies.

Research and knowledge beforehand would have saved @mnwxman132 many hours of troubleshooting.

@mnwxman132 Don't discount the articles on the Arch wiki. While Arch's approach to Linux is quite different than Canonical's, they host an immense wealth of knowledge that can be readily applied to any OS based upon Linux. (Think of Arch's wiki like Wikipedia for Linux. Not always perfect, but awesome for background and a starting point for real research.)

2 Likes

Well heres the main issue folks.

Its less about the actual fix and me figuring the fix out , and whether this is a headless machine or not, or for that matter even the OS.

The actual thing I was referring to in the feature request is that there is a possibility the someone could do what I did and install there whole database on a secondary drive. (This could be internal or external)

1: During normal operation if that drive unmounts somehow, there is no way to really know that happens unless you are actively using the machine. Ive got a mac mini in my living room, with high sierra in it. Most of the time i never look go to the desktop. Ever bump a usb cable and accidentally unmount a drive?

So the first possible product improvement, and i dont know if this is even possible, would be to have a periodic database watchdog, looking for this case, and alert the end user that there is an unmounted drive. This way if grandma bumps a usb cable when she goes to play a recording, she could call her grandson and say what as this message that says recording not found check if storage drive is mounted

2: the second case is during bootup, either headless or not doesnt matter. Doesnt matter what os. If there is a slick way for the dvr server code that Is running on the main bootable drive to check for an unmounted drive - if it already expects the database and recordings to be there in the first place - and actually mount the drive - thats a slick product improvement . It may or may not be worth the time to implement for the developers, and frankly i dont even know if its feasible. Its probably what @racameron was alluding to. There are way more features that im sure we would all want. It depends on how simple the fix is or not.

So thats why im leaning for the first case where if someone goes to play a recording, if they can get an indication to “check if the drive is mounted” in the client, “instead of recording not found” then that could prompt someone to plug in a usb cable, or in my case take the time to figure out how to auto mount my second disk on linux.

As an aside, i request that we all be kind to one another
We are all learning here on this forum, and have various skill sets. Google can be you best friend and your worst enemy.
Life is way to short to belittle others or be arrogant to others in our amazing community here. Let encourage “novices” , whatever that means, to ask silly questions, and not discourage discourse.

Fyi - Back in the day i would find a set of registers in the Atopnuc chip set and program the correct bits in the disk controller in assembly language and get the fricken drive to boot. Thats way way too many years ago to even think about now, but it seems like yesterday.

1 Like

I accept my own creation of my own chaos and the consequences therof..

And thanks for the pointer to the wiki

Autos is your friend. Give it a go and it will be more resilient.

https://help.ubuntu.com/community/Autofs

1 Like

And i just made another friend in chatGPT!
@slampman

I just asked it in plain english how to solve the mounting issue on headless ubuntu and it had a step by step walkthrough. Way cool. Dont know if it will work or not. But i do know that i know enough to get myself in a lot of trouble. Lol

1 Like

The issue is that you are asking a single app to control OS-level issues. It is your responsibility to ensure your drives/storage locations are available. When you tell an application the path to find items (like its databases or your recordings), it's your responsibility to make sure they exist.

Your "feature request" is nothing if the sort. You want your software to catch and correct your shortcomings.

I agree. However, there need to be certain expectations, too. When you request help, you need to have exhausted your own research, as well as be receptive to the answers. Additionally, you need to provide ample supporting data, because no one is sitting next to you or has knowledge of what you've actually done.

I am sorry you had issues with your drive mounting issues. However, that problem has absolutely nothing to do with the Channels software. Asking Channels to fix your own OS issues is like asking Campbells to fix your stove when the burner won't heat your soup.

For all that is sane, don't rely on ChatGPT for anything! A lawyer just submitted a brief with fake cases from ChatGPT; and when questioned for their veracity, ChatGPT doubled-down and claimed three times over that the cases were in fact real ... when they did not exist at all!

Yep ive read some really strange and frightening posts. Maybe its just a friends with limited benefits relationship.

But one of these days , id love to test how it generates code snippets and try that out.

I agree and dont agree.

If there is no easy way for channels to do the mounting of the disk than I was proposing some mechanism to detect the absence of a previously mounted disk that has the recordings and the database - and somehow alert the user at the client in the guide that something is going on. This has absolutely nothing to do with linux and my auto mount issue. This could happen on any dvr installation with an external usb drive cable that got accidentally pulled by a cat. This can and does happen, and impacts the end user experience and eventually sales of channels dvr service.

Yes most of us on this forum are tinkerers and hackers. However, our relatives are not.

Frankly, rather than having a clock on the guide, id rather see a green light that indicates that all the drives mounted.

I like channels as a product so much that i want it to succeed and thrive even if/when TVE disappears.

In my case Ive got a workaround that is acceptable to me for the time being. I can always vnc into the machine through tailscale if for some reason I cant play a recording.

Im trying to propose an enhancement in the product so that when we deploy these things for our relatives, we have some way of having a relative that cant get out of a chair see if a cat pulled a usb cable. They can look at the guide, but a “file not found error” pop up when playing a recording WILL make them NEVER want to use channels again. They will just move on to the next streaming service.

All i wanted to do was point that out an issue that I accidentally discovered to the developers. Its up to them to make a cost/benefit decision whether this will increase subscriptions.

What I got in return from the group who responded were some responses where people tried to fix my problem and point out how lazy and stupid I am. The kind approach, would have been to ignore the post if you dont want to answer.

In no way do i consider anyone on this fantastic forum my own personal support person. Please dont project that on me. That is not kind.

long after you are gone, do you want to leave a trail of unkind sometimes arrogant and angry posts for humanity to see on chatgpt or a google search.

I certainly dont want to leave that kind of karma when im gone.

You are all incredible people. Be kind.
If you dont want to chime in dont chime in, but please be conscious that anger and hatred, even if it comes out as even a slightly arrogant post, can cause terrible harm.

@maddox @tmm1 @eric please close this post. I will not tolerate unkind behavior towards me on this forum

1 Like

That's not how *nix works. Everything is a path, and the software has no real knowledge of "disks". It knows there was a location it was told to use, and now it's not there.

Before you start asking for features to fix your shortcomings, please do your research to get a solid foundation. You initially said your issue was you made a big change before a big move. But now you want more ...

I will happily close this thread. But, this is not unkind behavior to you personally. Your "feature requests" are not something an application should manage. (Or maybe I won't. It appears my permissions on the forum have been removed.)

The OS does the mounting at boot....yes, they could ad a feature to make Channels do it, but that could be something that they may find to be unreliable... but would be a neat thing to have.

I hate Ubuntu.... Instead use DietPi. It has a nice GUI'ish like SSH interface and a Drive manager that makes it easy to configure things, including setting mount points for drives, that mount at boot. They have images for tons of hardware, even x86/64 pc.