Cannot Move Database From Internal Storage: System => User Accessible?

Server Version#: 1.16.5.1554
Player Version#: N/A

I followed instructions in this Support Article:-

https://support.plex.tv/articles/moving-server-data-storage-location-on-nvidia-shield/

I attempted this to migrate from “Internal Storage (system)” to “Internal Storage (user accessible storage location)” with the aim being to make my Plex databases “accessible” so that I can back them up.

I have a Shield TV Pro and a medium large Plex library with database files of around 140-150GB of data best I can tell. When I started there was 300GB free on the internal drive out of around 450GB.
I started the “move” process and it churned away for around 2 hours before coming back with a message “Cannot move storage (blah blah blah) and so on Retry or Cancel?” I then “Retried” again with same result after another 2 hours.

I cancelled this time, and at that point my free space on internal drive had reduced to around 150GB, so it had copied all the data it seems but could not utilise the data in the new location so had not deleted the original data.

I then went in via ADB Console and deleted the “new” copy at:-

rm -rf /sdcard/Android/data/com.plexapp.mediaserver.smb/Plex Media Server

This then freed up the space again so I was back to 300GB free.

I rebooted the Shield TV to confirm all was well and I was still on the old (hidden) copy of the data at the internal (system) location. All was still well (phew!). For a minute there I thought I may be facing having to start from scratch …

For reference, the only thing non-standard about my setup is that prior to trying this I recently cloned/replaced my original internal “spinning rust” 500GB SSHD with an actual pure 500GB SSD (Samsung 850 EVO) , but I can’t see this would have any bearing on the issue - everything else works as before, just faster and better.

I’d really like to be able to migrate so I can do backups, but at the moment can’t get there as I can’t seem to make my data accessible.

Any suggestions as to why the data migrate would be failing? As I said there is definitely enough free space, and the error message is uninformative as to why it is failing …

Any logs I can capture/send if I give it another go?

StephenH

I’m afraid I don’t know your server hardware, but with a collection of such a reasonable size, can’t you just copy your files to an external USB drive, remove everything from the Plex install but a couple of files, then practice moving server data storage location with only those few files?

Once you have accomplished the move to the user accessible location using only a couple of files, and once Plex is happy playing those, copy the entire collection back from USB and have Plex rescan the library?

Nice choice of SSD btw. Really nice.

@nibbles

Thanks for the reply, but I think I’ve managed to confuse the issue, probably by my poor wording?

The actual Movie/TV/Music collection is just over 10 Terabytes (TB) and resides on a Synology 5-Bay NAS.

The 150 GB I was referring to on the Shield is the Plex metadata, which I guess is mainly thumbnails etc and so on as well as the actual movie/tv info. So to “experiment” I’d basically have to trash my Plex setup and start from scratch, and then re-scan/re-index/re-generate for the entire 10 TB. Trying to avoid that if I CAN, although not ruling it out eventually :slight_smile:

(And yes, the SSD upgrade on the Shield Pro is VERY worthwhile but is a little finicky and needs to be approached with caution. It’s easy to break things in there, especially the custom SATA cable, and end up with another piece of useless eWaste ! )

Seems like it’s better to avoid the waste as you say.
Maybe it’s a free space issue during the move.
Do you have a spare 1TB or larger USB drive you could
add as Remote Storage and move things there temporarily?

@nibbles

Doesn’t seem to be a free space issue as there is 300 GB free and I’m only moving 150 GB.

I’ve thought about migrating it to an external drive and then migrating it back to “internal (user Accessible) but I’m worried about the move back then not working and ending up with my metadata “marooned” on a slow external drive, which would mean I’d be worse off :slight_smile:

What is the exact error message you get?
Can you post the Plex log file for someone who knows what to look for?
Like you’re worried about, it would be a shame if a bug prevents moving anywhere.

I’d have to try it again now to get screenshots and logs, but the error message was just a generic “Cannot move storage …” which gave no further clues as to the issue. I’ll certainly get more info if Plex staff reply here and request it.

https://support.plex.tv/articles/201573117-android-android-tv-fire-tv-logs/

@BigWheel

Thanks for chiming in and for that link, I’ll give it another try in the next few days when I get a time window and then send logs,

1 Like

@BigWheel

Plex Media Server Logs_2019-08-28_16-16-58.zip (2.7 MB)

Logs enclosed from latest failed attempt today.

My attempted “migration” from System (internal) to System (User Accessible) started at 15:15 hrs approximately (plus or minus a couple of minutes?).

Free space before migration was ~ 297 GB. Free space AFTER failed migration was ~ 152 GB.

I then deleted the “new” copy of the data - which it HADN’T successfully migrated/linked to, even though it is definitely being copied - I can see it all there - via an ADB Shell with:-

  rm -rf "/sdcard/Android/data/com.plexapp.mediaserver.smb/Plex Media Server"

This brought the free space back up to ~ 297 GB. I rebooted the Shield TV to check Plex was still working and had database intact and it was all OK, but just back to Square One - no progress made in my aim of migrating to System (Internal User Accessible).

Have also enclosed screenshot of error message at end.

Thanks for any help in sorting this out!

StephenH

@BigWheel, Plex Staff and Plex Moderators

Any chance of someone taking a look at my issue please?

StephenH

sorry for loosing track of this. can you check in your shield settings if the app has the storage permission. had another user with a different issue where it turned out it did not.

also above is the server log. I think i will need the client/player logs

Thanks @BigWheel. I have double-checked that PMS app on my Shield has Storage Permissions turned on. It WAS enabled but I have turned it off and back on just to be sure.

I’m confused by your request for player logs as I can;'t see how that would be relevant to my PMS issue. The Plex (player) app on the Shield doesn’t really get used, I use the Shield mainly as PMS server only. My main player is on an Apple TV 4K.

Could you clarify and then I will get you what you want?

Thanks very much,

StephenH

i would like both preferably covering the same attempt. The player settings is where you select to have it moved and where the progress is displayed on screen. I am hoping it will show a more specific error in logs. I did not see anything telling in the server logs.

@BigWheel thank you and now I understand your request, makes sense … I wasn’t really thinking it through :grinning:

Early next week I will make another attempt to migrate databases and set up to capture both sets of logs and post them back here for you. Also note that since my initial couple of failures I’ve also subsequently done 2-3 PMS beta updates and probably a few Player updates as well, so who knows whether that will have any bearing?

StephenH

1 Like

@BigWheel

As promised I’ve had another go at the migration from “Internal Storage (system)” to “Internal Storage (user accessible storage location)” and it still failed, but I captured logs this time.

Now on PMS version 1.17.0.1766, Player version is 7.22.0.12524 from which I launched the attempted migration.

Logs from both PMS and Player enclosed.

Appreciate any help in getting this to work.

StephenH

Plex Media Server Shield Logs.zip (3.4 MB) Plex Player Shield TV Logs.txt.zip (116.3 KB)

Unfortunately there was nothing telling in the logs. The devs said they were going to see about adding more logging so more info is recorded but I don’t have an ETA on that.

@BigWheel

Thanks for having a look at the logs and talking to the Devs.
Yes, its a bit mystifying. I’ll happily plow on for now as I am in the hope something gets resolved.
Not effecting anything other than the fact I can’t move the databases to somewhere I can back them up, so fingers crossed I don’t have any issues I guess?

StephenH

Oh hey look, you have a console. Nice. I need to pay more attention.
Before you rm -rf the new copy, it’d be nice to explore the permissions problem, because let’s face it, a move isn’t always a move.

From man (1) mv

As the rename(2) call does not work across file systems, mv uses cp(1) and rm(1) to accomplish the move.  The effect is equivalent
     to:

           rm -f destination_path && \
           cp -pRP source_file destination && \
           rm -rf source_file


STANDARDS
     The mv utility is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible.

HISTORY
     A mv command appeared in Version 1 AT&T UNIX.

BSD                              July 9, 2002

So it’s moving bytes, but you haven’t shown it exists in the new location with the same scope of authorization… yet.

What do you think we dig in there, huh?

Can you get us the output of

mount

And maybe

cd "/sdcard/Android/data/com.plexapp.mediaserver.smb/Plex Media Server"
find . ! -type d -perm 755 -exec ls -laFh '{}' \;

Thanks bud

I’ve already deleted the “new” copy to get my space back, and yes I have a Console via the network and ADBLink on my Macs. Happy to poke around but I’m unclear what your requests would achieve in this case. The data is definitely being copied, not moved, as the original still exists (thankfully!). It seems to me Plex can’t complete whatever it has to do at the end after the copy step to “link” to the new data and remove the original copy. Yes, that could be a Permissions issue I guess, but it could also be many other things and one for the Plex to ultimately sort out - it goes well beyond my knowledge/access/skills.

I’ll leave it with @BigWheel and the devs for now - and try not to stress about not having a database backup :slight_smile: