Re: Tell me how to increase the virtual disk with ZFS?
Alexander Yerenkow wrote this message on Sat, May 11, 2013 at 18:13 +0300: > zpools or increase/decrease UFS partitions. growfs(8) NAME growfs -- grow size of an existing ufs file system HISTORY The growfs utility first appeared in FreeBSD 4.4. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." ___ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[email protected]"
Re: Tell me how to increase the virtual disk with ZFS?
On May 11, 2013, at 11:13 AM, Alexander Yerenkow wrote:
2013/5/11 Paul Kraus On May 11, 2013, at 10:03 AM, Alexander Yerenkow wrote:
>
> > There's no mature (or flexible, or "can do what I want" ) way to
> > increase/decrease disk sizes in FreeBSD for now {ZFS,UFS}.
> > Best and quickest way - to have twice spare space, copy data, create new
> > sufficient disk and copy back.
>
> Is this a statement or a question ? If a statement, then it is factually
> FALSE. If it is supposed to be a question, it does not ask anything.
>
> It was a statement, and luckily I was partially wrong, as Vladislav did made
> what he wanted to.
> However, last time I checked there were no such easy ways to decrease zpools
Correct, there is currently no way to decrease the size of a zpool. That would
require a defragmentation utility, which is on the roadmap as part of the
bp_rewrite code enhancement (and has been for many, many years :-)
> or increase/decrease UFS partitions.
> Or grow mirrored ZFS as easily as single zpool.
This one I do not understand. I have grown mirrored zpools many times. Let's
say you have a 2-way mirror of 1 TB drives. You can do one of two things to
grow the zpool:
1) add another pair of drives (of any size) as another top level vdev mirror
device (you *can* use a different type of top level vdev, raidZ, simple, etc,
but that is not recommended for both redundancy and performance predictability
reasons).
2) swap out one of the 1 TB drives for a 2 TB (zpool replace), you can even
offline one of the halves of the mirror to do this (but remember that you are
vulnerable to a failure of the remaining drive during the resolver period), let
the zpool resolver, then swap out the other 1 TB drive for a 2 TB. If the auto
expand property is set, then once the resolver finishes you have doubled your
net capacity.
> Or (killer one) remove added by mistake vdev from zpool ;)
Don't make that mistake. Seriously. If you are managing storage you need to be
double checking every single command you issue if you care about your data
integrity. You could easily make the same complaint about issuing an 'rm -rf'
in the wrong directory (I know people who have done that). If you are using
snapshots you may be safe, if not your data is probably gone.
On the other hand, depending on where in the tree you added the vdev, you may
be able to remove it. If it is a top level vdev, then you have just changed the
configuration of the zpool. While very not supported, you just might be able,
using zdb and rolling back to a TXG before you added the device, remove the
vdev. A good place to ask that question and have the discussion would be the
ZFS discuss list at illumos (the list discussion is not limited to illumos, but
covers all aspects of ZFS on all platforms). Archives here:
http://www.listbox.com/member/archive/182191/sort/time_rev/
> Of course I'm not talking about real hw, rather virtual one.
Doesn't matter to ZFS, whether a drive is a physical, a partition, or a virtual
disk you perform the same operations.
> If you happen to point me somewhere to have such task solved I'd be much
> appreciated.
See above :-) Some of your issues I addressed above, others are not there (and
may never be).
--
Paul Kraus
Deputy Technical Director, LoneStarCon 3
Sound Coordinator, Schenectady Light Opera Company
___
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[email protected]"
Re: Tell me how to increase the virtual disk with ZFS?
2013/5/11 Paul Kraus
> On May 11, 2013, at 10:03 AM, Alexander Yerenkow
> wrote:
>
> > There's no mature (or flexible, or "can do what I want" ) way to
> > increase/decrease disk sizes in FreeBSD for now {ZFS,UFS}.
> > Best and quickest way - to have twice spare space, copy data, create new
> > sufficient disk and copy back.
>
> Is this a statement or a question ? If a statement, then it is factually
> FALSE. If it is supposed to be a question, it does not ask anything.
>
It was a statement, and luckily I was partially wrong, as Vladislav did
made what he wanted to.
However, last time I checked there were no such easy ways to decrease
zpools or increase/decrease UFS partitions.
Or grow mirrored ZFS as easily as single zpool. Or (killer one) remove
added by mistake vdev from zpool ;)
Of course I'm not talking about real hw, rather virtual one.
If you happen to point me somewhere to have such task solved I'd be much
appreciated.
> --
> Paul Kraus
> Deputy Technical Director, LoneStarCon 3
> Sound Coordinator, Schenectady Light Opera Company
>
>
--
Regards,
Alexander Yerenkow
___
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[email protected]"
Re: Tell me how to increase the virtual disk with ZFS?
On May 11, 2013, at 10:09 AM, "Vladislav Prodan" wrote: > > Thanks. > I did not realize that there was such an interesting and useful option :) > > # zpool get autoexpand tank > NAME PROPERTYVALUE SOURCE > tank autoexpand off default The man pages for zpool and zfs are full of such useful information :-) -- Paul Kraus Deputy Technical Director, LoneStarCon 3 Sound Coordinator, Schenectady Light Opera Company ___ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[email protected]"
Re: Tell me how to increase the virtual disk with ZFS?
On May 11, 2013, at 10:03 AM, Alexander Yerenkow wrote:
> There's no mature (or flexible, or "can do what I want" ) way to
> increase/decrease disk sizes in FreeBSD for now {ZFS,UFS}.
> Best and quickest way - to have twice spare space, copy data, create new
> sufficient disk and copy back.
Is this a statement or a question ? If a statement, then it is factually FALSE.
If it is supposed to be a question, it does not ask anything.
--
Paul Kraus
Deputy Technical Director, LoneStarCon 3
Sound Coordinator, Schenectady Light Opera Company
___
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[email protected]"
Re: Tell me how to increase the virtual disk with ZFS?
There's no mature (or flexible, or "can do what I want" ) way to
increase/decrease disk sizes in FreeBSD for now {ZFS,UFS}.
Best and quickest way - to have twice spare space, copy data, create new
sufficient disk and copy back.
2013/5/11 Vladislav Prodan
>
> I have a Debian server virtual ok with Proxmox.
> In one of the virtual machines is FreeBSD 9.1 ZFS with one disk to 100G.
> Free space is not enough, how to extend the virtual disk without losing
> data?
>
> Add another virtual disk and do a RAID0 - not an option. It is not clear
> how to distribute the data from the old virtual disk to the new virtual
> disk.
>
> The manual of the Proxmox http://pve.proxmox.com/wiki/Resizing_disksFreeBSD
> is not mentioned :(
>
> You may have to do a Native ZFS for Linux on Proxmox and it will be easier
> to resize the virtual disk for the virtual machines?
>
> --
> Vladislav V. Prodan
> System & Network Administrator
> http://support.od.ua
> +380 67 4584408, +380 99 4060508
> VVP88-RIPE
> ___
> [email protected] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "[email protected]"
>
--
Regards,
Alexander Yerenkow
___
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[email protected]"
Re: Tell me how to increase the virtual disk with ZFS?
On May 11, 2013, at 8:59 AM, "Vladislav Prodan" wrote: > Add another virtual disk and do a RAID0 - not an option. It is not clear how > to distribute the data from the old virtual disk to the new virtual disk. When you add an additional "disk" to a zpool (to create a STRIPE), the ZFS code automatically stripes new writes across all top level vdevs (drinks in this case). You will see a performance penalty until the data distribution evens out. One way to force that (if you do NOT have snapshots) is to just copy everything. The new copy will be striped across all top level vdevs. The other option would be to add an additional disk that is as large as you want to the VM, attach it to the zpool as a mirror. The mirror vdev will only be as large as the original device, but once the mirror completes resilvering, you can remove the old device and grow the remaining device to full size (it may do that anyway based on the setting of the auto expand property of the zpool. The default under 9.1 is NOT to autoexpand: root@FreeBSD2:/root # zpool get autoexpand rootpool NAME PROPERTYVALUE SOURCE rootpool autoexpand off default root@FreeBSD2:/root # -- Paul Kraus Deputy Technical Director, LoneStarCon 3 Sound Coordinator, Schenectady Light Opera Company ___ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[email protected]"
