Date: Sun, 12 May 2013 12:48:55 +0200 From: "Ronald Klop" <ronald-freebsd8@klop.yi.org> To: freebsd-fs@freebsd.org Subject: Re: Re[2]: Tell me how to increase the virtual disk with ZFS? Message-ID: <op.wwywbtkz8527sy@ronaldradial> In-Reply-To: <80049.1368285106.9876638397852811264@ffe6.ukr.net> References: <43529.1368277152.10278121996412321792@ffe11.ukr.net> <CAPJF9w=fzyzqpJThWYViK%2BoR9Ob48iDQndHNgWbR%2BXvceNz8_g@mail.gmail.com> <518E5973.9090003@platinum.linux.pl> <80049.1368285106.9876638397852811264@ffe6.ukr.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 11 May 2013 17:11:46 +0200, Vladislav Prodan <universite@ukr.net> wrote: > > >> # zfs list md1p1 >> NAME USED AVAIL REFER MOUNTPOINT >> md1p1 126K 1.96G 31K /md1p1 >> >> -- on-line resize partition to occupy added disk space >> # sysctl kern.geom.debugflags=16 >> kern.geom.debugflags: 0 -> 16 >> # gpart recover md1 >> md1 recovered >> # gpart resize -i 1 md1 >> md1p1 resized >> # sysctl kern.geom.debugflags=0 >> kern.geom.debugflags: 16 -> 0 >> >> -- tell zfs about it >> # zpool online -e md1p1 md1p1 >> >> -- done >> # zfs list md1p1 >> NAME USED AVAIL REFER MOUNTPOINT >> md1p1 136K 9.84G 31K /md1p1 >> > > Can repeat resize the flag [-s size], so it was clearly indicate the > amount of increase in partition? > Can you putting a pair small files in /md1p1? > And compare md5 and sha256 these files before and after the resize md1? > > Thank you in advance. > > > > > I guess md1 is a memory disk. See mdconfig(8). So it is quite easy (and cheap) to experiment with it. The same example, but with the creation of a memory disk. # dd if=/dev/zero of=/data/prut/memdisk1 bs=1M count=1024 # mdconfig -f /data/prut/memdisk1 -u 0 # gpart create -s gpt /dev/md0 # gpart add -t freebsd-zfs -s 512m /dev/md0 <-- -s 512m is smaller than the virtual disk # zpool create testpool md0p1 # df -h /testpool Filesystem Size Used Avail Capacity Mounted on testpool 471M 31k 471M 0% /testpool # sysctl kern.geom.debugflags=16 # gpart resize -i 1 md0 'If -s option is omitted then new size is automatically calculated to maximum available from given geom.' # sysctl kern.geom.debugflags=0 # zpool online -e testpool md0p1 # df -h /testpool Filesystem Size Used Avail Capacity Mounted on testpool 983M 31k 983M 0% /testpool Ronald.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?op.wwywbtkz8527sy>