Migration from Pi to QNAP

Server Version#: 1.41.3.9314
Player Version#: 1.107.2.300-7093f413

I have a Plex server instance running on my Pi NAS (OMV) and due to the growing media storage used and increased watch activity (CPU load) I need a something bigger and better.
I am looking to purchase a QNAP NAS and want to migrate my Plex server, files, history, personalization and hopefully server name too. Is this possible? If so, any special steps I need to take to do this?

Bump, I have the QNAP server and drives on the way. Is it as simple as coping the media, then the Plex folder, running the plex install and claiming the server?
Any guidance would be greatly appreciated to avoid issues and downtime.

Thanks in advance :slight_smile:

to do this on a QNAP, you’ll need to follow specific steps.

How skilled are you with the Linux command line & familiar with general steps or do I need give a step-by-step?

I am very new to Linux but am fairly competent with IT in general. If you have the process detailed out step by step it would likely be a time saver. Also thinking others might be able to leverage the info from the post.

Thanks so much for the help.

I have all the HW in hand and ready to go. I found the link below that is the great guide on how to get the NAS to the ready to go phase and will be starting that tomorrow., Hoping to do the migration of the server and data this weekend as well if possible. Any help is greatly appreciated and my family thanks you as well.

[New NAS: Plex on M.2 or HDD (and other questions) - #3 by ChuckPa]

Read thoroughly first. Make sure you understand what’s happening (work flow) and why.

When you’re done with the base setup,

  1. create the PlexData (exact capitalization) shared folder.

  2. Prepare to make image backup
    – Settings - Library
    – Turn off Automatic Update and Empty Trash – SAVE changes
    – Stop Plex

  3. Create a tarball backup of your Pi plex server
    – get into terminal session
    – AS root
    – get into the “Plex Media Server” directory (confirm by seeing ‘Preferences.xml’)

  4. Create tar ball of Pi’s server instance
    tar cf /path/to/somewhere/plexbackup.tar .

  5. Install Plex on the QNAP

  6. STOP Plex from App Center

  7. Upload the tarball to the “Public” shared folder on the QNAP
    ( Create the shared folder if you don’t have it. Strangely, some don’t)

  8. Control Panel - Terminal & SNMP – Enable SSH
    – remember if it’s on or off and let me know please.
    – (It should be OFF by default for security. I’ve had reports of it being ON)

  9. From your Pi / computer – whichever

  10. SSH into the qnap

  11. Login as either admin (if you use it) else your username
    – password will not echo any characters so be careful

  12. When logged in, Q - quit from the menu system, Y - yes, you want to

  13. sudo bash - elevate yourself to ‘root’ privilege if you don’t have a ‘#’ prompt

  14. whoami - confirm you’re user admin (which is root on qnap)

  15. cd /share/*/.qpkg/Ple*/Li*/Ple* (type this exactly as shown. it works)

  16. ls to confirm you see its new ‘Preferences.xml’ file

  17. rm -rf * — (delete all of the newly created and empty PMS instance)

  18. tar xf /share/Public/plexbackup.tar - Extract the tarball

  19. chown -R 0:0 . - Change ownership to root:root (qnap runs as root)

  20. cat Preferences.xml - Confirm you see the Preferences.xml from the old system here on the QNAP

  21. App Center - Start Plex

  22. wait for :fire_engine: :slight_smile:

  23. For each library section,
    – EDIT the section
    – ADD the new path(s) (as seen from the QNAP) to the media
    – DO NOT delete the old yet.
    – SAVE
    – Let it scan the new locations and add them to the DB.
    – When done,
    – EDIT the section again
    – REMOVE the old path(s) – that the pi used
    – SAVE
    – Let it finish that
    – Advance to the next library section ; repeat until done

  24. Review all your Preferences, adjusting for the new host.

  25. Review all your media and confirm it’s still present.

  26. Restore your Settings - Library options to their previous settings and SAVE.

Thank you. A few questions and comments.
I am assuming media files should be copied to the qnap before beginning the process, is that correct?
Where does the PlexData shared folder come into play, is that step 4?
SSH was off by default on the qnap and there was a public shared folder.

  1. Yes, Create shared folder(s) for your media and copy the media to the NAS
    – DO NOT install the Codex Pack
    – DO NOT use the “Multimedia” share (it’s not a real shared folder)

  2. The PlexData shared folder comes into play when you want to make backups or restore of the QNAP without getting into the shell. It also provides the means for you to get into both ‘Preferences.xml’ and the “Logs” directory in case of failures.

  3. Because you’re migrating from a different host type (Ubuntu → QNAP), the migration is best done at the shell level this time. You need definitive control to confirm everything ends up where it belongs,
    – Sure , you can probably put the tarball.gz in the PlexData/Plex Media Server directory then extract it via FileStation but I’m the type to use tar tf and confirm before using tar xf to do it. (You’ll still need the shell to chown it all)

Super, thanks again so much for the help and quick reply. Data transfer is in progress but the 15TB is going slow

Using NFS or SMB ?

I use NFS because, for the QNAP, I find it faster – NFS is Linux-native.
You can set some mount options to speed it up.

I was doing SMB, but will move over. Good tip

One other question while we are at it. I installed a NVMe drive (4TB) before the disks and installed QTS on it. I have another 4TB NVMe that i planned to install in the box. Should I use that as a qnap cache drive or a backup to the initial NVMe with the OS? or something totally different?

In my QNAP, I have two SSDs on the motherboard.
They are only 1TB in size and SATA interface.

I made them a RAID 1 (mirror) for performance when I installed QTS.
( 525 MB/sec write, 1GB/sec read)

Had I known you have the two NVMe SSDs, I’d have advised -

  1. DataVol1 = NVMe 0
  2. DataVol2 = NVMe 1
  3. DataVol3 = HDD array

-or-

  1. DataVol1 = NVMe 0 & 1 in RAID 0 (8TB capacity) -or- RAID 1 (4TB performance)
  2. DataVol2 = HDD array

Given where you’re at in the process, You can

  1. AFTER the media is copied but before starting Plex migration
  2. Safely Remove DataVol2 (it has a special feature to do this)
  3. Pull the drives out
  4. Now you can address the NVMe SSDs however you’ve decided.
  5. Reinstall QTS and configure it as you want with either both as DataVol1 or as DataVol 1 & 2.
  6. When done with the QTS volume(s), shutdown
  7. Push the drives back in
  8. Start QTS up
  9. It will recognize the storage array and import as the next DataVol.

I would prefer to set it up right and get the best configuration with no regrets later.
In reading things initially, I didn’t think I would need 8TB for the “OS” drive and might better use the second drive. I am on the fence for RAID levels and not sure what advantage having the second NVMe as a solo data volume would be. Based on the fact you set your OS drives up in a mirror makes me think this is the way to go.

If I had a 4TB NVMe OS SSD, I would make decisions based on the TBW (presuming both are the same manufacturer & model)

Which make & model do you have ?
(I’ll lookup the specs on them and share my findings)

WD_BLACK 4TB SN850X NVMe SSD Gen4 PCIe, M.2 2280, Up to 7,300 MB/s - WDS400T2X0E

Thank you and really do appreciate your guidance and help.

You have the 4TB version of the SSD I put in my new NUC12

[chuck@lizum ~.2005]$ get-devices
NAME        STATE   TRAN   HCTL       MODEL                        REV SERIAL            TYPE   SIZE FSTYPE     MOUNTPOINT                     FSSIZE FSAVAIL FSUSED FSUSE%
sda         running usb    10:0:0:0   Samsung SSD 850 EVO M.2 1TB 1.00 S33ENX0J200598W   disk 931.5G                                                                 
sdb         running usb    8:0:0:0    SD/MMC CRW                  1.00 29203008282014000 disk     0B                                                                 
sr0         running usb    9:0:0:0    BD-RE WH16NS40              1.02 20170500043E      rom   1024M                                                                 
nvme1n1     live    nvme              Samsung SSD 970 PRO 1TB          S462NF0K820471D   disk 953.9G                                                                 
├─nvme1n1p1         nvme                                                                 part 953.9G zfs_member                                                      
└─nvme1n1p9         nvme                                                                 part     8M                                                                 
nvme0n1     live    nvme              WD_BLACK SN850X 2000GB           24131M803801      disk   1.8T                                                                 
├─nvme0n1p1         nvme                                                                 part 498.8M vfat       /boot/efi                      498.5M  433.9M  64.6M    13%
├─nvme0n1p2         nvme                                                                 part   122G xfs        /                              121.9G   91.1G  30.8G    25%
├─nvme0n1p3         nvme                                                                 part  59.6G swap       [SWAP]                                               
└─nvme0n1p4         nvme                                                                 part     1T xfs        /home                         1023.6G  659.5G 364.2G    36%
nvme2n1     live    nvme              CT2000T500SSD8                   240646E6EDE1      disk   1.8T                                                                 
├─nvme2n1p1         nvme                                                                 part 931.3G xfs        /sata                          930.9G  787.6G 143.2G    15%
└─nvme2n1p2         nvme                                                                 part 931.7G xfs        /usb                           931.2G  680.7G 250.5G    27%
[chuck@lizum ~.2006]$ sudo dd if=/dev/nvme0n1 iflag=direct of=/dev/null bs=4M count=10000 status=progress
41754296320 bytes (42 GB, 39 GiB) copied, 9 s, 4.6 GB/s 
10000+0 records in
10000+0 records out
41943040000 bytes (42 GB, 39 GiB) copied, 9.02948 s, 4.6 GB/s
[chuck@lizum ~.2007]$ sudo dd if=/dev/nvme0n1 of=/dev/null bs=4M count=10000 status=progress
41058041856 bytes (41 GB, 38 GiB) copied, 15 s, 2.7 GB/s
10000+0 records in
10000+0 records out
41943040000 bytes (42 GB, 39 GiB) copied, 15.2176 s, 2.8 GB/s
[chuck@lizum ~.2008]$ 

I get between 2.8 (large sequential) and about 5 (random) GB/sec

In my SATA-based QNAP, I get

  • 534 MB/sec from a single device (full sata bus limit)
  • 947 MB/sec from the RAID volume (mirror of both)
[~] # dd if=/dev/sda of=/dev/null bs=4M count=5000
5000+0 records in
5000+0 records out
20971520000 bytes (19.5GB) copied, 37.455670 seconds, 534.0MB/s
[~] # cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] 
md2 : active raid5 sdm3[6] sdg3[8] sde3[7] sdi3[5] sdh3[4] sdk3[3] sdj3[2] sdl3[1]
      136653063680 blocks super 1.0 level 5, 512k chunk, algorithm 2 [8/8] [UUUUUUUU]
      
md1 : active raid1 sda3[0] sdb3[1]
      430588416 blocks super 1.0 [2/2] [UU]
      
md322 : active raid1 sdi5[9](S) sdh5[8](S) sdk5[7](S) sdj5[6](S) sdl5[5](S) sdm5[4](S) sde5[3](S) sdg5[2](S) sdf5[1] sdd5[0]
      6702656 blocks super 1.0 [2/2] [UU]
      bitmap: 0/1 pages [0KB], 65536KB chunk

md256 : active raid1 sdi2[9](S) sdh2[8](S) sdk2[7](S) sdj2[6](S) sdl2[5](S) sdm2[4](S) sde2[3](S) sdg2[2](S) sdf2[1] sdd2[0]
      530112 blocks super 1.0 [2/2] [UU]
      bitmap: 0/1 pages [0KB], 65536KB chunk

md321 : active raid1 sdb5[2] sda5[0]
      7751232 blocks super 1.0 [2/2] [UU]
      bitmap: 0/1 pages [0KB], 65536KB chunk

md13 : active raid1 sda4[0] sdd4[41] sdf4[40] sde4[39] sdi4[38] sdh4[37] sdk4[36] sdg4[35] sdj4[34] sdl4[33] sdm4[32] sdb4[1]
      458880 blocks super 1.0 [32/12] [UUUUUUUUUUUU____________________]
      bitmap: 1/1 pages [4KB], 65536KB chunk

md9 : active raid1 sda1[0] sdd1[41] sdf1[40] sde1[39] sdi1[38] sdh1[37] sdk1[36] sdg1[35] sdj1[34] sdl1[33] sdm1[32] sdb1[1]
      530048 blocks super 1.0 [32/12] [UUUUUUUUUUUU____________________]
      bitmap: 1/1 pages [4KB], 65536KB chunk

unused devices: <none>
[~] # dd if=/dev/md1 of=/dev/null bs=4M count=5000
5000+0 records in
5000+0 records out
20971520000 bytes (19.5GB) copied, 21.100955 seconds, 947.8MB/s
[~] # 


Given you have far higher performance on a single drive than I get with the RAID,
knowing you have a long life on the SSDs, (warranty is 5 years)

I would do the following:

  1. Get QNAP heat sinks for the SSDs
    – I have the TVS-1282 and use the HS-M2SSD-01. I use 3 sinks per SSD.
    (Focus on getting the controller perfect – closest to the edge connector)
  1. Keep QTS installed on the first SSD as it currently is.

  2. This next decision is how “retentive” you want to be

  • If SSDs first, then “SAFELY REMOVE” the HDD volume
    – Install the second SSD
    – Set it up as CACHEDEV2 (DataVol2)
    – Reinstall the HDDs
    – Accept bringing the volume back in as CACHEDEV3 (DataVol3)
  • Otherwise,
    – Put the heatsinks on the next SSD before you install it
    (add heatsinks to the first as you install the 2nd)
    – Setup the 2nd SSD as CACHEDEV3 (DataVol3)
  1. Setup Plex
  • Add shared folders for media
  1. Create a “PlexTranscoding” shared folder on the 2nd SSD volume
  • Edit Plex’s settings to point to that shared folder (Transcoder Temp)

Other option(s)

  1. Keep only the OS / OS-related packages on the first SSD
  2. Move all of PMS to the 2nd SSD
    – Control Panel - Right-click Plex - Migrate to - select DataVol3

Fun choices :slight_smile:

Excellent details and info. I have the QNAP heatsinks already but only put one on as the product label covers the two other chips fully so hard to see and didn’t know how much good they would do and was hesitant to remove label if warranty was needed.
Based on the process outlined I will use the second NVMe as the transcoder Temp. The RAID Group is still syncing and data is still getting migrated over (maxing the 1GB link on the Pi NIC). Looks like tomorrow night I might be able to make the needed changes to the discs. Thanks again

Regarding the labels

  1. Take pic of labels without heatsinks (for your records - RMA if needed)
  2. Put the heatsinks ON as instructed. DO NOT REMOVE labels
    – The WD label is part of its heatsink. (aluminum). You’re adding more
    – They can read all the info from the SSD by connecting it to their test system.

My NUC has built-in heatsinks (inside the CPU element)
I get SSD - its heatsink - full length pad - NUC full length heatsink


Waiting for media transfer it the worst part.
I ended up upgrading everything to 10 Gbps.
Even with that, I still wait 17 hours for a full NAS reload from my QNAP – about 7 Gbps throughput fron the QNAP

As always great info and thanks.

I have 2.5 Gb on my core devices. It will be nice to get of the Pi for a few reasons and hope I don’t have to transfer is kind of data often going forward or I will make some additional upgrades.