Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Apr 2014 15:51:49 +0200
From:      Andreas Nilsson <andrnils@gmail.com>
To:        "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>
Subject:   Re: zfs - moving filesystem from one zpool to another
Message-ID:  <CAPS9%2BSt8Jif07e1i25UtnQPNZ4m5czywokmqzRFTg_eYyn7dBw@mail.gmail.com>
In-Reply-To: <20140407134306.GA67619@potato.growveg.org>
References:  <20140407134306.GA67619@potato.growveg.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Apr 7, 2014 at 3:43 PM, John <freebsd-lists@potato.growveg.org>wrote:

> Hello list,
>
> For other reasons I had to install pc-bsd 10 rather than the regular
> freebsd on my new desktop. Unfortunately it insisted on installing to
> the first device which is a ssd (110GB). It makes its own zpool called
> "tank" and everything gets installed there.
>
> Now, while it's great that some stuff is there on the ssd like / /boot
> and /root /var and /tmp, I'm rather less enamoured that /usr/ports /usr/src
> and /home are there too.
>
> With the hdds in the machine (ada1 ada2 and ada3) I made a raidz array
> that made 7.2TB usable space. This zpool is called "storage". I'd like
> to put the not-so-active filesystems on the zpool called "storage". A
> couple of issues though:
>
> 1. /usr/local is not it's own filesystem. Is it a case of just doing a
> recursive copy on the existing /usr/local into a newly created
> /storage/usr/local and setting the mountpoint as /usr/local (after
> deleting the old /usr/local) ?
>
Having usr/local as a separate fs works. I would not use cp to move the
files, as symlinks are not preserved.

>
> 2. /usr/ports IS it's own filesystem on tank:
> tank/usr/ports on /usr/ports (zfs, local, nfsv4acls)
>
> Can I zfs export this from tank and then zfs import it into storage ? If
> so, do I need to set a mountpoint?
>

export/import are commands that work on zpool not zfs. You want send and
receive.
zfs snapshot tank/usr/ports@now
zfs send tank/usr/ports@now | zfs recv storage/ports #or whatever you want
the name to be. Parents dataset must exist.
zfs set mountpoint=/usr/ports storage/ports

Best regards
Andreas

>
> thanks,
> --
> John
> _______________________________________________
> freebsd-fs@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPS9%2BSt8Jif07e1i25UtnQPNZ4m5czywokmqzRFTg_eYyn7dBw>