The storage pool has been expanded, but the volume cannot be expanded?

Hard Drive, volume, storage pool, RAID
Post Reply
User avatar
TMzethar
TerraMaster Team
Posts: 1128
Joined: 27 Oct 2020, 16:43

The storage pool has been expanded, but the volume cannot be expanded?

Post by TMzethar »

Troubleshooting

Applicable model:All TNAS
Applicable version:TOS 4.1.x & TOS 4.2.x & TOS 5.x

Follow the instructions to resolve this issue:

1. login in ssh. How to log in to the SSH terminal?

2. Modifying Storage Settings
The following example is based on Storage Pool1,Volume1(md0, vg0, lv0)
Your "Storage Pool, Volume" may be different.
Please use the following instructions to confirm:

Code: Select all

[root@TNAS-???? ~]# lsblk
Let's start modifying the storage Settings. Press Enter after entering each command:
TOS 4.1.x & TOS 4.2.x:

Code: Select all

[root@TNAS-???? ~]# mdadm --grow /dev/md0 --size=max
[root@TNAS-???? ~]# umount /mnt/md0
[root@TNAS-???? ~]# umount /home
[root@TNAS-???? ~]# vgchange -an vg0
[root@TNAS-???? ~]# pvresize /dev/md0
[root@TNAS-???? ~]# vgchange -ay vg0
[root@TNAS-???? ~]# lvextend -l +100%FREE /dev/vg0/lv0
TOS 5.x:

Code: Select all

[root@TNAS-???? ~]# mdadm --grow /dev/md0 --size=max
[root@TNAS-???? ~]# umount /Volume1
[root@TNAS-???? ~]# umount /home
[root@TNAS-???? ~]# vgchange -an vg0
[root@TNAS-???? ~]# pvresize /dev/md0
[root@TNAS-???? ~]# vgchange -ay vg0
[root@TNAS-???? ~]# lvextend -l +100%FREE /dev/vg0/lv0
If the prompt "Target is busy", Please cancel the occupancy of the volume by the service processes, disable the SSD cache (if no SSD cache, please ignore it), and then execute the command above again.
TOS 4.1.x & TOS 4.2.x:

Code: Select all

[root@TNAS-???? ~]# fuser -mk /mnt/md0
TOS 5.x:

Code: Select all

[root@TNAS-???? ~]# fuser -mk /Volume1
3. Adjust the file system size
You need to know the file system of your volume first (btrfs/ext4):

Code: Select all

[root@TNAS-???? ~]# blkid /dev/vg0/lv0
Select commands to execute based on the type of file system you have learned previously:

btrfs

Code: Select all

[root@TNAS-???? ~]# /etc/tos/script/mntdata
[root@TNAS-???? ~]# btrfs filesystem resize max /mnt/md0
You should see the storage value slowly increase. After a few ten seconds, the process will be finished.


ext4

Code: Select all

[root@TNAS-???? ~]# resize2fs /dev/mapper/vg0-lv0
You should see the storage value slowly increase. After a few ten seconds, the process will be finished. Then execure the conmmand to mount:

Code: Select all

[root@TNAS-???? ~]# /etc/tos/script/mntdata
To contact our team, please send email to following addresses, remember to replace (at) with @:
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
splaquet
Posts: 13
Joined: 30 Jun 2020, 23:02

Re: The storage pool has been expanded, but the volume cannot be expanded?

Post by splaquet »

does this process work for when you're trying to remove a drive from the RAID Array?

I recently purchased 2, 12TB drives, replacing 3, 3TB drives.

1) I swapped out 1, 12TB for 1, 3TB and repaired. I then let that resync, etc.

2) I did the same for the 2nd 12TB drive, the next day.

3) On the third day, I wanted to remove the last 3TB drive, so that my RAID array storage size could expand and take advantage of this new storage space.

BUT, when I went to Control Panel > Volume > Edit... clicking CONFIRM isn't doing anything this time. I say "this time", because I'm pretty sure these were the same steps I took to swap out the larger drives on steps 1 & 2.

4) I'd ideally like to replace that last drive with an SSD, to take advantage of the SSD caching feature... but, I'm really at a loss as to what to do next.

I've easily been able to find how to expand/add a drive to the RAID array, but I'm not able to find any info on how to remove a drive from a RAID5 array.

Any help would be GREATLY appreciated! (because, I'm really getting sick of seeing my TimeMachine warnings, telling me that there isn't enough space to make a backup 😉)
User avatar
TMroy
TerraMaster Team
Posts: 2578
Joined: 10 Mar 2020, 14:04
China

Re: The storage pool has been expanded, but the volume cannot be expanded?

Post by TMroy »

If you know how a raid works, you will know that you can't remove a drive from a raid 5 disk array.
here is information for reference, hopefully, this could be helpful.
viewtopic.php?f=79&t=1723
To contact our team, please send email to following addresses, remember to replace (at) with @:
Support team: support(at)terra-master.com (for technical support only)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
exp20thcen
Posts: 0
Joined: 29 Jan 2022, 01:59

Re: The storage pool has been expanded, but the volume cannot be expanded?

Post by exp20thcen »

So these instructions first off assume that you understand some linux, and/or assume that they will work without any glitches/errors/or issues.

Here are a few things that went wrong for me, and how I fixed them. FTR I am not associated with TERRAMASTER, nor am I a certified linux guru, however I do work IT and have several years of experience on the OS. I DO NOT AND CAN NOT CLAIM THAT THE FOLLOWING WILL WORK FOR YOU, PLEASE PROCEED AT YOUR OWN RISK.

FTR: I started with a 3 disc 6TB/disc Raid 5, and worked to expand it to a 4 disc 6TB/disc Raid 5.
TLDR: If you can't be bothered to read this, then you don't need this issue fixed that badly...

okay. Legal stuff out of the way...For those of you that don't know, Linux is a very fluid operating system, as long as you know its syntax and programming, you can throw any file as an executable and it will run as one. Why did I go into this? Because there are several commands in the instructions above that I don't recognize, maybe they are core Linux, maybe they are fully custom to this 'flavor' of Linux. I am not sure.

Below I will break down the commands and where I had issues, but first...how to get to root? this article doesn't explain that, and just hitting "su" doesn't work. I closed the other article, but an official TERRAMASTER (TM) post instructed.

cd /
sudo -i

So now on to the other instructions. I am only going to keep the ones that I used. I am adding white space between each command and will comment in said white space my experience.


[root@TNAS-???? ~]# lsblk
[b] this displayed a list of various things, but I was able to determine that I had md0, vg0, and lv0 from looking at this list[/b]
[root@TNAS-???? ~]# mdadm --grow /dev/md0 --size=max
[b] no clue, but it didn't modify anything[/b]
[root@TNAS-???? ~]# umount /mnt/md0

[b] This part here didn't work, adding "-f" to it didn't work...in the end I had to use "lsof" which the OS recommended to me, and look for anything that looked like it was actively using the disk.
[b] I originally thought I would run plex off of this NAS, so that was installed. Uninstalling it (through the web interface), and having no other apps running, I was able to proceed with the previous command.[/b]

[root@TNAS-???? ~]# umount /home
[b]worked[/b]
[root@TNAS-???? ~]# vgchange -an vg0
[b]no clue[/b]
[root@TNAS-???? ~]# pvresize /dev/md0
[b]huh[/b]
[root@TNAS-???? ~]# vgchange -ay vg0
[b]boy it would be nice if TM explained some of this huh?[/b]

[root@TNAS-???? ~]# lvextend -l +100%100FREE /dev/vg0/lv0

[b] this out right did not work, I had to look up the man pages on this command, from the web since they aren't installed in the TM OS, here's the link to that. [/b][link]https://linux.die.net/man/8/lvextend[/link][b]

[b] in the end, I tried several different things, but this command worked for me.[/b] [root@TNAS-???? ~]# lvextend -l 100%VG /dev/vg0/lv0

[b] when entering that command, the system responded that I had changed my volume from 10.2TB to 16.1TB[/b]

[i] the following are from the original instructions, and aren't bad[/i]
3. Adjust the file system size
You need to know the file system of your volume first (btrfs/ext4):
CODE: SELECT ALL
[root@TNAS-???? ~]# blkid /dev/vg0/lv0
Select commands to execute based on the type of file system you have learned previously:
[i] ok, back to the bullshit [/i]

[b] I am leaving this section in my post, but I did not have a btrfs FS, so I cannot comment on these steps below[/b]

btrfs
CODE: SELECT ALL

[root@TNAS-???? ~]# mount /dev/mapper/vg0-lv0 /mnt/md0
[root@TNAS-???? ~]# mount /dev/mapper/vg0-lv0 /home
[root@TNAS-???? ~]# resize max /mnt/md0


[b]here are the steps I followed for my FS (file system)[/b]

ext4
CODE: SELECT ALL

[root@TNAS-???? ~]# resize2fs /dev/mapper/vg0-lv0

[b] nope that didn't work...again the OS saved me here and I had to run[/b] " e2fsck -f /dev/mapper/vg0-lv0 " [b] I don't read fluent gibberish, but I have a son, and stayed in a holiday express last night, so I'm pretty sure this is a file system check...also that is what this command did.

afterwards, the command above worked...BE ADVISED, both commands took some time EACH.[/b]

[b] you won't believe it, but these two commands actually worked, they just worked![/b]

[root@TNAS-???? ~]# mount /dev/mapper/vg0-lv0 /mnt/md0
[root@TNAS-???? ~]# mount /dev/mapper/vg0-lv0 /home

and now my RAID 5 is all set and the volume is expanded.

again, this worked for me...please do be careful before attempting, and good luck.

TLDR and scrolled down to the bottom: Scroll back up and start over.

* could one of the modder fix my BB code...I tried, but it isn't turning on...I've wasted enough time here. Again, hope this helps someone.
User avatar
bzx33a
Posts: 1
Joined: 06 Jul 2022, 09:54

Re: The storage pool has been expanded, but the volume cannot be expanded?

Post by bzx33a »

I am a new user and set up a RAID 5 array with 2 8TB drives and 1 4TB drive. I just added another 8TB drive to the RAID 5 (successfully, I think), but I have no clue how to increase the volume. I tried to edit the volume and set it to max but nothing changes. I am also not comfortable or experienced with the command lines that have been posted her. Is this the only solution? I was really hoping for something simpler?
User avatar
Other
Posts: 1
Joined: 12 Jan 2021, 22:19

Re: The storage pool has been expanded, but the volume cannot be expanded?

Post by Other »

{L_BUTTON_AT}exp20thcen
Holy Crap thanks so much for this post I was having the same trouble and didnt know what to do when right out of the gate i could not get even the first command to work properly. Lucky i found your post. Things got harry again when i got to the step to "umount /mnt/md0" because the "target was busy" luckily i found this command "fuser -mk /mnt/md0" referenced here regarding a similar but different topic viewtopic.php?t=2575 which allowed me to terminate this process and move forward with your instructions.
User avatar
LibertyCar
Posts: 1
Joined: 20 Feb 2023, 19:17

Re: The storage pool has been expanded, but the volume cannot be expanded?

Post by LibertyCar »

Hello there,

I don't think it's as complicated as what I've read.

_Open the TOS
.._Open the DASHBOARD
...._storage _POOL
......_VOLUME
........_Select the storage pool you want to modify
.........._MODIFY
............_"MAX" key

WARNING HERE: there seems to be a bug here. Removed some MegagBite at the max value.

.............._Confirm

CAUTION HERE: You should see the storage value slowly increase. After a few ten seconds, the process will be finished.

Regards
User avatar
Kylevm420
Posts: 4
Joined: 23 Mar 2022, 05:41

Re: The storage pool has been expanded, but the volume cannot be expanded?

Post by Kylevm420 »

Hi

So any time I use the command "umount /mnt/md0", I get the message "target is busy". So I then follow up with the command "fuser -mk /mnt/md0". After entering that command and trying "umount /mnt/md0" again, I still get the message "target is busy". Ive tried entering "lsof", but I get so many lines of info that I'm not sure how to read or interpret. I have no idea why the target is always busy and can't seem to find any solution. Can someone please help me? I emailed Terramaster support days ago and they have not responded and this is driving me nuts.
User avatar
TMzethar
TerraMaster Team
Posts: 1128
Joined: 27 Oct 2020, 16:43

Re: The storage pool has been expanded, but the volume cannot be expanded?

Post by TMzethar »

{L_BUTTON_AT}Kylevm420
If the prompt "Target is busy", please disable the SSD cache (if not, please ignore it), close all running docker containers and application services and file services, use the following command to kill all processes occupying the data partition, and then execute the command above again.
To contact our team, please send email to following addresses, remember to replace (at) with @:
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
Post Reply