Adding a new disc to a pool

Post your general questions or comments about GhostBSD here!
Post Reply
nevets
Posts: 149
Joined: Tue Jun 23, 2020 3:54 am

Adding a new disc to a pool

Post by nevets »

To add a new unformatted/uninitialised HDD to an existing non-root pool I did this:
# sudo zpool add 'mypoolname' /dev/diskid/"the new disc ID that is here"
Where I needed to look in the folder /dev/diskid to find the ID name of the new disc.

Is it possible to create a named vdev for the new disc first and use that with the add zpool command, or do we always need to inspect /dev/diskid first to find the device name there?
User avatar
ericbsd
Developer
Posts: 2052
Joined: Mon Nov 19, 2012 7:54 pm

Re: Adding a new disc to a pool

Post by ericbsd »

Did you give a label to the partition on the drive?
nevets
Posts: 149
Joined: Tue Jun 23, 2020 3:54 am

Re: Adding a new disc to a pool

Post by nevets »

Didn't do anything - just popped the new disc in.
:-)
User avatar
ericbsd
Developer
Posts: 2052
Joined: Mon Nov 19, 2012 7:54 pm

Re: Adding a new disc to a pool

Post by ericbsd »

To add a new disk to the pool you need to create the same size partition the your pool. See this tutorial https://youtu.be/wQX6A394d1k.
nevets
Posts: 149
Joined: Tue Jun 23, 2020 3:54 am

Re: Adding a new disc to a pool

Post by nevets »

Not quite Eric... this video isn't about adding discs to an existing pool -- It's about starting a new pool with the new disc.
I already had a pool...made up of two discs... I wanted to add a third.

So, Zpool create is the wrong way to go to add a disc to an existing pool - we must use zpool add to enlarge an existing pool...

It's just I tried zpool add ExistingPoolName /dev/ada3 and it failed to know what to do. [Here ada0 is zroot, ada1-2 are the pool with my data, so logically, ada3 is what I needed to add].
This meant there was no link between the pseudonym ada3 and the physical device - something I thought vdev specifies... and the basis of my query.
Anyway, using the /dev/diskid/ 'name' worked for the zpool add function and did the trick.
I suppose the query relates to naming vdevs.
:-)
User avatar
ericbsd
Developer
Posts: 2052
Joined: Mon Nov 19, 2012 7:54 pm

Re: Adding a new disc to a pool

Post by ericbsd »

I have not watched the video. I assumed he was adding a disk properly, but I am happy you learned how to do it.

Next time I will make sure the video is doing the right thing.
Post Reply