Is expanding a volume across disks impossible?

Status
Not open for further replies.

Lordofsraam

Cadet
Joined
Oct 28, 2015
Messages
3
Simple situation:
I have a movie folder in my hard drive on FreeNAS. I'm kind of OCD about my file structure. I don't want to make another movie folder on another hard drive just because my first one is full. I want to add another drive to the volume and keep making that one folder bigger.
From what Ive read around the forums, once you make a volume, you are stuck with as many drives as it had when you made it. Is making a bottomless folder (assuming I keep buying and adding drives) just not something FreeNAS was made for? The only way to make it bigger is by replacing one of the drives with a bigger one, not just adding drives.
Im strongly considering switching to ubuntu server and going with LVMs, but I really like the way FreeNAS handles the file system and its interface is very nice and stable. So is there a way to get what I want with it?
 
Last edited by a moderator:

solarisguy

Guru
Joined
Apr 4, 2014
Messages
1,125
Yes, you cannot change the number of drives, but you can replace the drives with the larger ones.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
From what Ive read around the forums, once you make a volume, youre stuck with as many drives as it had when you made it.
This is not correct. I'm not sure what @solarisguy is thinking, but you can absolutely change (specifically, increase) the number of drives in a pool. However, if you have redundancy in your pool (i.e., it's mirrored or in RAIDZ), you can't just add an arbitrary number of drives and retain your redundancy. If, for example, you have a three-disk RAIDZ1 volume, you can't change it into a four-disk RAIDZ1 volume--you'd need to add three more disks as another RAIDZ1. You could just add a fourth disk to your volume, but you'd lose redundancy that way.

Strongly recommend you read @cyberjock's presentation on ZFS basics.
 

Lordofsraam

Cadet
Joined
Oct 28, 2015
Messages
3
This is why I decided to make an account and create a post. I havent gotten a answer people can get behind. Who do I trust now? You say I can, but how? Im looking at my freenas page right now and when I did Storage->Volume Manager->Volume to extend->Extend volume, I get
  • You are trying to add a virtual device consisting of 1 device(s) in a pool that has a virtual device consisting of 2 device(s)
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
You asked a general question, and I gave a general (and correct) answer. For a specific answer, you'll need to ask a better question--include details like your hardware, your version of FreeNAS, and your pool configuration. If your two disks are striped (which they probably are; I think the warning would be different if they were mirrored), it's easy to add a third, and you don't have any redundancy to lose anyway--just click the manual mode button. and use that to add the third disk.

I'm kind of curious about what you've read here that makes you think you can't add disks to a volume--you've always been able to.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Did you read the link that was given to you? That had all your questions A and answers. The answer is very straight forward. You can't add drives to a vdev but you can add more vdevs to your pool to create more space.
 

Lordofsraam

Cadet
Joined
Oct 28, 2015
Messages
3
You asked a general question, and I gave a general (and correct) answer. For a specific answer, you'll need to ask a better question--include details like your hardware, your version of FreeNAS, and your pool configuration. If your two disks are striped (which they probably are; I think the warning would be different if they were mirrored), it's easy to add a third, and you don't have any redundancy to lose anyway--just click the manual mode button. and use that to add the third disk.

I'm kind of curious about what you've read here that makes you think you can't add disks to a volume--you've always been able to.

After a few days of googling last week I found a few posts that said essentially what solarisguy stated above.
I had read cyberjock's presentation and a few of his posts about the subject (the guy really seems to know his stuff and I really respect the community here all the more from just his posts), and even though I thought they were saying I could, I couldnt find a way to. Its all well and good that the docs can say yes and no, but the line between theory and application was getting fairly defined for me after I kept getting the error I posted earlier.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
I think the confusion is this.

There is a hierarchy: Pool, which is made from Vdevs, each of which are made from disks.

A vdev, once made, cannot be "expanded" by adding more drives.

However, your *POOL* can be expanded by adding ANOTHER VDEV (of disks).

So for example, if you have a pool containing a single vdev of 3x3TB disks (just making something up) in RAID-Z1, then you can't change the 3x3TB somehow into 4x3TB, ***BUT***, you *CAN* add a *SECOND* vdev of, say, 2x3TB disks in a mirror, so now your pool has 2 vdevs in it whereas before it had one.

It is the VDEV that cannot be expanded with more disks. However, the *POOL* can be expanded with *MORE VDEVS*. Does this make sense?
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Since dbanb35 has figured out that the OP has a stripe, the message wasn't relevant.

To add to what's already been said, it appears that your pool consists of a two disks (mirror) and you are trying to add a 3rd drive to it.

The message you are seeing, is to prevent you from accidentally adding a single drive (vdev) to your pool. If you did and that drive were to fail down the road, you'd loose your entire pool.

So, instead of adding just a single drive, extend the pool with 2 drives and you'll be good to go.
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
To add to what's already been said, it appears that your pool consists of a two disks (mirror) and you are trying to add a 3rd drive to it.
I don't think so. If that were the case, I think he'd be getting a warning saying "you are trying to add a virtual device of type 'stripe' to a virtual device of type 'mirror'" or something similar. Based on the warning message, I think his pool consists of two disks striped (i.e., RAID 0). But that's why I asked for his pool layout.
 
D

Deleted47050

Guest
I don't think so. If that were the case, I think he'd be getting a warning saying "you are trying to add a virtual device of type 'stripe' to a virtual device of type 'mirror'" or something similar. Based on the warning message, I think his pool consists of two disks striped (i.e., RAID 0). But that's why I asked for his pool layout.

Whatever the case, he should not create a single-drive vdev.
 
D

Deleted47050

Guest
Because if he adds a single-drive vdev to an existing pool, and that single-drive vdev were to fail, he would lose the whole pool, not just the single-drive vdev.

So it isn't really a question of redundancy, more of data safety really.

Edit: of course, if he creates a brand new pool, then it would be a different story,
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Because if he adds a single-drive vdev to an existing pool, and that single-drive vdev were to fail, he would lose the whole pool, not just the single-drive vdev.

So it isn't really a question of redundancy, more of data safety really.

Edit: of course, if he creates a brand new pool, then it would be a different story,
But then he'd care about reliability, wouldn't he?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Yes, and that's already true if his existing two disks are striped, rather than mirrored. There are legitimate use cases for striped pools, and they're certainly supported by both ZFS and FreeNAS, so to say that someone "should not" use them is incorrect. He should be made aware of the risks to his data, but that may not be an issue for him.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Having now tested it in a VM under FreeNAS 9.3.1, I can confirm that the warning @Lordofsraam is seeing is generated (overly-cautiously, IMO) when trying to add a single disk to a two-disk stripe. If his existing two disks were mirrored, the message would instead read "You are trying to add a virtual device of type 'stripe' in a pool that has a virtual device of type 'mirror'".

So, @Lordofsraam, you currently have two disks striped together, with no redundancy. If either of them fails, you will lose all the data on that pool. What you're trying to do is add a third disk to that pool. Doing so increases your risk of data loss--now, if any one of the three disks fails, you will lose all the data on the pool. OTOH, you'll get the full capacity of all three disks (less filesystem overhead and such) in a single volume. If that's what you want, here's how to do it:
  • Go to the volume manager
  • Click the Manual Setup button
  • Select your existing pool under Volume to extend
  • Select your new disk in the Member Disks field
  • Click Add Volume
Your system will click and whirr for a moment, and the new disk will be added to your pool.
 
D

Deleted47050

Guest
Yep, up to him what he wants to do with his data. "Should not" was probably not the right way to say it, you are right. If he doesn't care about his data, he can add a single drive without any issue.

In any other case, I think it cannot be recommended.
 

razvanc.mobile

Dabbler
Joined
Oct 19, 2015
Messages
16
Maybe a little unrelated, but is there a way to create a degraded pool in freenas? For example, can i create a raidz1 pool using just 2 drives, then add the third and let it rebuild?

Sent from my SM-N9005
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
In pure theory, yes. But if you have to ask then I don't recommend you to do it.
 
Status
Not open for further replies.
Top