Access PC-BSD tank from TrueOS


I installed TrueOS on another internal hard drive.
Is there a way to mount my old pc-bsd tank from my TrueOS?
When I click on the Mount Tray it says, “The device could not be mounted. Please try again later.”


I suspect that if you do import the pool in a traditional way, it will bring TrueOS Desktop to a halt.

[PC-BSD Testing] failed to initialize ZFS library afer read-only mount, to an empty point, of an inactive boot environment (2016-01-08)

Arising partly from that experience: Feature #6780: zfs(8) temporary mount point properties should include mountpoint - illumos gate -

Boot environments

As far as I can tell, the mount subcommand of beadm(1) does not allow what’s required.

A few weeks ago I tried, failed to find relevant source code.


If the PCBSD tank is ZFS, you want to investigate the “altroot” option. man zpool, look at import and altroot properties


Oh, boy, per I did:

zpool create -R /media tank /dev/ada0

instead of

zpool import -R /media tank /dev/ada0

Is there any way of getting it back or am I hosed?


Ouch. I’m assuming /dev/ada0 was truly the old device (TrueOS installed on say ada1?)? mount should show you if there’s anything mounted at /media, if there is ls -al /media will tell you what is there.
I’m guessing that the “create” did exactly what you asked it to do and created a pool named tank on the devce at /dev/ada0 and mounted it a /media.

Is there any way to roll back this command? Not to my knowledge, but maybe someone knows some magic.


Yeah, nothing mounted on /media/tank, now. At least I backed up /etc and /home/mjanosi before destroying it.


Yep, sorry.
For the record, I always check at least 3 times before hitting enter on any filesystem command that “creates” or “destroys”.
At least now you have a fresh pool to muck with .


As far as I know: the property can not be set without importing the pool.

For anyone else who encounters this situation … if you have a second machine, and a third drive with enough free space, it will probably be easiest to:

  1. remove the internal drive
  2. use it to boot a second machine
  3. copy the data to a third drive, using a pool name and mount point that will not conflict with any name or point in the first machine.


Second machine, third drive will work, but simply adding the -R option to a zpool import command works fine. -R is “alternate root”, a different mount point. The OPs problem was he typed in zpool create instead of zpool import and didn’t catch it until after hitting enter. :wink:

Mountpoints are cheap, so one way that may have been easy to follow would have been to do the following as root:
mkdir /oldtank
zpool import -R /oldtank /dev/adap0

than all zfs filesystems/dataset would start at /oldtank, they could have been copied/zfs sent where they needed to be, then zpool export and zpool create to clear the old drive.


Thanks, I looked at the manual page umpteen times, I don’t know how I missed that … probably invalidates my illumos feature request.


Man pages have lots of information, not easily searchable and if you’re not sure what you’re looking for, it’s easy to miss what you’re looking for. I also have a tendency to not spell things out in answers, not because I’m trying to hide anything, but I’ve always learned better when I’m forced to work for the answer. That’s why you’ll see stuff from me like: “man zpool, look for altroot”.


If you plan to keep this old pool, I’d HIGHLY recommend changing its mountpoints to prevent yourself from accidentally mounting it over your TrueOS pool/datasets. A simple “zfs mount” might be enough to end up with a completely garbled system. (been there, done that, love zfs for its snapshots :wink: )