Date: Mon, 22 Aug 2016 08:10:32 +0100 From: Matthew Seaman <matthew@FreeBSD.org> To: freebsd-questions@freebsd.org Subject: Re: erm shot my foot off with zfs, q on rescue Message-ID: <2d85772f-e14c-5ca5-9e40-92dee55252bc@FreeBSD.org> In-Reply-To: <0a1676e1-2d23-bcdd-3dc3-84f39c887514@pinyon.org> References: <a33962da-71ec-bbfd-12c6-b007d7e0aa59@pinyon.org> <614e5532-b929-1e68-aa86-2e75b157565a@gmail.com> <0a1676e1-2d23-bcdd-3dc3-84f39c887514@pinyon.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --0AeT43viro5bhu2A4kmMFitFrVIRcio2J Content-Type: multipart/mixed; boundary="Og72WQmChU7w8e0BuSTLwpqWheIfrIhVh" From: Matthew Seaman <matthew@FreeBSD.org> To: freebsd-questions@freebsd.org Message-ID: <2d85772f-e14c-5ca5-9e40-92dee55252bc@FreeBSD.org> Subject: Re: erm shot my foot off with zfs, q on rescue References: <a33962da-71ec-bbfd-12c6-b007d7e0aa59@pinyon.org> <614e5532-b929-1e68-aa86-2e75b157565a@gmail.com> <0a1676e1-2d23-bcdd-3dc3-84f39c887514@pinyon.org> In-Reply-To: <0a1676e1-2d23-bcdd-3dc3-84f39c887514@pinyon.org> --Og72WQmChU7w8e0BuSTLwpqWheIfrIhVh Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 21/08/2016 01:12, Russell L. Carter wrote: > Ok, that's a start. I ran zpool import, which showed zroot, and then > did zpool import -f zroot, which happily succeeded, and this blew away > all the / mounts, so that the situation for the boot image is the same > for the system disk. That is, no / mounted directories are visible. > I've rebooted the install image and looked at mounting to an existing > directory but the mfs is read only. Running When you import a zpool, it will mount all of the ZFSes contained in it and with the canmount property set to 'yes'. So you've likely overlaid the environment you booted from with the contents of the zpool. That causes some unfortunate effects -- pretty much the only thing you can do at that point is reboot and start again. What you need to do is import the zpool but relative to an alternative root directory. That's exactly what the '-R' option is for: # mkdir /tmp/zroot # zpool import -R /tmp/zroot zroot Once imported, you will be able to fix the mountpoints in the ZFS metadata, but remember that ZFS will automatically remount ZFSes as soon as you change the mountpoint settings. Cheers, Matthew --Og72WQmChU7w8e0BuSTLwpqWheIfrIhVh-- --0AeT43viro5bhu2A4kmMFitFrVIRcio2J Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQJ8BAEBCgBmBQJXuqVuXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkAT5F0P/0h5oe/9DNWWzWzcAV3pgd/V WD/OraXqXHMBUpYAR9dK5dqTGJ2n+G1rthUi4pfKRRas9ppMZfPTzJDw5fhp0xOE T4URRRYZwODU0EUevcmRmMH7uFVrQwJpRINpHRDIi3SPeqJwXhEXRrteovAi9uoI P8DO70M4Sr89dUoUYD0zcWBk/GMewBUrd1yPxYwmsJR+tbH4qrpQd64KD5yfl1zu Gw+Zg7gdwD+2CORGXWugCQbYzWOjm2L9EzTPoUUa4v/HPHfCRzUN+zJdCRbN00ql QjzsZoa5f6vpYghjmCJguqfbkouVYzl+QKsuVU2VcauhZVq1shRVO5pM2eSCg/Qn Mr7AmAGyfhAKMxW3fKY9n8SasP7JPqJ1omWhH/mQj4mC0LGXUXkHP41PKYuR5tD5 9XafJF92GsAPHKoXr6LF+gRIWF/J26A1tihJsQkFKpTcknKlzgqXHLAA0kerVPeV N3q0NzK2HAg2NQ0jQTG40CDIMwBk+h8S0pGR2XrJH8u0m3T/P0SKxmRx8n1mT2JM mf4WgMbM/7wC+11CQ51+odunrREZFt9/8tsaxfmauxkITYavWcN1VmNYz5lq0kGE o43+QOdGrnLTwERy7r3E2lp7c31rAF7GVezLybThn3mK45cyUFes8jLBVhpg8GCm oRgFgGzcbKFNFAXOu8JS =mssG -----END PGP SIGNATURE----- --0AeT43viro5bhu2A4kmMFitFrVIRcio2J--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2d85772f-e14c-5ca5-9e40-92dee55252bc>