Jump to content
XPEnology Community

Tutorial: How to resize (expand) a Basic Storage pool type on the Proxmox VM


Recommended Posts

Posted (edited)

Tested on the Synology DSM 7.2.1-69057 Update 5 with bootloader RR (https://github.com/RROrg/rr/releases/download/24.8.4/rr-24.8.4.ova.zip)

 

Expanding (disk, drive, volume) of DSM Storage Pool type "Basic" with Volume on the /dev/md3 and ext4 filesystem with following steps:

 

# Make sure you have a fresh VM backup for restoring volume on fail

 

# Warning! Don't use fdisk method because you will lost original disk UUIDs and LABELs after delete and re-create partition with new size in fdisk. I tested this and restored broken volume from backup

 

# power off DSM VM

 

# increase VM disk size with Proxmox GUI or console tools 

 

# if you use LVM for virtual machine drives, activate volume, which was deactivated after VM powering off
lvchange -ay /dev/vg0/vm-200-disk-2

 

# install parted on the proxmox server
apt install parted

 

# begin resize with parted

parted /dev/vg0/vm-200-disk-2
GNU Parted 3.5
Using /dev/dm-2
Welcome to GNU Parted! Type 'help' to view a list of commands.

 

# pint current partition table
(parted) p
Model: Linux device-mapper (linear) (dm)
Disk /dev/dm-2: 53.7GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system     Flags
 1      1049kB  2551MB  2550MB  primary  ext4            raid
 2      2551MB  4699MB  2147MB  primary  linux-swap(v1)  raid
 3      4832MB  10.6GB  5801MB  primary                  raid

 

# resize prtition 3 for maximum available space 

(parted) resizepart 3 100%

 

# pint NEW partition table
(parted) p
Model: Linux device-mapper (linear) (dm)
Disk /dev/dm-2: 53.7GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system     Flags
 1      1049kB  2551MB  2550MB  primary  ext4            raid
 2      2551MB  4699MB  2147MB  primary  linux-swap(v1)  raid
 3      4832MB  53.7GB  48.9GB  primary                  raid

(parted)

 

# exit from parted

 

# boot dsm VM and connect via ssh

 

# check if md3 is still healthy (it was not when I used fdisk method)

root@DSM-AG:~# cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 sdc3[0]
      1068919808 blocks super 1.2 [1/1] [U]

md3 : active raid1 sdb3[0]
      5663744 blocks super 1.2 [1/1] [U]

md1 : active raid1 sdb2[0] sdc2[1]
      2097088 blocks [12/2] [UU__________]

md0 : active raid1 sdb1[0] sdc1[1]
      2490176 blocks [12/2] [UU__________]

unused devices: <none>

 

# check a current /dev/md3 size (/volume2)
root@DSM-AG:~# df -h
Filesystem              Size  Used Avail Use% Mounted on
/dev/md0                2.3G  1.6G  598M  73% /
devtmpfs                1.9G     0  1.9G   0% /dev
tmpfs                   2.0G  124K  2.0G   1% /dev/shm
tmpfs                   2.0G   15M  1.9G   1% /run
tmpfs                   2.0G     0  2.0G   0% /sys/fs/cgroup
tmpfs                   2.0G  1.2M  2.0G   1% /tmp
/dev/mapper/cachedev_0  5.2G  3.9G  1.2G  77% /volume2
/dev/mapper/cachedev_1  979G  373G  584G  39% /volume1

 

# grow /dev/md3 device
root@DSM-AG:~# mdadm --grow /dev/md3 --size=max
mdadm: component size of /dev/md3 has been set to 47709184K

 

# size is still old
root@DSM-AG:~# df -h
Filesystem              Size  Used Avail Use% Mounted on
/dev/md0                2.3G  1.6G  598M  74% /
devtmpfs                1.9G     0  1.9G   0% /dev
tmpfs                   2.0G  124K  2.0G   1% /dev/shm
tmpfs                   2.0G   16M  1.9G   1% /run
tmpfs                   2.0G     0  2.0G   0% /sys/fs/cgroup
tmpfs                   2.0G  1.2M  2.0G   1% /tmp
/dev/mapper/cachedev_0  5.2G  3.9G  1.2G  77% /volume2
/dev/mapper/cachedev_1  979G  373G  584G  39% /volume1

 

# go to DSM Storage Manager and check for message at the Info secion of Storage Pool and click "expand now" link
The system detected an incomplete volume expansion. Click expand now to modify the size of Volume 2 to 45.5 GB

 

 

# done
The system successfully expanded the capacity of .

 

# a new size is 45G
root@DSM-AG:~# df -h
Filesystem              Size  Used Avail Use% Mounted on
/dev/md0                2.3G  1.6G  598M  74% /
devtmpfs                1.9G     0  1.9G   0% /dev
tmpfs                   2.0G  124K  2.0G   1% /dev/shm
tmpfs                   2.0G   16M  1.9G   1% /run
tmpfs                   2.0G     0  2.0G   0% /sys/fs/cgroup
tmpfs                   2.0G  1.2M  2.0G   1% /tmp
/dev/mapper/cachedev_0   45G  4.0G   41G   9% /volume2
/dev/mapper/cachedev_1  979G  373G  584G  39% /volume1

 

# Attached screenshots of before and after mdadm --grow

 

 

DSM-AG - Synology DiskStation 2024-08-27 14-04-27.png

 

DSM-AG - Synology DiskStation 2024-08-27 14-39-39.png

Edited by blessendor
rename subj
  • blessendor changed the title to Tutorial: How to resize (expand) a Basic Storage pool type on the Proxmox VM

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...