Synology Rename Volume and Storage Pool

  This is a Synology NAS tutorial for those who need to rename the Storage Pool and Volume, for the following situations:

  • Obsessive-Compulsive Disorder
  • Restore
  • Migrate
  • Other reasons

Only used for DSM 6, no longer available on DSM 7

You can find other languages here: 简体中文English

Usage Notice

  Be sure to read the full operation afterwards and make sure you have the following knowledge:

  • Familiar with the Synology DSM system
  • Skilled Linux operation and maintenance technology
  • Understand the principle of RAID
  • Understand the principle of LVM
  • Understand that data is priceless

Preparation

  1. Backup involves data in the Volume that needs to be modified(if you are willing to take on a small risk, you can skip this step)
  2. Enable SSH service(Control Panel->Terminal & SNMP->Terminal->Enable SSH service)
  3. Connect to Synology NAS using your favorite SSH client
  4. Upgrade to root privileges
1
sudo su root

Rename Storage Pool

  Modify Storage Pool order is very safety and theoretically does not cause data loss or system crashes because the Storage Pool is just a logical name. If you only need to rename the Storage Pool, you needn’t backup the data.

  1. View Storage Pool list
1
2
3
4
5
6
7
8
9
synospace --meta -e
> [/dev/md3]
> ---------------------
> Descriptions=[Seagate IronWolf 6T Basic]
> Reuse Space ID=[reuse_2]
> [/dev/md2]
> ---------------------
> Descriptions=[Seagate IronWolf 4T Basic]
> Reuse Space ID=[reuse_1]
  1. Rename Storage Pool

  Command: synospace --meta -s -d "{Description}" -i reuse_{ID} {Device path}
  For example, to renumber [Storage Pool 2] to [Storage Pool 3], enter the following command:

1
2
synospace --meta -s -d "Seagate IronWolf 6T Basic" -i reuse_3 /dev/md3
> success to set meta (Seagate IronWolf 6T Basic,reuse_3) into space [/dev/md3]

  Note: You can specify the command without -d parameter, so the storage pool description will be cleared, but you can modify the storage pool description in DSM at any time(Storage Manager->Storage Pool->Action->Change Settings).

  1. The new Storage Pool order can be found in DSM.

Rename Volume

  After renamed the Volume, the iSCSI service may fail to be started. Restarting the iSCSI target can fix it, and maybe there are other unknown problems. Therefore, you need to pay attention to data backup.

  1. Stop all Docker containers
  2. Stop all DSM services, this command may be executed for a while, be patient
1
syno_poweroff_task -d
  1. Check if the Storage Pool where the Volume located supports Multiple volume support(Storage Manager->Storage Pool)

  For Multiple volume support Storage Pool, Synology sets the disk partition to an LVM PV (Physical Volume) and creates a VG (Volume Group) on this PV, so multiple LV (Logical Volume) can be created on this VG, you can also freely adjust the size of these LV. so modify the name of the LV to achieve the purpose of modifying the Volume order.

  1. View Volume list
1
2
3
4
lvm lvscan
> ACTIVE '/dev/vg1/syno_vg_reserved_area' [12.00 MiB] inherit
> ACTIVE '/dev/vg1/volume_2' [256.00 GiB] inherit
> ACTIVE '/dev/vg1/volume_3' [1.00 TiB] inherit
  1. Rename Volume

  Command: lvm lvrename {VG name} {old LV name} {new LV name}
  Fox example, to renumber [Volume 2] to [Volume 3] and [Volume 3] to [Volume 4], enter the following command:

1
2
3
4
lvm lvrename vg1 volume_3 volume_4
> Renamed "volume_3" to "volume_4" in volume group "vg1"
lvm lvrename vg1 volume_2 volume_3
> Renamed "volume_2" to "volume_3" in volume group "vg1"

  For a Storage Pool that does not Multiple volume support, Synology directly create Volume on disk partition, so you cannot resize or add multiple Volume. For this we directly modify the number inside the system.

  1. View Volume list
1
2
3
4
5
6
7
8
9
spacetool --synoblock-enum
> ****** Syno-Block of /dev/sda ******
> Version: 5
> Space Type: Volume
> Space Path: /volume1
>****** Syno-Block of /dev/sdb ******
> Version: 5
> Space Type: Volume
> Space Path: /volume2
  1. Rename Volume

  Command: synospace --synoblock -s {Device path} -v volume_{id}
  For example, to swap [Volume 1] and [Volume 2], enter the following command:

1
2
3
4
5
synospace --synoblock -s /dev/sda -v volume_2
> success to set syno-block on disk '/dev/sda'

synospace --synoblock -s /dev/sdb -v volume_1
> success to set syno-block on disk '/dev/sdb'
  1. Reboot(DSM services had been killed, so you need execute reboot command)
  2. Shared folders and iSCSI services should be automatically modified and checking all you services are running correctly

References