Adding discs to a volume

Status
Not open for further replies.

August

Cadet
Joined
Feb 21, 2017
Messages
9
In version 9.10, there are a couple of functions that i would like to confirm before i press the "please delete all my files" button.

The "Import Disc" function under Storage appears to be a way to copy data from an existing windows/linux/... drive to your volume. So this doesn't add a drive to a volume, it just copies data?

Then there is the "Volume Manager" function, which allows you to add a disc to a volume. This function notes that it will wipe out all existing data. When it says that it wipes out all data, hopefully it only wipes out the data on the disc being added - not the volume it is being added to.

Thanks...
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
In version 9.10, there are a couple of functions that i would like to confirm before i press the "please delete all my files" button.

The "Import Disc" function under Storage appears to be a way to copy data from an existing windows/linux/... drive to your volume. So this doesn't add a drive to a volume, it just copies data?
Yes, copies data one disc at a time.

Then there is the "Volume Manager" function, which allows you to add a disc to a volume. This function notes that it will wipe out all existing data. When it says that it wipes out all data, hopefully it only wipes out the data on the disc being added - not the volume it is being added to.

No, all selected disks are reformatted - see Section 8.1.1 in the User Guide, specifically: "The Add Volume button warns that existing data will be cleared. In other words, creating a new volume reformats the selected disks. If the existing data is meant to be preserved, click the Cancel button and refer to Import Disk and Import Volume to see if the existing format is supported. If so, perform that supported action instead. If the current storage format is not supported, it is necessary to back up the data to external media, format the disks, then restore the data to the new volume."
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
No, all selected disks are reformatted
I think you're misreading the question. If you're using the Volume Manager to extend an existing pool, data already on the pool isn't affected. But anything on the disks you're adding to the pool will be lost.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
I think you're misreading the question. If you're using the Volume Manager to extend an existing pool, data already on the pool isn't affected. But anything on the disks you're adding to the pool will be lost.
I guess I did misread the question. Thanks for the redirection.
 

August

Cadet
Joined
Feb 21, 2017
Messages
9
So there is no way to add drives to a volume/pool, and have it be folded into the existing RaidZ2? At least not from the web interface.
They just go in as a stripe...
So then can drives be added as part of a RaidZ2 pool using command line instructions?
Or is it as bad as if i want to go from a 4 drive RaidZ2 to a 6 drive RaidZ2, i have to blow away everything, and configure it from scratch?
As powerful as ZFS is, this doesn't seem practical.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
So there is no way to add drives to a volume/pool, and have it be folded into the existing RaidZ2?
Correct.
So then can drives be added as part of a RaidZ2 pool using command line instructions?
No.
Or is it as bad as if i want to go from a 4 drive RaidZ2 to a 6 drive RaidZ2, i have to blow away everything, and configure it from scratch?
That's the way it is. That's one of the reasons that some people recommend mirrors for smaller builds.
 

August

Cadet
Joined
Feb 21, 2017
Messages
9
Is four to six 4T drives considered a smaller build?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I'd say that 4-6 disks is on the smaller side, but the deciding factor would be more the inability or unwillingness to expand with similar-size vdevs. Using ZFS properly does involve some homework and advance planning.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
In order to increase pool space you have to expand a vdev by replacing all the drives with larger drives. Or add another vdev.

These are the only two options.

the alternative is to get your data into another pool of the right configuration where you want it to be.

this doesn't necessarily involve a full backup/restore, if you are adding enough capacity. For example if you are going from 4 drive Raidz2 to 8 drive, and acquire 4 more drives, you can setup an 8 way Raidz2 on the new 4 drives using partitioning and the CLI, replicate the data to the new pool, and then replace the partitions one at a time with the original pools drives, and the new drives, to end up with 8 way Raidz2 across 8 drives, without making a backup.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
For example if you are going from 4 drive Raidz2 to 8 drive, and acquire 4 more drives, you can setup an 8 way Raidz2 on the new 4 drives using partitioning and the CLI, replicate the data to the new pool,
You seem to be suggesting this quite a bit to newbies--I count at least three times in the last week. Sure, it's possible, but it's also easy to slip up and do something you didn't intend. Similarly, it's possible to created a degraded RAIDZn pool, but if you have to be told how, you probably shouldn't be doing it.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
He did specifically ask if there was a way to expand his pool, perhaps using the CLI

I probably just need to write and advanced howto. The real trick is the partitioning. Everything else gets done in the GUI
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
6 drives in an 8-drive pool could be done, but 4? That would need another level of hackiness. Not that the degraded pool thing is a very good idea in the first place.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
He did specifically ask if there was a way to expand his pool, perhaps using the CLI
True, but even with some CLI-fu, what you're suggesting is only going to work in some very narrow situations--specifically, it wouldn't work in the case he mentioned of turning a four-disk RAIDZ2 into a six-disk RAIDZ2 (though, now that I think about it, the degraded pool idea would).
The real trick is the partitioning.
...and the pool creation itself; FreeNAS won't create pools on arbitrary partitions through the GUI. But I guess it's easy enough to do zpool create tank raidz2 da0p1 da0p2 da1p1 da1p2 ....
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
6 drives in an 8-drive pool could be done, but 4? That would need another level of hackiness.
Not especially hacky. Take four disks, partition them each into two equal-size partitions, create an eight-way RAIDZ2 pool across those eight partitions. Export the new pool, and import into the GUI. Replicate data to this new pool. Destroy the old pool and start replacing partitions with whole disks. When complete, you have an eight-way RAIDZ2 pool on eight complete disks.

There is a bit of a redundancy risk this way; you don't have true RAIDZ2 redundancy until the process is complete, but you always have at least one disk's worth. It's probably less hacky (however one quantifies such things) than creating the degraded pool. But I'm still thinking that recommending it to newbies isn't the greatest idea.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
True, but even with some CLI-fu, what you're suggesting is only going to work in some very narrow situations--specifically, it wouldn't work in the case he mentioned of turning a four-disk RAIDZ2 into a six-disk RAIDZ2 (though, now that I think about it, the degraded pool idea would).

You degrade the 4 drive raidz to gain a drive. You still have one disk of redundancy. You then partition the 3 disks (2 new, one reclaimed) into 6 partitions and make a 6 way raidz2 (still one whole disk of redundancy).

Replace partitions with disks.

...and the pool creation itself; FreeNAS won't create pools on arbitrary partitions through the GUI. But I guess it's easy enough to do zpool create tank raidz2 da0p1 da0p2 da1p1 da1p2 ....

Not 100% certain that the GUI doesn't pick up partitions.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Not 100% certain that the GUI doesn't pick up partitions.
I'm about 90% sure, but not knowing FreeBSD well enough to partition my spare disks, I don't have the ready ability to test.
 

August

Cadet
Joined
Feb 21, 2017
Messages
9
In order to increase pool space you have to expand a vdev by replacing all the drives with larger drives. Or add another vdev.

These are the only two options.

the alternative is to get your data into another pool of the right configuration where you want it to be.

this doesn't necessarily involve a full backup/restore, if you are adding enough capacity. For example if you are going from 4 drive Raidz2 to 8 drive, and acquire 4 more drives, you can setup an 8 way Raidz2 on the new 4 drives using partitioning and the CLI, replicate the data to the new pool, and then replace the partitions one at a time with the original pools drives, and the new drives, to end up with 8 way Raidz2 across 8 drives, without making a backup.
Stux - i know about the option of replacing all the drives, but it just doesn't seem practical to throw out 4+ drives
i mean no one uses spinner drives for anything other than large storage
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
This has been an interesting thread to read. I would have never thought to create partitions on a drive to make this work. @Stux if you come out with a step by step procedure, that could prove to be helpful but by all means toss up a huge disclaimer becasue this is definately not for the novice.

I'm about 90% sure, but not knowing FreeBSD well enough to partition my spare disks, I don't have the ready ability to test.
I was thinking about just creating a VM and doing it this way. Hopefully the virtual disks will be seen fine, I would expect them too at least.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I was thinking about just creating a VM and doing it this way. Hopefully the virtual disks will be seen fine, I would expect them too at least.
I've found FreNAS to work fine for testing purposes in VirtualBox, seeing the virtual disks without an issue. Wouldn't want to run it in production that way, of course.
 
Status
Not open for further replies.
Top