How do I grow zfs filesystem? reddit / freebsd ---------------------------------------------------------------------- [deleted] · 2020-11-06 10:27 [deleted] ---------------------------------------------------------------------- FUZxxl · 2020-11-06 10:43 See the zpool manpage. There should be a `zpool grow` or something command. ---------------------------------------------------------------------- dddddavidddd · 2020-11-06 10:54 What you can also do is set up & experiment with a test zpool that is file-based (e.g. 200 MB files for each 'device'). I did this to figure out how to grow my mirror. In my case, I just set the [autoexpand](https://docs.oracle.com/cd/E19 253-01/819-5461/githb/index.html) property, replaced the device, removed the old one, and resilvered. (Again, I suggest trying it all out on a zero-risk test zpool first before doing it on real data.) ---------------------------------------------------------------------- vermaden · 2020-11-06 10:55 Before: # zfs list storage NAME USED AVAIL REFER MOUNTPOINT storage 3.21T 820G 236K /storage First you have to make sure that **autoexpand** is on as follows. # zpool get autoexpand storage NAME PROPERTY VALUE SOURCE storage autoexpand off default Set it to **on**. # zpool set autoexpand=on storage NAME PROPERTY VALUE SOURCE storage autoexpand on local Check **expandsize**. # zpool get expandsize storage NAME PROPERTY VALUE SOURCE storage expandsize 2.27T - To make it use that space you need do **zpool online -e** for all replaced devices: # zpool online -e storage wwn-0x5000c500654c1adc # zpool online -e storage wwn-0x5000c500652efbc2 ... and now: # zfs list storage NAME USED AVAIL REFER storage 3.21T 3.04T 236K /storage Done. ---------------------------------------------------------------------- Xzenor · 2020-11-06 10:58 Actually, no. The only time the word 'grow' is used in the man page is for for the autoexpand option, which is already on. But your hint made me look a bit further and I searched for 'expand' in the manpage and eventually ended up with the following: zpool online -e poolname diskname which actually works, surprisingly. So weird that I could not find this before. I guess I just skipped the 'online' option because the disk is already online.. Thanks ---------------------------------------------------------------------- Xzenor · 2020-11-06 11:04 >To make it use that space you need do > >zpool online -e > > for all replaced devices: That's what I completely missed. I just dismissed it, the disk was already online so why put it online again. But it worked. Well, I'm never gonna forget this again... ---------------------------------------------------------------------- Xzenor · 2020-11-06 11:11 I didn't know you could make file-based pools. That's cool. It's not necessary though, I can just add disks in ESX to test with but it's nice to know this for other situations. The autoexpand option was already set but I did not resilver. That clears your entire disk, doesn't it? it's fixed btw by using "zpool online **-e**" but I'm still curious. ---------------------------------------------------------------------- dddddavidddd · 2020-11-06 13:57 On second though, I'd mean to scrub rather than resilver; the `man` page notes that the operations are very similar. Good to know about the `-e` flag.