Stolen_Walnut
Dabbler
- Joined
- Jan 1, 2023
- Messages
- 10
I'm trying to add a device to vdev, but am getting a device is too small error
Context... my np pool is two mirrored 2TB NVMe drives... unfortunately i wasn't careful when I ordered them so one is actually 2048 GB & the other is 2000 GB. (Long term, I plan to replace the 2048 with a 2000 drive, but in the interim...). I wanted to remove one of the drives from the pool to do some quick performance testing on it & then add it back to the pool.
I removed the 2000GB drive and did the performance testing easy enough. Then came time to re-add the drive... Didn't see where to do this in the GUI, so went to the command line which is when I got this error.
I dug around the forums & basically saw that there was no way to do this and that shrinking isn't supported (unless I didn't hunt hard enough). The general consensus was to create a new pool, and then replicate to that.
I have a VM running out of this pool, so that sounded cumbersome to stop services / VM / etc.
So what I did was this:
Obviously it would have been ideal to have some redundancy while i tested & while I did this dance to "shrink" the vdev (although technically I guess it's a different vdev), but the VM is new enough to where it wouldn't have been the end of the world if I did lose everything in there.
More over, it looks like this could have been executed in a manner to yield redundancy throughout the process (add a temp drive before removing the one of interest, add that drive back in with another scratch disk, so redundancy is present during the evacuation).
Other than that -- are there any gotchya's or no-nos that I should be aware in this process?
Code:
root@tardinas[/]# zpool attach np b77e82f4-3759-4e3d-bfed-9dc70a5e6d79 /dev/nvme0n1 cannot attach /dev/nvme0n1 to b77e82f4-3759-4e3d-bfed-9dc70a5e6d79: device is too small
Context... my np pool is two mirrored 2TB NVMe drives... unfortunately i wasn't careful when I ordered them so one is actually 2048 GB & the other is 2000 GB. (Long term, I plan to replace the 2048 with a 2000 drive, but in the interim...). I wanted to remove one of the drives from the pool to do some quick performance testing on it & then add it back to the pool.
I removed the 2000GB drive and did the performance testing easy enough. Then came time to re-add the drive... Didn't see where to do this in the GUI, so went to the command line which is when I got this error.
I dug around the forums & basically saw that there was no way to do this and that shrinking isn't supported (unless I didn't hunt hard enough). The general consensus was to create a new pool, and then replicate to that.
I have a VM running out of this pool, so that sounded cumbersome to stop services / VM / etc.
So what I did was this:
- (starting)
- Vdevs:
- stripe: {nvme1(2024GB)}
- Vdevs:
- GUI: Add nvme0
- Vdevs:
- stripe: {nvme1(2024GB)}
- stripe: {nvme0(2000GB)}
- Vdevs:
- CLI: zpool remove np b77e82f4-3759-4e3d-bfed-9dc70a5e6d79
- (Data evacuated off of nvme1)
- Vdevs:
- stripe: {nvme0(2000GB)}
- zpool attach np 28503698-8f41-4df9-b1c8-34d55915f3e9 b77e82f4-3759-4e3d-bfed-9dc70a5e6d79
- (285...3e9 is the id created on nvme0(2000GB) from adding in the GUI)
- Vdevs:
- mirror-1: {nvme0(2000GB), nvme1(2024GB)}
Obviously it would have been ideal to have some redundancy while i tested & while I did this dance to "shrink" the vdev (although technically I guess it's a different vdev), but the VM is new enough to where it wouldn't have been the end of the world if I did lose everything in there.
More over, it looks like this could have been executed in a manner to yield redundancy throughout the process (add a temp drive before removing the one of interest, add that drive back in with another scratch disk, so redundancy is present during the evacuation).
Other than that -- are there any gotchya's or no-nos that I should be aware in this process?
"tardinas"
OS Version: Currently TrueNAS-SCALE-22.12.0, but flexible if something makes more sense
Motherboard: MSI MEG Z690I UNIFY
CPU: Intel Core i5-12500
RAM: G.Skill Ripjaws S5 64GB (2 x 32GB) DDR5-5200
Drives
OS Version: Currently TrueNAS-SCALE-22.12.0, but flexible if something makes more sense
Motherboard: MSI MEG Z690I UNIFY
CPU: Intel Core i5-12500
RAM: G.Skill Ripjaws S5 64GB (2 x 32GB) DDR5-5200
Drives
- Pools
- boot-pool: SATA SSD - Samsung 870 EVO Series 2.5" 250GB
- np:
- mirror-0
- NVMe: Inland Premium 2TB SSD M.2
- NVMe: Crucial - P3 2TB Internal SSD
- Note: I'm aware these are different sizes... One will be replaced with identical size before continuing
- mirror-0
- 3x integrated/on-board SSD/NVMe controllers:
- lspci -nnn | grep -E "0106|0108"
- 00:17.0 SATA controller [0106]: Intel Corporation Device [8086:7ae2] (rev 11)
- 09:00.0 Non-Volatile memory controller [0108]: Micron/Crucial Technology Device [c0a9:540a] (rev 01)
- 13:00.0 Non-Volatile memory controller [0108]: Phison Electronics Corporation PS5013 E13 NVMe Controller [1987:5013] (rev 01)
- lspci -nnn | grep -E "0106|0108"
- 2x:
- lspci -nnn | grep 0200
- 08:00.0 Ethernet controller [0200]: Aquantia Corp. AQC107 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion] [1d6a:07b1] (rev 02)
- 0b:00.0 Ethernet controller [0200]: Intel Corporation Ethernet Controller I225-V [8086:15f3] (rev 03)
- lspci -nnn | grep 0200