From owner-freebsd-current@FreeBSD.ORG Wed Apr 25 21:25:07 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 088A116A406 for ; Wed, 25 Apr 2007 21:25:07 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id 9D68713C45A for ; Wed, 25 Apr 2007 21:25:06 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 297E045696; Wed, 25 Apr 2007 23:25:05 +0200 (CEST) Received: from localhost (pjd.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 4C9E445683; Wed, 25 Apr 2007 23:24:58 +0200 (CEST) Date: Wed, 25 Apr 2007 23:24:37 +0200 From: Pawel Jakub Dawidek To: Alexey Tarasov Message-ID: <20070425212437.GO34663@garage.freebsd.pl> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1WN/MJ7JJGqVzwIW" Content-Disposition: inline In-Reply-To: X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: current@freebsd.org Subject: Re: ZFS and mv utility X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2007 21:25:07 -0000 --1WN/MJ7JJGqVzwIW Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 26, 2007 at 12:56:50AM +0400, Alexey Tarasov wrote: > Hello Pawel. >=20 > I have a question about ZFS and mv utility. I have the following pool con= figuration: >=20 > NAME USED AVAIL REFER MOUNTPOINT > storage 62,1G 121G 26K /storage > storage/music 7,95G 121G 7,95G /storage/music > storage/oldhome 47,5G 121G 47,5G /storage/oldhome >=20 > I made the following operation: mv /storage/oldhome/lexa/music/* /storage= /music and that operation took a very long time. It seems that MV copies fi= les first from=20 > storage/oldhome/lexa/musc to storage/music and then deletes them from old= location. But I move files within one storage pool and it should work as f= ast, as it works on UFS=20 > partition. Does it need to be modified for compatibility with ZFS? =46rom mv(1) manual page: As the rename(2) call does not work across file systems, mv uses cp(1) and rm(1) to accomplish the move. The effect is equivalent to: rm -f destination_path && \ cp -pRP source_file destination && \ rm -rf source_file ZFS pool is not a file system. Look at mount(8) output. It would be possible in theory to move data faster within one pool and this was discussed on zfs-discuss@opensolaris.org, you may want to search the archives. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --1WN/MJ7JJGqVzwIW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGL8cVForvXbEpPzQRAlbvAKCvZlvYWpyoUHN5BcQ867qw/dzteACeLfWl Ii4q1cqPDJZCHpLcJ1jvlsk= =S4Nn -----END PGP SIGNATURE----- --1WN/MJ7JJGqVzwIW--