Score:0

how do I delete a volume from zpool - zfs

ye flag

I created a zpool with 12 drives each 8TB using:

zpool create ch1 sdb sdc sdd sde sdf sdg sdh sdi sdj sdk sdl sdm

Then I added 12 more 8TB drives and wanted to add them to the zpool. When I did I only got 8TB of additional space instead of the expected additional ~70TB using this command:

zpool add ch1 raidz sdn1 sdo1 sdp1 sdq1 sdr1 sds1 sdt1 sdu1 sdv1 sdw1 sdx1 sdy1

I wanted to do this:

zpool create ch2 sdb sdc sdd sde sdf sdg sdh sdi sdj sdk sdl sdm

Here is my zpool status:

hs@hs-farm:~$ zpool clear ch1
cannot clear errors for ch1: permission denied
hs@hs-farm:~$ sudo zpool clear ch1
hs@hs-farm:~$ zpool status
  pool: ch1
 state: ONLINE
  scan: resilvered 44K in 0 days 00:00:00 with 0 errors on Thu Dec  2 13:59:03 2021
config:

    NAME                              STATE     READ WRITE CKSUM
    ch1                               ONLINE       0     0     0
      raidz1-0                        ONLINE       0     0     0
        wwn-0x5000c500c8f1d16d        ONLINE       0     0     0
        wwn-0x5000c500c8e398b4        ONLINE       0     0     0
        wwn-0x5000c500c640250e        ONLINE       0     0     0
        wwn-0x5000c500c8c85db3        ONLINE       0     0     0
        wwn-0x5000c500c9207ce8        ONLINE       0     0     0
        wwn-0x5000c500c8d31803        ONLINE       0     0     0
        wwn-0x5000c500c8c3b74c        ONLINE       0     0     0
        wwn-0x5000c500c8e73721        ONLINE       0     0     0
        wwn-0x5000c500c8e76055        ONLINE       0     0     0
        wwn-0x5000c500c8d2d64f        ONLINE       0     0     0
        wwn-0x5000c500c8e6b10a        ONLINE       0     0     0
        wwn-0x5000c500c62c8f66        ONLINE       0     0     0
      raidz1-1                        ONLINE       0     0     0
        wwn-0x5000c500c8f38e11-part1  ONLINE       0     0     0
        wwn-0x5000c500c8f2fae4-part1  ONLINE       0     0     0
        wwn-0x5000c500c8d45a0e-part1  ONLINE       0     0     0
        wwn-0x5000c500c8c8bd98-part1  ONLINE       0     0     0
        wwn-0x5000c500c8f2fda8-part1  ONLINE       0     0     0
        wwn-0x5000c500c8dbc00a-part1  ONLINE       0     0     0
        wwn-0x5000c500c7104af2-part1  ONLINE       0     0     0
        wwn-0x5000c500c8f62aad-part1  ONLINE       0     0     0
        wwn-0x5000c500c8db7231-part1  ONLINE       0     0     0
        wwn-0x5000c500c9206973-part1  ONLINE       0     0     0
        wwn-0x5000c500c8d2a7d4-part1  ONLINE       0     0     0
        wwn-0x5000c500c92175bc-part1  ONLINE       0     0     0

errors: No known data errors

How do I get rid of raidz1-1 so I can create a new ch2 pool with my 12 new drives and use all the space.

BTW - I converted the zpool to use the drive ID's

Please help I need the storage - I'm new to Ubuntu - my first linux machine and loving the journey but feel totally stuck

Thanks!!!

screenshot of my current zpool

freezed avatar
cn flag
Welcome to Ask Ubuntu. Please [take the tour](https://askubuntu.com/tour) to learn how Ask Ubuntu works. Read [how to ask](https://askubuntu.com/questions/how-to-ask) to improve the quality of your question.
Score:0
cn flag

Destroy ch1 and re-create ch1 & ch2.

If data are already on pool, move them with send/recv.

As mentioned in manpage, zpool remove & zpool detach are not working with raidz Vdevs.


Edit:

Looking a bit further, this feature is available on freeBSD since version 11.2 with device_removal feature flag, which is available since ZoL 0.8. Be aware that ZFS use the same base code between freeBSD and linux only since openZFS 2.0, so maybe this feature flag is not on the linux side on ZoL 0.8.

ACH S avatar
ye flag
see this article https://freebsdfoundation.org/blog/raid-z-expansion-feature-for-zfs/ not quite sure what to try here in my situation, any suggestions
ACH S avatar
ye flag
Thanks for the response I have data on raidz1-0 that I don't have enough storage to move anywhere else. I need to destroy raidz1-1 so that I can use it in a new pool - otherwise it's just wasted space.
ACH S avatar
ye flag
what a shame - is there someone that can write this functionality if it doesn't exist as from my research I'm not the only person that is dealing with this. The answer I saw was this is to protect you but I don't need a baby sitter just need software to do what I need it to do.
freezed avatar
cn flag
Looking a bit further, this feature is available on freeBSD [since version 11.2](https://www.freebsd.org/cgi/man.cgi?query=zpool-features&apropos=0&sektion=7&manpath=FreeBSD+11.2-RELEASE+and+Ports&arch=default&format=html) with `device_removal` feature flag, which is available [since ZoL 0.8](https://github.com/openzfs/zfs/search?q=device_removal&type=code). Which ZFS version are you using ?
ACH S avatar
ye flag
got the version, will try device removal next, and let you know how it goes - thanks! #zpool version zfs-0.8.3-1ubuntu12.13 zfs-kmod-2.0.2-1ubuntu5.4
ACH S avatar
ye flag
'~$ sudo zpool remove ch1 raidz1-1 [sudo] password for hs: cannot remove raidz1-1: invalid config; all top-level vdevs must have the same sector size and not be raidz.'
freezed avatar
cn flag
Beware that ZFS use the same base code between freeBSD and linux only since `openZFS 2.0`, so maybe this feature flag is not on the linux side on `ZoL 0.8`.
ACH S avatar
ye flag
I found this link and it looks like it is now possible but don't know how - is it just the 'remove' command? see link[https://news.ycombinator.com/item?id=30256349#30273089]
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.