Jump to content
XPEnology Community

Expand/resize btrfs Syno volume after disk space increased (ESXI, Hyper-V, ....))


Kall

Recommended Posts

Hi guys,

 

For some of you who wish to expand btrfs Syno volume after disk space increased.

 

Before:

df -Th
btrfs fi show
mdadm --detail /dev/md2

 

SSH commands:

syno_poweroff_task -d
mdadm --stop /dev/md2
parted /dev/sda resizepart 3 100%
mdadm --assemble --update=devicesize /dev/md2 /dev/sda3
mdadm --grow /dev/md2 --size=max
reboot
btrfs filesystem resize max /dev/md2

 

After:

df -Th
btrfs fi show
mdadm --detail /dev/md2

 

Voila

Kall

Edited by Polanskiman
Added proper code tags. Please use them in the future.
  • Like 2
Link to comment
Share on other sites

1 hour ago, Polanskiman said:

Hello. How is this a question? I am moving this topic from the General Questions section to the Tutorials and Guides section of the forum. Also in the future please use proper code tags.

Your right!, Thanks

Kall

Link to comment
Share on other sites

  • 1 month later...
On 5/31/2019 at 3:59 PM, Kall said:

Hi guys,

 

For some of you who wish to expand btrfs Syno volume after disk space increased.

 

Before:


df -Th

btrfs fi show

mdadm --detail /dev/md2

 

SSH commands:


syno_poweroff_task -d

mdadm --stop /dev/md2

parted /dev/sda resizepart 3 100%

mdadm --assemble --update=devicesize /dev/md2 /dev/sda3

mdadm --grow /dev/md2 --size=max

reboot

btrfs filesystem resize max /dev/md2

 

After:


df -Th

btrfs fi show

mdadm --detail /dev/md2

 

Voila

Kall

FANTASTIC!!

 

Thanks for your feed!

 

Xtian

Link to comment
Share on other sites

  • 3 months later...
On 5/31/2019 at 9:59 AM, Kall said:

mdadm --grow /dev/md2 --size=max

 

@Kall So after this command I get an error that the type of array cannot have its size adjusted/expanded but if I follow the rest of the steps anyway, it all seems to work and the volume is expanded. What is this non-working command actually supposed to do and do I have any side effects of not being able to use it?

 

EDIT: I was using JBOD mode with a single disk on the volume I tried this with. Confirming that trying this on a Basic mode volume, the above command works and returns a normal output. So I guess on JBOD volumes this command doesn't do anything. That being said, is Basic or JBOD better performing with 1 disk?

Edited by ilovepancakes
Link to comment
Share on other sites

  • 6 months later...

Kall that looks to be a pain in the butt. 

 

On VMware you might as well make the .VMDK thin provisioned.  Make the VMDK disk size the max your storage will support, i.e. if you have 30TB of space on it use 80% or 24TB and then on the DSM Volume configure that to what you need for the moment, i.e. Allocate Size 1000GB.  In this way if you need to allocate more space on that Volume you just re configure the volume and key in the new Allocate size you need. 

 

The Pool could be Basic(one disk ), JBOD(two or more disks) or RAID0(two or more disks).  I really thing with VMware it will not matter the number of disks as you do not have multiple virtual SAS/SCSI controllers to spread the IO across.

Link to comment
Share on other sites

  • 3 months later...

Hello!

 

I just expand a vmdk in a virtual Xpenology (a simple basic volume).

The instructions are working very good besides two little differences:

 

1. After "mdadm --grow /dev/md2 --size=max" I have to use "lvextend -l +100%FREE /dev/vg1/volume_1" to grow the volume itself.

2. "btrfs filesystem resize max ..." does not work for me. I have to use "Storage Manager - Volume - Action - Expand" instead in DSM itself.

 

But after all, the expanding works very well.

Thanks very much for the information! :-)

Link to comment
Share on other sites

  • 2 years later...

Hey guys,

i know this topic is quite old, but i also like to extend my volume on DSM 7.1.1. Unfortunately the command "syno_poweroff_task -d" isn't available anymore in DSM 7. I have found something similar, but it's still not working for me. It's this one: "synostgvolume --unmount -p volume1".

When i then try to run "mdadm --stop /dev/md2", it tells me "mdadm: Cannot get exclusive access to /dev/md2:Perhaps a running process, mounted filesystem or active volume group?".

Do you guys know any solution for that?

Thank you very much!

 

With kind regards,

Burny

Link to comment
Share on other sites

On 12/22/2022 at 4:11 AM, Burny said:

Hey guys,

i know this topic is quite old, but i also like to extend my volume on DSM 7.1.1. Unfortunately the command "syno_poweroff_task -d" isn't available anymore in DSM 7. I have found something similar, but it's still not working for me. It's this one: "synostgvolume --unmount -p volume1".

When i then try to run "mdadm --stop /dev/md2", it tells me "mdadm: Cannot get exclusive access to /dev/md2:Perhaps a running process, mounted filesystem or active volume group?".

Do you guys know any solution for that?

Thank you very much!

 

With kind regards,

Burny

 I ran into this same issue and I just skipped the `mdadm --stop` command.

 

Also after you reboot you will have to expand the filesystem via the gui since in 7.1.1 it seems like the `brtfs` command is missing in the cli.

Link to comment
Share on other sites

  • 6 months later...
On 12/22/2022 at 11:11 AM, Burny said:

Hey guys,

i know this topic is quite old, but i also like to extend my volume on DSM 7.1.1. Unfortunately the command "syno_poweroff_task -d" isn't available anymore in DSM 7. I have found something similar, but it's still not working for me. It's this one: "synostgvolume --unmount -p volume1".

When i then try to run "mdadm --stop /dev/md2", it tells me "mdadm: Cannot get exclusive access to /dev/md2:Perhaps a running process, mounted filesystem or active volume group?".

Do you guys know any solution for that?

Thank you very much!

 

With kind regards,

Burny

 

I'm on the same boat !

 

Any one done it on DSM 7.1 ?

 

I also tried to skipp the `mdadm --stop` command as @cwiggs mentioned but no luck! 

 

 

 

Link to comment
Share on other sites

4 часа назад, Oliveiras сказал:

Any one done it on DSM 7.1 ?

Do you use virtual disks in ESXi for the DSM virtual machine? How did you manage to increase its size?

And why don't you want to do it in a simple way: make a backup - delete the old disk - add a new disk - restore from backup?

Link to comment
Share on other sites

17 hours ago, dj_nsk said:

Do you use virtual disks in ESXi for the DSM virtual machine? How did you manage to increase its size?

And why don't you want to do it in a simple way: make a backup - delete the old disk - add a new disk - restore from backup?

 

I'm using proxmox but the principles are the same.

I'm not trying to expand data volumes, it's the main system drive because a docker container fill the drive with logs.

So I cannot copy the xpenology system volume to other drive.

Link to comment
Share on other sites

4 часа назад, Oliveiras сказал:

 

I'm using proxmox but the principles are the same.

I'm not trying to expand data volumes, it's the main system drive because a docker container fill the drive with logs.

So I cannot copy the xpenology system volume to other drive.

then it's not clear at all - what kind of problem are you solving with using mdadm??

Link to comment
Share on other sites

21 hours ago, dj_nsk said:

then it's not clear at all - what kind of problem are you solving with using mdadm??

 

I need to expand volume 1 that includes base system files:

 

/dev/mapper/cachedev_1 btrfs      21G   21G     0 100% /volume1

 

Label: '2023.01.15-18:30:06 v42962'  uuid: 2b590ef9-e408-48dd-bed5-e407b5b9bff2
        Total devices 1 FS bytes used 20.13GiB
        devid    1 size 21.00GiB used 21.00GiB path /dev/mapper/cachedev_1
 

The comands mentioned on this topic don't work on DSM 7.1

Link to comment
Share on other sites

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...