Cannot mount USB drive

Having issues with your DietPi installation or found a bug? Post it here.
User avatar
trendy
Posts: 397
Joined: Tue Feb 25, 2020 2:54 pm

Re: Cannot mount USB drive

Post by trendy »

I believe cp -a will have the same effect in preserving ownership and permissions.
User avatar
Joulinar
Posts: 6506
Joined: Sat Nov 16, 2019 12:49 am

Re: Cannot mount USB drive

Post by Joulinar »

I guess it would need to be cp -p -r. But if possible I would go with rsync.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
trendy
Posts: 397
Joined: Tue Feb 25, 2020 2:54 pm

Re: Cannot mount USB drive

Post by trendy »

On a second thought, it will do just fine:

Code: Select all

  -a, --archive                same as -dR --preserve=all
  -d                           same as --no-dereference --preserve=links
  -R, -r, --recursive          copy directories recursively
  -P, --no-dereference         never follow symbolic links in SOURCE
      --preserve[=ATTR_LIST]   preserve the specified attributes (default:
                                 mode,ownership,timestamps), if possible
                                 additional attributes: context, links, xattr,
                                 all
sfh1975
Posts: 32
Joined: Sun Nov 03, 2019 12:22 pm

Re: Cannot mount USB drive

Post by sfh1975 »

Thanks @trendy @Joulinar @MichaIng for your help and support and sorry for a late update on my part. My internet broke down for a whole day and also, I wanted to test something before posting an update here.
So here's what I have done.
  • 1
For Sonarr and Radarr, I formatted the USB after copying some files (Sonarr, Radarr folders) from it, and then reinstalled the apps. Using the restore backup function, I then used the copied files (which had originally come from the corrupt USB drive) to rebuild the database. For Sonarr, it went well and I can see my settings intact.
  • 2
Radarr is still giving me some pain in using the old files during the restore process but I am hopeful.
Strangely, There is another backup directory I found in the sd card (which has the OS on it), called /mnt/dietpi-backup. Not sure if I copied it there or it was made automatically. It is a tad bit older than the files from the corrupted USB but in worst case, I will try to use those for Radarr.
  • 3
For jellyfin, I simply reinstalled the app and its now scanning my media drives and rebuilding its databases. I didn't bother to check if its has a back up restore function though.
  • 4
The only thing I am now having trouble is Ubooquity. It is running but trying to access as admin (:2038 )gives me error, :2039 obviously tells me to set it up first. Tried looking in the logs but I think its java based and I cannot make any sense of it :) Should I open another thread for ubooquity or can someone help me with that here?

In all, another USB corrupted but lessons learnt (make regular backups). Not sure why the system has corrupted two USB drives within a relatively short span though.

Sorry for the long reply but given the help I was provided here, I felt I should report it in detail. Thanks again :)
User avatar
Joulinar
Posts: 6506
Joined: Sat Nov 16, 2019 12:49 am

Re: Cannot mount USB drive

Post by Joulinar »

what is the error you have on ubooquity? Any special thinks on the logs

Code: Select all

systemctl status ubooquity
journalctl -u ubooquity
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
sfh1975
Posts: 32
Joined: Sun Nov 03, 2019 12:22 pm

Re: Cannot mount USB drive

Post by sfh1975 »

Thanks. I am getting these:

Code: Select all

root@DietPi:~# systemctl status ubooquity
● ubooquity.service - Ubooquity (DietPi)
   Loaded: loaded (/etc/systemd/system/ubooquity.service; disabled; vendor preset: enabled)
   Active: active (running) since Fri 2021-10-29 23:41:40 AEDT; 6min ago
 Main PID: 898 (java)
    Tasks: 39 (limit: 4915)
   CGroup: /system.slice/ubooquity.service
           └─898 /usr/bin/java -Xmx719m -jar /mnt/dietpi_userdata/ubooquity/Ubooquity.jar --headless --remoteadmin --adminport 2038 --libraryport 2039

Oct 29 23:41:59 DietPi Ubooquity[898]: 20211029 23:41:59 [main] INFO  org.eclipse.jetty.server.Server - jetty-9.4.0.v20161208
Oct 29 23:41:59 DietPi Ubooquity[898]: 20211029 23:41:59 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.s.h.ContextHandler@46d9f4{/,null,AVAILABLE,@admin}
Oct 29 23:41:59 DietPi Ubooquity[898]: 20211029 23:41:59 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.s.h.ContextHandler@c69cfe{/,null,AVAILABLE,@library}
Oct 29 23:42:00 DietPi Ubooquity[898]: 20211029 23:42:00 [main] INFO  o.e.jetty.server.AbstractConnector - Started library@95ac9e{HTTP/1.1,[http/1.1]}{0.0.0.0:2039}
Oct 29 23:42:00 DietPi Ubooquity[898]: 20211029 23:42:00 [main] INFO  o.e.jetty.server.AbstractConnector - Started admin@4efc1b{HTTP/1.1,[http/1.1]}{0.0.0.0:2038}
Oct 29 23:42:00 DietPi Ubooquity[898]: 20211029 23:42:00 [main] INFO  org.eclipse.jetty.server.Server - Started @18766ms
Oct 29 23:42:00 DietPi Ubooquity[898]: 20211029 23:42:00 [main] INFO  com.ubooquity.b - Internal server started. Listening on port 2039 (library) and 2038 (admin)
Oct 29 23:42:00 DietPi Ubooquity[898]: Tyep Q then ENTER to exit
Oct 29 23:42:14 DietPi Ubooquity[898]: 20211029 23:42:14 [Timer-0] INFO  com.ubooquity.Ubooquity - Checking latest available Ubooquity version from website
Oct 29 23:42:15 DietPi Ubooquity[898]: 20211029 23:42:15 [Timer-0] INFO  com.ubooquity.Ubooquity - Latest version available: 2.1.2 - Current version: 2.1.2
root@DietPi:~#
AND:

Code: Select all

root@DietPi:~# journalctl -u ubooquity
-- Logs begin at Thu 2019-02-14 21:11:58 AEDT, end at Fri 2021-10-29 23:51:32 AEDT. --
Oct 29 23:41:40 DietPi systemd[1]: Started Ubooquity (DietPi).
Oct 29 23:41:51 DietPi Ubooquity[898]: 20211029 23:41:51 [main] INFO  com.ubooquity.Ubooquity - Running with the following parameters - headless: true, libraryport: 2039, adminport: 2038, remoteadmin: true, host: null, debug: false, execdir: /mnt/USB_for_Data/dietpi_userdata/ubooquity
Oct 29 23:41:51 DietPi Ubooquity[898]: 20211029 23:41:51 [main] INFO  com.ubooquity.Ubooquity - #############################
Oct 29 23:41:51 DietPi Ubooquity[898]: 20211029 23:41:51 [main] INFO  com.ubooquity.Ubooquity - #     Starting Ubooquity    #
Oct 29 23:41:51 DietPi Ubooquity[898]: 20211029 23:41:51 [main] INFO  com.ubooquity.Ubooquity - #############################
Oct 29 23:41:51 DietPi Ubooquity[898]: 20211029 23:41:51 [main] INFO  com.ubooquity.Ubooquity - Java version: 11.0.12
Oct 29 23:41:51 DietPi Ubooquity[898]: 20211029 23:41:51 [main] INFO  com.ubooquity.Ubooquity - Java vendor: Raspbian
Oct 29 23:41:51 DietPi Ubooquity[898]: 20211029 23:41:51 [main] INFO  com.ubooquity.Ubooquity - java vm name: OpenJDK Server VM
Oct 29 23:41:51 DietPi Ubooquity[898]: 20211029 23:41:51 [main] INFO  com.ubooquity.Ubooquity - java runtime name: OpenJDK Runtime Environment
Oct 29 23:41:51 DietPi Ubooquity[898]: 20211029 23:41:51 [main] INFO  com.ubooquity.Ubooquity - Max heap size available: 720 MB
Oct 29 23:41:51 DietPi Ubooquity[898]: 20211029 23:41:51 [main] INFO  com.ubooquity.Ubooquity - OS name: Linux
Oct 29 23:41:51 DietPi Ubooquity[898]: 20211029 23:41:51 [main] INFO  com.ubooquity.Ubooquity - OS version: 5.10.63-v7l+
Oct 29 23:41:51 DietPi Ubooquity[898]: 20211029 23:41:51 [main] INFO  com.ubooquity.Ubooquity - OS architecture: arm
Oct 29 23:41:51 DietPi Ubooquity[898]: 20211029 23:41:51 [main] INFO  com.ubooquity.Ubooquity - Loading local version info
Oct 29 23:41:51 DietPi Ubooquity[898]: 20211029 23:41:51 [main] INFO  com.ubooquity.Ubooquity - Ubooquity 2.1.2 built on 2018-10-14 at 12:58
Oct 29 23:41:51 DietPi Ubooquity[898]: 20211029 23:41:51 [main] INFO  com.ubooquity.Ubooquity - Creating application folders
Oct 29 23:41:55 DietPi Ubooquity[898]: 20211029 23:41:55 [main] INFO  com.ubooquity.Ubooquity - Loading preferences
Oct 29 23:41:58 DietPi Ubooquity[898]: 20211029 23:41:58 [main] INFO  org.eclipse.jetty.util.log - Logging initialized @17554ms to org.eclipse.jetty.util.log.Slf4jLog
Oct 29 23:41:58 DietPi Ubooquity[898]: 20211029 23:41:58 [main] INFO  com.ubooquity.b - Starting internal server...
Oct 29 23:41:58 DietPi Ubooquity[898]: 20211029 23:41:58 [main] INFO  com.ubooquity.b - Reverse proxy prefix is not activated
Oct 29 23:41:58 DietPi Ubooquity[898]: 20211029 23:41:58 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Scanning books directories
Oct 29 23:41:59 DietPi Ubooquity[898]: 20211029 23:41:59 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Finished scanning books directories, populating folders content cache
Oct 29 23:41:59 DietPi Ubooquity[898]: 20211029 23:41:59 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Books folder content cache populated
Oct 29 23:41:59 DietPi Ubooquity[898]: 20211029 23:41:59 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Scanning comics directories
Oct 29 23:41:59 DietPi Ubooquity[898]: 20211029 23:41:59 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Finished scanning comics directories, populating folders content cache
Oct 29 23:41:59 DietPi Ubooquity[898]: 20211029 23:41:59 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Comics folder content cache populated
Oct 29 23:41:59 DietPi Ubooquity[898]: 20211029 23:41:59 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Comics statistics: [total: 0, added or updated: 0, removed: 0]
Oct 29 23:41:59 DietPi Ubooquity[898]: 20211029 23:41:59 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Books statistics: [total: 0, added or updated: 0, removed: 0]
Oct 29 23:41:59 DietPi Ubooquity[898]: WARNING: An illegal reflective access operation has occurred
Oct 29 23:41:59 DietPi Ubooquity[898]: WARNING: Illegal reflective access by org.eclipse.jetty.util.BufferUtil (file:/tmp/JarClassLoader/jetty-util-9.4.0.v20161208.jar.6347727232607750212.tmp) to field java.nio.MappedByteBuffer.fd
Oct 29 23:41:59 DietPi Ubooquity[898]: WARNING: Please consider reporting this to the maintainers of org.eclipse.jetty.util.BufferUtil
Oct 29 23:41:59 DietPi Ubooquity[898]: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
Oct 29 23:41:59 DietPi Ubooquity[898]: WARNING: All illegal access operations will be denied in a future release
Oct 29 23:41:59 DietPi Ubooquity[898]: 20211029 23:41:59 [main] INFO  org.eclipse.jetty.server.Server - jetty-9.4.0.v20161208
Oct 29 23:41:59 DietPi Ubooquity[898]: 20211029 23:41:59 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.s.h.ContextHandler@46d9f4{/,null,AVAILABLE,@admin}
Oct 29 23:41:59 DietPi Ubooquity[898]: 20211029 23:41:59 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.s.h.ContextHandler@c69cfe{/,null,AVAILABLE,@library}
Oct 29 23:42:00 DietPi Ubooquity[898]: 20211029 23:42:00 [main] INFO  o.e.jetty.server.AbstractConnector - Started library@95ac9e{HTTP/1.1,[http/1.1]}{0.0.0.0:2039}
Oct 29 23:42:00 DietPi Ubooquity[898]: 20211029 23:42:00 [main] INFO  o.e.jetty.server.AbstractConnector - Started admin@4efc1b{HTTP/1.1,[http/1.1]}{0.0.0.0:2038}
Oct 29 23:42:00 DietPi Ubooquity[898]: 20211029 23:42:00 [main] INFO  org.eclipse.jetty.server.Server - Started @18766ms
Oct 29 23:42:00 DietPi Ubooquity[898]: 20211029 23:42:00 [main] INFO  com.ubooquity.b - Internal server started. Listening on port 2039 (library) and 2038 (admin)
Oct 29 23:42:00 DietPi Ubooquity[898]: Tyep Q then ENTER to exit
Oct 29 23:42:14 DietPi Ubooquity[898]: 20211029 23:42:14 [Timer-0] INFO  com.ubooquity.Ubooquity - Checking latest available Ubooquity version from website
Oct 29 23:42:15 DietPi Ubooquity[898]: 20211029 23:42:15 [Timer-0] INFO  com.ubooquity.Ubooquity - Latest version available: 2.1.2 - Current version: 2.1.2
User avatar
Joulinar
Posts: 6506
Joined: Sat Nov 16, 2019 12:49 am

Re: Cannot mount USB drive

Post by Joulinar »

looks like it has been started

Code: Select all

INFO  o.e.jetty.server.AbstractConnector - Started library@95ac9e{HTTP/1.1,[http/1.1]}{0.0.0.0:2039}
INFO  o.e.jetty.server.AbstractConnector - Started admin@4efc1b{HTTP/1.1,[http/1.1]}{0.0.0.0:2038}
INFO  org.eclipse.jetty.server.Server - Started @18766ms
INFO  com.ubooquity.b - Internal server started. Listening on port 2039 (library) and 2038 (admin)
let's check LISTEN ports

Code: Select all

ss -tulpn | grep LISTEN
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
sfh1975
Posts: 32
Joined: Sun Nov 03, 2019 12:22 pm

Re: Cannot mount USB drive

Post by sfh1975 »

Thanks a lot @Joulinar Looks like a silly mistake. The admin page is :2038/admin. A quick google search helped :) May be the documentation should be updated according.
Once again, thank you all for your help and support. Much appreciated :)
User avatar
Joulinar
Posts: 6506
Joined: Sat Nov 16, 2019 12:49 am

Re: Cannot mount USB drive

Post by Joulinar »

well our online docs reflecting this already
Admin page = http://<your.IP>:2038/admin
https://dietpi.com/docs/software/media/#ubooquity
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply