Page 1 of 1

Adding a new disc to a pool

Posted: Fri May 12, 2023 4:13 am
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?

Re: Adding a new disc to a pool

Posted: Sat May 20, 2023 11:48 am
by ericbsd
Did you give a label to the partition on the drive?

Re: Adding a new disc to a pool

Posted: Sat May 20, 2023 5:19 pm
by nevets
Didn't do anything - just popped the new disc in.
:-)

Re: Adding a new disc to a pool

Posted: Mon May 22, 2023 5:58 am
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.

Re: Adding a new disc to a pool

Posted: Tue May 23, 2023 12:46 am
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.
:-)

Re: Adding a new disc to a pool

Posted: Wed May 24, 2023 10:10 pm
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.