Solved How to add a disk to simply expand the storage space

Hi,
One of my FBSD machines is running on one disk, nda1 as shown by gpart, and I want to add one more disk, ada0 which is currently NTFS but I intend to make it ZFS, to simply get more storage space temporarily.
I supose I'll run following commands,
gpart create -s gpt ada0
gpart add -t freebsd-zfs ada0

Then I should attach the disk to the pool. According to zpool-attach() manpage, If device is not currently part of a mirrored configuration, device automatically transforms into a two-way mirror of device and new_device.(), while I don't intend to create a mirror.
So how do I proceed to simply add a second disk to get more storage space?
 
Hi,
One of my FBSD machines is running on one disk, nda1 as shown by gpart, and I want to add one more disk, ada0 which is currently NTFS but I intend to make it ZFS, to simply get more storage space temporarily.
I supose I'll run following commands,
gpart create -s gpt ada0
gpart add -t freebsd-zfs ada0

Then I should attach the disk to the pool. According to zpool-attach() manpage, If device is not currently part of a mirrored configuration, device automatically transforms into a two-way mirror of device and new_device.(), while I don't intend to create a mirror.
So how do I proceed to simply add a second disk to get more storage space?
Noooo! Don't add storage to a zpool on a temporary basis. AFAIK you still can't remove a vdev once added. Thre's been talk of adding this feature for a decade or more, but as of now, I'm pretty sure it can't. It won't be temporary. You may see stuff about removing drives but it's referring to mirrors, logs, cache drives and so on.

It's easy enough to create a second zpool on the temporary drive and mount the extra storage wherever you need it on the file tree. I do it all the time. Off the top of my head and assuming NTFS has queered the pitch:

Code:
gpart destroy -F /dev/ ada0-xxx
dd if=/dev/zero of=/dev/ada0-xxx bs=1m count=10
gpart create -s gpt /dev/ada0-xxx
gpart add -t freebsd-zfs ada0-xxx
zpool create temppool /dev/ada0-xxx
mkdir /usr/morespace
zfs set mountpoint=/usr/morespace temppool
zfs mount temppool

You might want to create datasets and mount those instead of the root dataset, but it's not necessary. I've obviously renamed the drive with -xxx on the end to avoid any nasty cut/paste incidents.
 
Back
Top