How to append a storage space to an existing ZFS partition?

hamidi

Cadet
Joined
Nov 29, 2023
Messages
2
Hi
I used the following command to increase space of an existing pool:
sudo zpool add tank /dev/sdc
But it didn't dynamically increase the volume of the storage. In another words, the available space of zpool increased, but didn't affect on the space of the zfs partition. I'm NOT looking for mirroring (redundancy). I'm just going to expand the partition size. Indeed I've data on the zfs partition. At first I used:
sudo zpool create tank /dev/sdb
sudo zfs create -o mountpoint=/home/hamidi/aux tank/home
and now that aux has less space I need to expand it and append sdc to it to increase its space.
Is it possible? If yes, how?
Thanks
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
used the following command to increase space of an existing pool:
But it didn't dynamically increase the volume of the storage. I
I really hope this is a test server containing only disposable data... That's a disaster waiting to happen.
available space of zpool increased, but didn't affect on the space of the zfs partition.
"ZFS partition" is not a thing. You really must read up on the basics of ZFS, because you're applying concepts from the last millennium to a filesystem designed to eliminate the pain those brought and provide us with metaphorical clean water.
and now that aux has less space I need to expand it and append sdc to it t
You don't expand datasets and you certainly don't append anything to them. Datasets are filesystems whose storage is provided by the underlying pool, which you say is showing the correct capacity. So, if a dataset is showing less than that, it has one or more quotas affecting it.
Use zfs list -o space,quota,refquota at your starting point to figure this out.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
/dev/sdc looks like Linux. Are you running TrueNAS SCALE? Why are you manipulating the pool in a non-supported manner outside of the UI?

What is the output of zpool status, zfs list, and parted /dev/sdb p; parted /dev/sdc p?
 

hamidi

Cadet
Joined
Nov 29, 2023
Messages
2
Sorry if my question has been so outdated. This is my first try with ZFS. And yes, this is Linux itself, not TrueNAS, but because I thought your answers may guide me through the way, I decided to ask for your assistance. And yes, it's certainly a test VM machine. I don't load my valuable data on a volume which is not stable yet. There's no quota and not going to get involved with it.
zpool status shows tank which has sdb and sdc and its children while all three are ONLINE.
zfs list output is as follows:

NAME USED AVAIL REFER MOUNTPOINT
tank 1.07M 78.9M 24K /tank
tank/home 98.5K 78.9M 98.5K /home/hamidi/aux

I found that it has create /tank which I don't need as well as /home/hamidi/aux. Why is that? May I remove it?
Sorry, I'm really in the first step of getting involved with ZFS with no knowledge yet about it.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You might want to start here:
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
And if you want more specific help, you really need to provide the output of the commands we requested...
und that it has create /tank which I don't need as well as /home/hamidi/aux. Why is that? May I remove it?
Every pool has a root dataset with the same name as the pool, that's what you're seeing. No you can't remove it, but you don't need to have it mounted - depends on what you're looking to do.
 
Top