Date: Wed, 25 Apr 2007 23:24:37 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Alexey Tarasov <master@preved.cn> Cc: current@freebsd.org Subject: Re: ZFS and mv utility Message-ID: <20070425212437.GO34663@garage.freebsd.pl> In-Reply-To: <C8DC4B59-C431-4404-8E15-E09412E1368B@preved.cn> References: <C8DC4B59-C431-4404-8E15-E09412E1368B@preved.cn>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070425212437.GO34663>