Migrating Synology NAS drives to a UGREEN NAS, in place, using syno-ugreen

Hugues Alary

2026/11/30

Note

This post was written by a Human. AI was used only sparingly to polish or clarify talking points.

I recently bought a UGREEN DXP4800 Pro to replace my old Synology DS918+.

DS918+

My setup is simple: 4x4TB drives, in a RAID10 configuration, with Btrfs for filesystem. So I imagined migrating my data from one to the other would be straightforward: physically move the drives from the Synology to the UGREEN, maybe run a few commands, done.

Alas, it turned out, just moving the drives isn’t possible: while both Synology and UGREEN use mdadm to setup the drives in a standard RAID configuration, they do so in incompatible ways. A UGREEN NAS won’t accept storage pools built on a Synology NAS — and vice-versa.

The only documented and widely accepted method is to copy the data to some other storage, move the drives, re-create the RAID array (losing all the data in the process), restore the backup on the fresh array.

Slow, and, tedious.

I, also, did not have large spare drives, didn’t feel like buying more, and didn’t want to wait around for the copy. I needed to come up with a plan.

If you want the TL;DR, click this. Otherwise, read on.

Long story short, I (with substantial help from AI) wrote a tool that let’s you migrate from a Synology NAS to a UGREEN NAS, without copying data. You can skip directly to the "Introducing syno-ugreen" section below or check out the GitHub repository.

The process

Plan A

My first thought was that I could dig through my drawers, find old USB drives, painstakingly split and copy the data across all of them, restore it.

This felt daunting and slow to me.

I needed to think of something else.

Plan B

I realized I was actually using less than 50% of the total capacity available on my NAS.

Since they were configured in RAID10, I could pull 2 drives out, plug them into the UGREEN, create a RAID 1, copy the data from the Synology to the UGREEN over the network, move the remaining 2 drives over, "promote" my RAID 1 to a RAID 10 with 4 drives.

This sounded reasonable to me, but I’m out of my depth when it comes to playing with LVM, RAID and filesystems — so I asked AI to come up with a list of written steps and command lines.

That’s when plan B collapsed: you can’t convert a RAID 1 to RAID 10 (at least not in a way that’d make Plan B better than Plan A).

Back to plan A.

Plan C

I really did not want to do plan A.

I prompted AI more.

Search the internet for information about having successfully manually mounted a synology RAID 10 and wanting to convert it into a UGOS RAID 10.

Me

I couldn’t find anyone who has done this. Every source I found says UGOS can’t take over a Synology array in place.

What the search found

  • UGREEN’s own migration guide says moving disks only works for storage pools that UGOS created. It explicitly says Synology, SHR, QNAP and similar arrays can’t be converted into UGREEN internal storage, and it warns against initializing foreign arrays in the NAS. The supported route is to copy over the network with rsync. (UGREEN)

  • Why it won’t work: Synology builds its arrays in layers (mdadm RAID, then LVM, across three partitions per disk). UGOS Pro expects its own partition table with mdadm + Btrfs. When you insert Synology disks, UGOS treats them as foreign and offers to wipe them to create a new pool. (bitdoze)

[... other bullet points removed...]

AI

If you didn’t read the above (can’t blame you), the TL;DR is: "this is unsupported, no one has done it and won’t work".

Not a good start.

Though, "why it won’t work", got me thinking: clearly, DSM and UGOS both use the same underlying technology. All they did is build their own layer on top. So, there must be a way to make UGOS adopt an existing pool. I followed up.

Where are the storage pools configurations stored in ugos?

Me
AI

A long, multi-page, conversation ensued — it ended with:

That’s the answer: /etc/nas_storage/storage_db.db is where UGOS keeps its storage records, with /etc/nas_storage/disk_db.db next to it for the disks. The service that maintains them is storage_serv, which logs to /var/ugreen/log/storage_serv.slog.

[... snipped...]

AI

Well, this is it, I thought. All I need to do is insert the right data in UGOS' storage_db.db database. So I stirred AI in that direction.

I have a backup of all my data. I want to reconstruct the 4 disk RAID10 array (right now only 2 disks are in it) and then I want to try to create a UGOS pool.

Me
AI

Let’s do a loop-device script first, yes

Me

I won’t copy the full AI transcript —it’s really long and boring to read (as AI always is)— but, after many more hours than it would have taken me to just go with Plan A, I present you: syno-ugreen (uninspired, I know).

A tool (obligatory "written in Go") to convert a Synology NAS storage pool to a UGREEN NAS storage pool, without copying data.

What started off as a one-off Bash script that migrated my own data, is now a fully tested open-source tool for all of you who thought "these Black Friday deals aren’t that interesting, but, I really want a new NAS".

I just hope you found this before you went through the troubles of Plan A.

Introducing syno-ugreen

syno-ugreen converts an existing Synology DSM storage pool (SHR, SHR-2, RAID 0-1-5-6-10, Basic, and JBOD), into a UGREEN UGOS storage pool.

It was built with substantial help from AI.

I’m not comfortable with Linux filesystem primitives and wouldn’t have been able to build this myself in such a short amount of time.

However, I took great care to test it — at first, with my own data (bad idea, but I got lucky).

Ultimately, though, I didn’t want to release a tool I hadn’t thorougly tested. So I bought 4 cheap 128GB SSDs to specifically build DSM storage pools and test migrating them to UGREEN with syno-ugreen. I also shucked a 2TB USB drive to get its HDD, allowing me to test more complex storage pool setups (shr-sizes-3 in the table below).

That being said:

Important

Disclaimer: This software is provided "as is," without warranty of any kind, express or implied. Modifying storage pools, file systems, or system configurations carries inherent risks. The author(s) shall not be held liable for any data loss, corruption, hardware damage, or system instability resulting from the use or misuse of this tool. Always back up your data before proceeding. Use entirely at your own risk.

Note

Disclaimer: Because this program was developed with significant help from AI, it likely contains AI’isms that will trigger some people.

I spent a decent amount of time reading the codebase, refactoring long-winded comments, taking out non-sense, etc.

However, it is now almost midnight on Sunday Nov. 29th, and my goal was to get this out before Monday Nov. 30th. So I’m releasing this as-is.

I will go eventually go back and keep cleaning up AI’ism where needed.

GitHub repository

Supported conversions

The table below shows which conversions I tested.

They were tested on Synology DS918+ running DSM 7.4.1-90080 Update 2 and UGREEN DXP4800 Pro running UGOS 1.21.1.0016.

Case DSM pool Disks Volumes md array(s) DSM builds UGOS pool after conversion

basic-1

Basic

1

btrfs + ext4 (LVM)

raid1, 1 member

RAID 1 (1 disk)

jbod-1

JBOD

1

btrfs + ext4 (LVM)

linear, 1 member

JBOD (1 disk)

raid0-2

RAID 0

2

btrfs + ext4 (LVM)

raid0

RAID 0

raid5-3

RAID 5

3

btrfs + ext4 (LVM)

raid5

RAID 5

raid6-4

RAID 6

4

btrfs + ext4 (LVM)

raid6

RAID 6

raid10-4

RAID 10

4

btrfs + ext4 (LVM)

raid10

RAID 10

shr-1

SHR

1

btrfs + ext4 (LVM)

raid1, 1 member, on SHR’s partitions

RAID 1 (1 disk)

shr-sizes-3

SHR

3 (1 smaller)

btrfs + ext4 (LVM), volume_1 across both arrays

raid5 on 3 + raid1 on the 2 bigger

RAID 5 on 3 disks, after consolidate

basic-1-nolvm-btrfs

Basic, single volume

1

btrfs, directly on the array

raid1, 1 member

RAID 1 (1 disk)

basic-1-nolvm-ext4

Basic, single volume

1

ext4, directly on the array

raid1, 1 member

RAID 1 (1 disk)

Case

The internal name used by a secondary tool (build-dsm-array) I built to automate the creation of DSM pools.

DSM pool

The type of storage pool you can choose from in the DSM UI.

Disks

The number of disks involved in the storage pool.

Volumes

The type of volumes that were created in the storage pool.

md array(s) DSM builds

What DSM actually built (using mdadm).

UGOS pool after conversion

The corresponding type of storage pool in UGOS.

For each one of these test cases:

  • I built the storage pool on the Synology.

  • Physically moved the drives from the Synology to the UGREEN.

  • Ran syno-ugreen […​].

  • Verified the integrity of the data.

  • Ran syno-ugreen rollback (which rollbacks any modification done by the tool).

  • Physically moved the drives back to the Synology.

  • Remounted the drives.

  • Verified the integrity of the data.

How to use

Here’s the process, broadly speaking:

  1. BACKUP YOUR DATA.

    Yes, I hear you, you’re here because you don’t want to waste time backing up your data. I did my best to make sure this won’t erase your data, but, re-read the disclaimer. You’ve been warned.

  2. Shutdown your Synology NAS

  3. Shutdown your UGREEN NAS

  4. Remove the drives from the Synology and label them with a number (painter’s tape is great for that).

  5. Insert the drives, in order, into into the UGREEN [1]

  6. Copy/Download syno-ugreen to the UGREEN (find compiled binaries here)

  7. Run, in order

    1. syno-ugreen inspect

    2. (in very rare cases: syno-ugreen consolidate)

    3. syno-ugreen preflight

    4. syno-ugreen phase1

    5. syno-ugreen phase2

    6. syno-ugreen phase3

    7. syno-ugreen phase4

syno-ugreen works in phases. I did this to make it easier to rollback if any unexpected error occurs.

inspect

The inspect phase will output information about the Synology storage pools detected, and what command to run next to start the conversion.

consolidate

The consolidate phase is only needed if your storage pool is an SHR with disks of different sizes. syno-ugreen will let you know if you need to run it.

preflight

The preflight phase check the array and records the hash of a random sample of files to verify the integrity of data after the migration.

phase n

Each phase1, phase2, phase3 and phase4 must be run one after the other. Each phase indicates which one must be called next.

status

staus show which steps are done.

rollback

At any point in time, you can run the rollback command and your disks will be restored to the state they were in originally.

Command line help

syno-ugreen: convert a Synology (DSM) storage pool into a UGREEN (UGOS) pool, in place

usage: syno-ugreen [--array-uuid UUID] <command> [flags]

Find the Synology DSM pools:
  inspect              list the Synology pools on disk and their UUID

Convert, one step at a time:
  inspect              report on that array; changes nothing
  consolidate          only for SHR over disks of different sizes: move it onto one array
  preflight            check the array and record a sample of files
  phase1 ... phase4    convert it; phase4 hands the pool to UGOS
  status               show which steps are done
  rollback             undo every step done, back to the Synology pool

(experts only) Testing syno-ugreen:
  simulate             run every step on a fake array made of loop devices
  simulate-cleanup     remove what a failed simulation left
  verify VOLUME...     check build-dsm-array's test files on a volume

Flags (Generic):
  --array-uuid UUID            the array to convert (its UUID, from inspect); needed by every step
  --full-check                 phase2: also run btrfs check (slow on large volumes)
  --state-dir folder           folder for each run's state and backups; pass the same one to every step (default /root/syno-ugreen)

Flags (Experts only):
  --db file                    UGOS storage database file (default /etc/nas_storage/storage_db.db)
  --md device                  md device to assemble the array as (default: the current one, or the first free /dev/mdN)
  --md-name name               array name UGOS expects (default: from the NAS serial)
  --mnt folder                 temporary mount folder (default /mnt/syno-ugreen)
  --pool name                  UGOS pool name, e.g. pool2 (default: the next free one)
  --sample number              number of files to checksum in preflight (default 300)
  --shrink-mib MiB             MiB phase1 shrinks a btrfs without LVM by (at least 8) (default 1024)
  --ugvolume-log file          log file phase4 watches (default /var/ugreen/log/storage_serv_ugvolume.slog)
  --unit unit                  UGOS storage service unit (default: storage_serv)
  --vg-id id                   id in UGOS's LVM names (default: from the first network card's MAC)
  --yes                        don't ask before changing anything (dangerous)

Flags (Testing):
  --keep                       simulate: leave everything in place when it passes
  --simulate-dir folder        simulate: work folder (default /volume1/syno-ugreen-simulation)
  --simulate-disk-mib MiB      simulate: size of each loop disk in MiB (default 1200)
  --simulate-layout layout     simulate: layout: btrfs, ext4, lvm, shr, shr3, or all (default all)
  --simulation                 run a step in test mode: loop devices only, a copy of UGOS's database, storage_serv never stopped

syno-ugreen has many flags, but in general you don’t need any of them.

Simply running syno-ugreen inspect, reading and following the instructions is enough.

Example output

To give you an idea of what to expect when using syno-ugreen, below is a paste of a test conversion of one of the more involved scenarios (shr-sizes-3), an SHR storage pool, with 3 disks, but one smaller than the other 2.

If you actually read it, you’ll even notice I lost my SSH session in the middle of the consolidate step. That didn’t cause any issues.

root@DXP4800PRO-NAS:~# ./syno-ugreen-linux-amd64 inspect
==> Pool from "dsm-nas": SHR (2 arrays) on 3 disks
    disk   /dev/sda         128 GB  serial SSDSERIAL0001
    disk   /dev/sdb         128 GB  serial SSDSERIAL0002
    disk   /dev/sdc         108 GB  serial SSDSERIAL0003
    array  11111111:22222222:33333333:44444444  raid5  3/3 members (sda5 sdb5 sdc5)  <- pass this one
    array  55555555:66666666:77777777:88888888  raid1  2/2 members (sda6 sdb6)
    to convert it:
      S="./syno-ugreen-linux-amd64 --array-uuid 11111111:22222222:33333333:44444444"
      $S consolidate   # first: SHR over several arrays
      $S inspect

root@DXP4800PRO-NAS:~# S="./syno-ugreen-linux-amd64 --array-uuid 11111111:22222222:33333333:44444444"
root@DXP4800PRO-NAS:~# $S inspect
==> Array 11111111:22222222:33333333:44444444
    /dev/sda5    name=dsm-nas:2                        level=raid5   devices=3  events=7
    /dev/sdb5    name=dsm-nas:2                        level=raid5   devices=3  events=7
    /dev/sdc5    name=dsm-nas:2                        level=raid5   devices=3  events=7
    not assembled

==> UGOS
    pool pool2  md_name=UGREEN-DATA-x86_64-123456 vg=ug_A1B2C3_1795489559_pool2 md_uuid=aaaaaaaa:bbbbbbbb:cccccccc:dddddddd
    pool pool3  md_name=UGREEN-DATA-x86_64-123456 vg=ug_A1B2C3_1795850959_pool3 md_uuid=eeeeeeee:ffffffff:12121212:34343434
    OK: local md name: UGREEN-DATA-x86_64-123456 (NAS serial in /tmp/factory/sn.txt)
    OK: VG id: A1B2C3 (MAC address of eth1, the first network interface)
    next free: pool7 / volume7 at /volume7

root@DXP4800PRO-NAS:~# $S preflight
==> Finding members of 11111111:22222222:33333333:44444444
    OK: 3 members [/dev/sda5 /dev/sdb5 /dev/sdc5], level raid5, events 7

These disks also hold other array(s):
  - 55555555:66666666:77777777:88888888 (name dsm-nas:3, raid1)
If they are part of the same DSM pool (SHR on disks of different sizes), answer no and run consolidate first.
Continue with preflight anyway?
    Type yes to continue: yes

==> UGOS side
    OK: md name UGREEN-DATA-x86_64-123456 (NAS serial in /tmp/factory/sn.txt)
    OK: VG id A1B2C3 (MAC address of eth1, the first network interface)
    OK: unit storage_serv.service, md name UGREEN-DATA-x86_64-123456, VG ug_A1B2C3_1796011878_pool7, pool7/volume7 at /volume7

==> Assembling read-write

Assemble [/dev/sda5 /dev/sdb5 /dev/sdc5] as /dev/md2 READ-WRITE?
    Type yes to continue: yes
    $ mdadm --assemble /dev/md2 /dev/sda5 /dev/sdb5 /dev/sdc5
      mdadm: /dev/md2 has been started with 3 drives.
    role 0  /dev/sda5  disk sda      serial SSDSERIAL0001
    role 1  /dev/sdb5  disk sdb      serial SSDSERIAL0002   -> disk_id 8, dev_ext "5"
    role 2  /dev/sdc5  disk sdc      serial SSDSERIAL0003

==> LVM on /dev/md2

STOPPED: volume group vg3 spans 2 arrays (e.g. SHR with disks of different sizes) - a UGOS pool is one array: run consolidate first, with --array-uuid of the array on all disks
State: /root/syno-ugreen/11111111222222223333333344444444/state.json. Undo with: syno-ugreen --array-uuid 11111111:22222222:33333333:44444444 rollback

root@DXP4800PRO-NAS:~# $S consolidate
==> Finding members of 11111111:22222222:33333333:44444444
    OK: 3 members [/dev/sda5 /dev/sdb5 /dev/sdc5], level raid5, events 9

==> Assembling read-write
    OK: already assembled read-write as /dev/md2 (clean) - reusing

==> Other arrays of volume group vg3
    $ mdadm --assemble --readonly /dev/md3 /dev/sda6 /dev/sdb6
      mdadm: /dev/md3 has been started with 2 drives.
    $ mdadm --readwrite /dev/md3
    OK: /dev/md3 (array 55555555:66666666:77777777:88888888, [/dev/sda6 /dev/sdb6]) is part of volume group vg3
    $ vgchange --devices=/dev/md2,/dev/md3 -ay vg3
      WARNING: PV /dev/md2 in VG vg3 is using an old PV header, modify the VG to update.
      WARNING: PV /dev/md3 in VG vg3 is using an old PV header, modify the VG to update.
      3 logical volume(s) in volume group "vg3" now active

==> Space on /dev/md2
    /dev/md2    46656 extents,  46656 used
    /dev/md3     4576 extents,   3011 used
    to move: 3011 extents (12044 MiB), free on /dev/md2: 0 extents (0 MiB)

==> Planning: 3011 more extents (12044 MiB) must be freed by shrinking btrfs volumes
    $ mount -o ro,subvolid=5 /dev/vg3/volume_1 /mnt/syno-ugreen
    $ umount /mnt/syno-ugreen
    volume_1: 190464 MiB, uses 5197 MiB - shrink by 12044 MiB

Consolidate will:
  - shrink btrfs volume volume_1 from 190464 to 178420 MiB (it uses 5197 MiB)
  - move everything on /dev/md3 (array 55555555:66666666:77777777:88888888) onto /dev/md2 with pvmove, then take /dev/md3 out of volume group vg3 and stop it
  - the space on the other arrays is not used by UGOS afterwards; rollback puts them back into the volume group, but the data stays on /dev/md2
    Type yes to continue: yes

==> Shrinking volume_1 to 178420 MiB
    $ mount -o rw,subvolid=5 /dev/vg3/volume_1 /mnt/syno-ugreen
    $ btrfs filesystem resize 1:187086929920 /mnt/syno-ugreen
      Resize device id 1 (/dev/mapper/vg3-volume_1) from 186.00GiB to 174.24GiB
    $ umount /mnt/syno-ugreen
    $ lvreduce --devices=/dev/md2,/dev/md3 -y -l 44605 vg3/volume_1
      WARNING: PV /dev/md2 in VG vg3 is using an old PV header, modify the VG to update.
      WARNING: PV /dev/md3 in VG vg3 is using an old PV header, modify the VG to update.
      WARNING: Reducing active logical volume to <174.24 GiB.
      THIS MAY DESTROY YOUR DATA (filesystem etc.)
      Size of logical volume vg3/volume_1 changed from 186.00 GiB (47616 extents) to <174.24 GiB (44605 extents).
      WARNING: updating PV header on /dev/md2 for VG vg3.
      WARNING: updating PV header on /dev/md3 for VG vg3.
      Logical volume vg3/volume_1 successfully resized.
    OK: volume_1 is 178420 MiB

==> Moving /dev/md3 onto /dev/md2 (this copies the data and can take hours; if it is interrupted, run consolidate again to resume)
    $ pvmove --devices=/dev/md2,/dev/md3 -i 15 /dev/md3 /dev/md2
      /dev/md3: Moved: 0.00%
      /dev/md3: Moved: 10.06%
      /dev/md3: Moved: 13.57%
      /dev/md3: Moved: 17.82%
      /dev/md3: Moved: 25.44%
      /dev/md3: Moved: 30.47%
      /dev/md3: Moved: 32.76%
Read from remote host 192.168.1.20: Connection reset by peer


root@DXP4800PRO-NAS:~# S="./syno-ugreen-linux-amd64 --array-uuid 11111111:22222222:33333333:44444444"
root@DXP4800PRO-NAS:~# $S inspect
==> Array 11111111:22222222:33333333:44444444
    /dev/sda5    name=dsm-nas:2                        level=raid5   devices=3  events=33
    /dev/sdb5    name=dsm-nas:2                        level=raid5   devices=3  events=33
    /dev/sdc5    name=dsm-nas:2                        level=raid5   devices=3  events=33
    assembled as /dev/md2 (array_state clean), contains LVM2_member

==> UGOS
    pool pool2  md_name=UGREEN-DATA-x86_64-123456 vg=ug_A1B2C3_1795489559_pool2 md_uuid=aaaaaaaa:bbbbbbbb:cccccccc:dddddddd
    pool pool3  md_name=UGREEN-DATA-x86_64-123456 vg=ug_A1B2C3_1795850959_pool3 md_uuid=eeeeeeee:ffffffff:12121212:34343434
    OK: local md name: UGREEN-DATA-x86_64-123456 (NAS serial in /tmp/factory/sn.txt)
    OK: VG id: A1B2C3 (MAC address of eth1, the first network interface)
    next free: pool7 / volume7 at /volume7
    state: last completed step "consolidate" (/root/syno-ugreen/11111111222222223333333344444444)

root@DXP4800PRO-NAS:~# $S preflight
==> Finding members of 11111111:22222222:33333333:44444444
    OK: 3 members [/dev/sda5 /dev/sdb5 /dev/sdc5], level raid5, events 33

==> UGOS side
    OK: md name UGREEN-DATA-x86_64-123456 (NAS serial in /tmp/factory/sn.txt)
    OK: VG id A1B2C3 (MAC address of eth1, the first network interface)
    OK: unit storage_serv.service, md name UGREEN-DATA-x86_64-123456, VG ug_A1B2C3_1796013191_pool7, pool7/volume7 at /volume7

==> Assembling read-write
    OK: already assembled read-write as /dev/md2 (clean) - reusing
    role 0  /dev/sda5  disk sda      serial SSDSERIAL0001
    role 1  /dev/sdb5  disk sdb      serial SSDSERIAL0002   -> disk_id 8, dev_ext "5"
    role 2  /dev/sdc5  disk sdc      serial SSDSERIAL0003

==> LVM on /dev/md2
    $ vgchange --devices=/dev/md2 -ay vg3
      3 logical volume(s) in volume group "vg3" now active
    vg3/syno_vg_reserved_area: no filesystem - left as it is
    vg3/volume_1: btrfs, label "2026.11.30-04:02:47\\ v90080" -> volume7 at /volume7
    vg3/volume_2: ext4, label "1.44.1-90080" -> volume8 at /volume8
    OK: volume group vg3 -> ug_A1B2C3_1796013191_pool7, 2 volume(s)
    original names (rollback restores them): md "dsm-nas:2", partition names ["" "" ""], and the volume names and labels above

==> Recording manifest of volume_1 (300 random files + subvolume/data summary)
    $ mount -o ro,subvolid=5 /dev/vg3/volume_1 /mnt/syno-ugreen
    hashed 29/262 files
    $ umount /mnt/syno-ugreen
    OK: volume_1: 262 files sampled, 2 summary lines

==> Recording manifest of volume_2 (300 random files + subvolume/data summary)
    $ mount -o ro /dev/vg3/volume_2 /mnt/syno-ugreen
    hashed 45/283 files
    hashed 46/283 files
    hashed 50/283 files
    hashed 63/283 files
    $ umount /mnt/syno-ugreen
    OK: volume_2: 283 files sampled, 0 summary lines

==> Preflight done. Next: phase1

root@DXP4800PRO-NAS:~# $S phase1
==> Phase 1: nothing to do - the array already holds LVM

==> Phase 1 done. Next: phase2

root@DXP4800PRO-NAS:~# $S phase2
==> Phase 2: rename the volume group and its volumes to UGOS's names
    volume group vg3 -> ug_A1B2C3_1796013191_pool7 (tag ug_A1B2C3_1796013191_pool7)
    volume volume_1 -> volume7 (tag /volume7)
    volume volume_2 -> volume8 (tag /volume8)

Stop storage_serv.service and rename the volume group and volumes as above? (rollback renames them back)
    Type yes to continue: yes
    $ systemctl stop storage_serv.service
    $ vgchange --devices=/dev/md2 -an vg3
      0 logical volume(s) in volume group "vg3" now active
    $ vgrename --devices=/dev/md2 vg3 ug_A1B2C3_1796013191_pool7
      Volume group "vg3" successfully renamed to "ug_A1B2C3_1796013191_pool7"
    $ vgchange --devices=/dev/md2 --addtag ug_A1B2C3_1796013191_pool7 ug_A1B2C3_1796013191_pool7
      Volume group "ug_A1B2C3_1796013191_pool7" successfully changed
    $ lvrename --devices=/dev/md2 ug_A1B2C3_1796013191_pool7 volume_1 volume7
      Renamed "volume_1" to "volume7" in volume group "ug_A1B2C3_1796013191_pool7"
    $ lvchange --devices=/dev/md2 --addtag /volume7 ug_A1B2C3_1796013191_pool7/volume7
      Logical volume ug_A1B2C3_1796013191_pool7/volume7 changed.
    $ lvrename --devices=/dev/md2 ug_A1B2C3_1796013191_pool7 volume_2 volume8
      Renamed "volume_2" to "volume8" in volume group "ug_A1B2C3_1796013191_pool7"
    $ lvchange --devices=/dev/md2 --addtag /volume8 ug_A1B2C3_1796013191_pool7/volume8
      Logical volume ug_A1B2C3_1796013191_pool7/volume8 changed.
    $ vgchange --devices=/dev/md2 -ay ug_A1B2C3_1796013191_pool7
      3 logical volume(s) in volume group "ug_A1B2C3_1796013191_pool7" now active
    $ mount -o ro,subvolid=5 /dev/ug_A1B2C3_1796013191_pool7/volume7 /mnt/syno-ugreen
    checked 26/262 sampled files
    OK: 262 sampled files identical; 1 subvolumes and data bytes used unchanged (after rename)
    $ umount /mnt/syno-ugreen
    $ mount -o ro /dev/ug_A1B2C3_1796013191_pool7/volume8 /mnt/syno-ugreen
    checked 45/283 sampled files
    checked 46/283 sampled files
    checked 49/283 sampled files
    checked 61/283 sampled files
    OK: 283 sampled files identical (after rename)
    $ umount /mnt/syno-ugreen

==> Phase 2 done (storage_serv.service stays STOPPED until phase4). Next: phase3

root@DXP4800PRO-NAS:~# $S phase3
==> Phase 3: rename md to UGREEN-DATA-x86_64-123456, name partitions, label each volume pool7, enable ugacl

Reassemble /dev/md2 as UGREEN-DATA-x86_64-123456, set partition names to 'primary', label each volume pool7 and turn on UGOS's filesystem features (ugacl; for ext4 also dir_index, quota and project; rollback turns them off)?
    Type yes to continue: yes
    $ vgchange --devices=/dev/md2 -an ug_A1B2C3_1796013191_pool7
      0 logical volume(s) in volume group "ug_A1B2C3_1796013191_pool7" now active
    $ mdadm --stop /dev/md2
      mdadm: stopped /dev/md2
    $ mdadm --assemble /dev/md2 --update=name --name=UGREEN-DATA-x86_64-123456 /dev/sda5 /dev/sdb5 /dev/sdc5
      mdadm: /dev/md2 has been started with 3 drives.
    OK: all 3 members named UGREEN-DATA-x86_64-123456
    /dev/sda5: "dos" partition table, which has no partition names - skipped
    /dev/sdb5: "dos" partition table, which has no partition names - skipped
    /dev/sdc5: "dos" partition table, which has no partition names - skipped
    $ udevadm settle
    $ vgchange --devices=/dev/md2 -ay ug_A1B2C3_1796013191_pool7
      3 logical volume(s) in volume group "ug_A1B2C3_1796013191_pool7" now active
    $ btrfs filesystem label /dev/ug_A1B2C3_1796013191_pool7/volume7 pool7
    $ btrfstune --ugacl 1 /dev/ug_A1B2C3_1796013191_pool7/volume7
    OK: volume7: label pool7, UGOS features on (ugacl turned on now)
    $ e2label /dev/ug_A1B2C3_1796013191_pool7/volume8 pool7
    $ tune2fs -O dir_index /dev/ug_A1B2C3_1796013191_pool7/volume8
      tune2fs 1.47.0 (5-Feb-2023)
    $ tune2fs -O '^dir_index' /dev/ug_A1B2C3_1796013191_pool7/volume8
      tune2fs 1.47.0 (5-Feb-2023)
    WARN: /dev/ug_A1B2C3_1796013191_pool7/volume8: its directory indexes don't match a UGOS kernel's (Problem in HTREE directory inode 393245: block #1 has bad max hash) - dir_index left off; the kernel then ignores them and reads those directories in full
    $ tune2fs -O ugacl /dev/ug_A1B2C3_1796013191_pool7/volume8
      tune2fs 1.47.0 (5-Feb-2023)
    $ tune2fs -O quota,project -Q usrquota,grpquota,prjquota /dev/ug_A1B2C3_1796013191_pool7/volume8
      tune2fs 1.47.0 (5-Feb-2023)
    OK: volume8: label pool7, UGOS features on (ugacl, quota, project turned on now)
    $ mount -o ro,subvolid=5 /dev/ug_A1B2C3_1796013191_pool7/volume7 /mnt/syno-ugreen
    checked 26/262 sampled files
    OK: 262 sampled files identical; 1 subvolumes and data bytes used unchanged (after rename/label)
    $ umount /mnt/syno-ugreen
    $ mount -o ro /dev/ug_A1B2C3_1796013191_pool7/volume8 /mnt/syno-ugreen
    checked 45/283 sampled files
    checked 46/283 sampled files
    checked 50/283 sampled files
    checked 61/283 sampled files
    OK: 283 sampled files identical (after rename/label)
    $ umount /mnt/syno-ugreen

==> Phase 3 done. Next: phase4

root@DXP4800PRO-NAS:~# $S phase4
==> Phase 4: register pool7 in UGOS and let it assemble + mount
    pool:   name=pool7 md_uuid=11111111:22222222:33333333:44444444 md_name=UGREEN-DATA-x86_64-123456 level=raid5 array_size=195693641728 raid_devices=3 array_version=1.2
            members=[{"disk_id":7,"dev_ext":"5"},{"disk_id":8,"dev_ext":"5"},{"disk_id":11,"dev_ext":"5"}]
            vg_name=ug_A1B2C3_1796013191_pool7 vg_tags=ug_A1B2C3_1796013191_pool7 vg_uuid=AAAAAA-AAAA-AAAA-AAAA-AAAA-AAAA-AAAAA7 vg_size=195689447424
    volume: name=volume7 lv_name=volume7 lv_uuid=BBBBBB-BBBB-BBBB-BBBB-BBBB-BBBB-BBBBB7 lv_host=DXP4800PRO-NAS
            lv_tags=/volume7 mnt_point=/volume7 lv_size=187086929920
            extra={"filesystem":"btrfs","fsuuid":"77777777-7777-7777-7777-777777777777","setting":{"capacity_notify":{"percent":10}}}
    volume: name=volume8 lv_name=volume8 lv_uuid=BBBBBB-BBBB-BBBB-BBBB-BBBB-BBBB-BBBBB8 lv_host=DXP4800PRO-NAS
            lv_tags=/volume8 mnt_point=/volume8 lv_size=8589934592
            extra={"filesystem":"ext4","fsuuid":"88888888-8888-8888-8888-888888888888","setting":{"capacity_notify":{"percent":10}}}
    existing pool2 for comparison:
                  id = 2
                name = pool2
             md_uuid = aaaaaaaa:bbbbbbbb:cccccccc:dddddddd
             md_name = UGREEN-DATA-x86_64-123456
               level = raid10
          array_size = 7991698522112
        raid_devices = 4
       array_version = 1.2
             members = [{"disk_id":5,"dev_ext":"3"},{"disk_id":4,"dev_ext":"3"},{"disk_id":6,"dev_ext":"3"},{"disk_id":3,"dev_ext":"3"}]
             vg_name = ug_A1B2C3_1795489559_pool2
             vg_size = 7991692623872
             vg_tags = ug_A1B2C3_1795489559_pool2
             vg_uuid = AAAAAA-AAAA-AAAA-AAAA-AAAA-AAAA-AAAAA2
               extra = {}

                  id = 2
                name = volume2
             vg_name = ug_A1B2C3_1795489559_pool2
             lv_name = volume2
             lv_uuid = BBBBBB-BBBB-BBBB-BBBB-BBBB-BBBB-BBBBB2
             lv_host = DXP4800PRO-NAS
             lv_tags = /volume2
             lv_size = 7991692623872
             pool_id = 2
           mnt_point = /volume2
               extra = {"filesystem":"btrfs","fsuuid":"22222222-2222-2222-2222-222222222222","setting":{"capacity_notify":{"percent":10}},"is_home":true}


Back up /etc/nas_storage/storage_db.db, insert these rows, then start storage_serv.service?
    Type yes to continue: yes
    OK: database backed up to /root/syno-ugreen/11111111222222223333333344444444/storage_db.db.20261129-205353
    OK: rows inserted
    $ vgchange --devices=/dev/md2 -an ug_A1B2C3_1796013191_pool7
      0 logical volume(s) in volume group "ug_A1B2C3_1796013191_pool7" now active
    $ mdadm --stop /dev/md2
      mdadm: stopped /dev/md2
    $ systemctl start storage_serv.service

==> Waiting for ugvolume to assemble and mount pool7
      storage_serv_ugvolume[447922]: ERROR 2026-11-29 20:53:55.523402 storage_serv/job/ugvolume/private.go:245 raiddevice.RaidAssemble(raid:/dev/md1,disks:[]) error: empty disk list#012storage_serv/internal/raiddevice/mdadm.Ra...
      storage_serv_ugvolume[447922]: ERROR 2026-11-29 20:53:55.523489 storage_serv/job/ugvolume/private.go:245 raiddevice.RaidAssemble(raid:/dev/md1,disks:[]) error: empty disk list#012storage_serv/internal/raiddevice/mdadm.Ra...
      storage_serv_ugvolume[447922]: INFO 2026-11-29 20:53:55.523499 storage_serv/job/ugvolume/private.go:216 start process pool[6]pool7 level raid5 rDevices 3 with 2 volumes
      storage_serv_ugvolume[447922]: INFO 2026-11-29 20:53:55.681884 storage_serv/job/ugvolume/private.go:251 pool[pool7] /dev/md1 assemble by 3 disks
      storage_serv_ugvolume[447922]: INFO 2026-11-29 20:53:56.043547 storage_serv/job/ugvolume/private.go:410 pool[pool7] volume[volume7] mntPath /volume7 has mounted at /volume7
      storage_serv_ugvolume[447922]: INFO 2026-11-29 20:53:56.138063 storage_serv/job/ugvolume/private.go:410 pool[pool7] volume[volume8] mntPath /volume8 has mounted at /volume8
    OK: UGOS assembled pool7 and mounted volume7 at /volume7
    OK: UGOS assembled pool7 and mounted volume8 at /volume8

==> Enabling btrfs quota on /volume7 (UGOS's file manager needs it for shared folders)
    $ btrfs quota enable /volume7
    $ btrfs qgroup clear-stale /volume7

==> Done. Check UGOS > Storage, then reboot once to confirm. Recommended: btrfs scrub start -r /volume7

After the test conversion, I always verify the data isn’t corrupted:

root@DXP4800PRO-NAS:~# ./make-test-data-linux-amd64 verify /volume7 /volume8
==> /volume
      356/5113 MiB      8/17182 files  186.5 MB/s  testdata/large/64m-1.bin
      636/5113 MiB      8/17182 files  166.6 MB/s  testdata/large/64m-1.bin
      940/5113 MiB     10/17182 files  164.2 MB/s  testdata/large/64m-11.bin
     1244/5113 MiB     11/17182 files  163.0 MB/s  testdata/large/64m-12.bin
     1598/5113 MiB     13/17182 files  167.5 MB/s  testdata/large/64m-14.bin
     1924/5113 MiB     15/17182 files  168.1 MB/s  testdata/large/64m-2.bin
     2279/5113 MiB     18/17182 files  170.7 MB/s  testdata/large/64m-5.bin
     2606/5113 MiB     26/17182 files  170.8 MB/s  testdata/medium/m-100.bin
     3003/5113 MiB     46/17182 files  175.0 MB/s  testdata/medium/m-119.bin
     3388/5113 MiB    130/17182 files  177.7 MB/s  testdata/medium/m-195.bin
     3806/5113 MiB    162/17182 files  181.4 MB/s  testdata/medium/m-223.bin
     4171/5113 MiB    326/17182 files  182.2 MB/s  testdata/medium/m-371.bin
     4521/5113 MiB    466/17182 files  182.3 MB/s  testdata/medium/m-498.bin
     4856/5113 MiB    800/17182 files  181.9 MB/s  testdata/small/d0/s-10496.dat
     4871/5113 MiB   1715/17182 files  170.3 MB/s  testdata/small/d11/s-4299.dat
     4891/5113 MiB   3008/17182 files  160.3 MB/s  testdata/small/d16/s-5008.dat
     4907/5113 MiB   4009/17182 files  151.3 MB/s  testdata/small/d2/s-3714.dat
     4919/5113 MiB   4783/17182 files  143.3 MB/s  testdata/small/d22/s-4054.dat
     4938/5113 MiB   5975/17182 files  136.3 MB/s  testdata/small/d27/s-13723.dat
     4957/5113 MiB   7228/17182 files  130.0 MB/s  testdata/small/d31/s-12191.dat
     4976/5113 MiB   8419/17182 files  124.2 MB/s  testdata/small/d35/s-7075.dat
     4997/5113 MiB   9750/17182 files  119.1 MB/s  testdata/small/d4/s-9988.dat
     5015/5113 MiB  10940/17182 files  114.3 MB/s  testdata/small/d44/s-4716.dat
     5037/5113 MiB  12337/17182 files  110.0 MB/s  testdata/small/d5/s-1157.dat
     5057/5113 MiB  13617/17182 files  106.1 MB/s  testdata/small/d54/s-11510.dat
     5071/5113 MiB  14522/17182 files  102.3 MB/s  testdata/small/d57/s-4665.dat
     5093/5113 MiB  15924/17182 files   98.9 MB/s  testdata/small/d62/s-11710.dat
    OK: 17182 files match
==> /volume8
      272/5113 MiB      9/17182 files  142.5 MB/s  testdata/large/64m-10.bin
      542/5113 MiB      9/17182 files  142.0 MB/s  testdata/large/64m-10.bin
      805/5113 MiB      9/17182 files  140.6 MB/s  testdata/large/64m-10.bin
     1027/5113 MiB     10/17182 files  134.6 MB/s  testdata/large/64m-11.bin
     1284/5113 MiB     11/17182 files  134.6 MB/s  testdata/large/64m-12.bin
     1505/5113 MiB     12/17182 files  131.5 MB/s  testdata/large/64m-13.bin
     1739/5113 MiB     14/17182 files  130.2 MB/s  testdata/large/64m-15.bin
     2006/5113 MiB     15/17182 files  131.5 MB/s  testdata/large/64m-2.bin
     2254/5113 MiB     18/17182 files  131.3 MB/s  testdata/large/64m-5.bin
     2518/5113 MiB     21/17182 files  132.0 MB/s  testdata/large/64m-8.bin
     2829/5113 MiB     32/17182 files  134.9 MB/s  testdata/medium/m-106.bin
     3103/5113 MiB    111/17182 files  135.6 MB/s  testdata/medium/m-178.bin
     3394/5113 MiB    151/17182 files  136.9 MB/s  testdata/medium/m-213.bin
     3767/5113 MiB    305/17182 files  141.1 MB/s  testdata/medium/m-352.bin
     4069/5113 MiB    367/17182 files  142.2 MB/s  testdata/medium/m-408.bin
     4331/5113 MiB    397/17182 files  141.9 MB/s  testdata/medium/m-435.bin
     4649/5113 MiB    590/17182 files  143.4 MB/s  testdata/medium/m-609.bin
     4864/5113 MiB   1257/17182 files  141.7 MB/s  testdata/small/d1/s-7361.dat
     4880/5113 MiB   2265/17182 files  134.7 MB/s  testdata/small/d13/s-653.dat
     4906/5113 MiB   3924/17182 files  128.6 MB/s  testdata/small/d2/s-13506.dat
     4924/5113 MiB   5066/17182 files  122.9 MB/s  testdata/small/d23/s-5591.dat
     4946/5113 MiB   6472/17182 files  117.9 MB/s  testdata/small/d29/s-12829.dat
     4966/5113 MiB   7785/17182 files  113.2 MB/s  testdata/small/d33/s-14817.dat
     4989/5113 MiB   9236/17182 files  109.0 MB/s  testdata/small/d38/s-9894.dat
     5011/5113 MiB  10685/17182 files  105.1 MB/s  testdata/small/d43/s-4779.dat
     5030/5113 MiB  11900/17182 files  101.4 MB/s  testdata/small/d48/s-1584.dat
     5050/5113 MiB  13155/17182 files   98.1 MB/s  testdata/small/d52/s-14388.dat
     5066/5113 MiB  14207/17182 files   94.9 MB/s  testdata/small/d56/s-15992.dat
     5091/5113 MiB  15792/17182 files   92.1 MB/s  testdata/small/d61/s-4093.dat
     5113/5113 MiB  17176/17182 files   89.4 MB/s  testdata/small/d9/s-9993.dat
    OK: 17182 files match

Conclusion

All in all, creating syno-ugreen, buying test SSDs, shucking a USB HDD, testing the tool, releasing the code, writing this post about it, was much more involved than Plan A and took many days during Thanksgiving week. [2]

But, it was a lot of fun.

I hope this tool can save someone from many hours of copying.


1. While you don’t necessarily need to plug drives in the same order, why take the chance? Numbering is also useful when, like me, you have a RAID 10 setup, and want to test syno-ugreen on one set of the RAID 0 making up the RAID 10.
2. In reality my data was fully migrated to the UGREEN NAS around 50 minutes after I first prompted AI.