Date: Wed, 16 Aug 2017 15:36:22 +0100 From: Matthew Seaman <matthew@FreeBSD.org> To: freebsd-questions@freebsd.org Subject: Re: ZFS and free space Message-ID: <209906b0-4c1e-fff1-8f39-7b046494b793@FreeBSD.org> In-Reply-To: <db074f22-dc8b-5407-fb8f-6253851ce0a8@julf.com> References: <c4f933a5-e9c7-6df4-b443-dc3f4e964827@julf.com> <a4854ec0e37de576e636dac7f468e975@dweimer.net> <c9b62f68-199b-eafd-79bf-e47c44885f9a@julf.com> <126aaff1-58af-f7d5-b47e-c7d894b45606@gmail.com> <a179f76a-19ef-7576-4fc5-55ed5ce348b2@julf.com> <CADqw_g%2B4vLrS0oUdyLUgxZDTJy=z88fP-wC-EYwydSuAH3WtOA@mail.gmail.com> <db074f22-dc8b-5407-fb8f-6253851ce0a8@julf.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --pUfkEBFSVFt7IxNWge9DkUAXqbsbupikT Content-Type: multipart/mixed; boundary="AHxciXGVX1wM8EAdvrgpG0kbJx29xDtOf"; protected-headers="v1" From: Matthew Seaman <matthew@FreeBSD.org> To: freebsd-questions@freebsd.org Message-ID: <209906b0-4c1e-fff1-8f39-7b046494b793@FreeBSD.org> Subject: Re: ZFS and free space References: <c4f933a5-e9c7-6df4-b443-dc3f4e964827@julf.com> <a4854ec0e37de576e636dac7f468e975@dweimer.net> <c9b62f68-199b-eafd-79bf-e47c44885f9a@julf.com> <126aaff1-58af-f7d5-b47e-c7d894b45606@gmail.com> <a179f76a-19ef-7576-4fc5-55ed5ce348b2@julf.com> <CADqw_g+4vLrS0oUdyLUgxZDTJy=z88fP-wC-EYwydSuAH3WtOA@mail.gmail.com> <db074f22-dc8b-5407-fb8f-6253851ce0a8@julf.com> In-Reply-To: <db074f22-dc8b-5407-fb8f-6253851ce0a8@julf.com> --AHxciXGVX1wM8EAdvrgpG0kbJx29xDtOf Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable On 16/08/2017 09:03, Johan Helsingius wrote: > Hi, Mike, >=20 > On 16-08-17 07:45, Michael Schuster wrote: >> I wonder ... is zroot/usr/home part of zroot/home? Naming suggests >> otherwise. >> >> Perhaps you can try=20 >> # zfs list -t all | egrep 'home|usr'=20 >> (or simply 'zfs list -t all', if that doesn't produce too much output= ) >> and see whether that helps ... >=20 > # zfs list -t all > NAME USED AVAIL REFER MOUNTPOINT > zroot 10.2T 47.8G 140K /zroot > zroot/ROOT 3.01G 47.8G 140K none > zroot/ROOT/default 3.01G 47.8G 3.01G / > zroot/home 5.98T 47.8G 5.98T /home/storage > zroot/tmp 163K 47.8G 163K /tmp > zroot/usr 4.17T 47.8G 140K /usr > zroot/usr/home 4.17T 47.8G 4.17T /usr/home > zroot/usr/ports 1.26G 47.8G 1.26G /usr/ports > zroot/usr/src 140K 47.8G 140K /usr/src > zroot/var 1.42M 47.8G 140K /var > zroot/var/audit 140K 47.8G 140K /var/audit > zroot/var/crash 140K 47.8G 140K /var/crash > zroot/var/log 761K 47.8G 761K /var/log > zroot/var/mail 140K 47.8G 140K /var/mail > zroot/var/tmp 140K 47.8G 140K /var/tmp >=20 > So /zroot is 10T, zroot/home is 6T and zroot/usr (and zroot/usr/home) > is 4T - so clearly they are separate. But what is taking up the space > on zroot/usr/home? "du" doesn't show anything there! >=20 > # du -sh /usr/home/* > 715M /usr/home/julf > 4.2T /usr/home/storage >=20 > # file /home > /home: symbolic link to usr/home >=20 > # ls -id /usr/home/storage/ /home/storage > 18 /home/storage 18 /usr/home/storage/ Try this: # zfs umount zroot/home # du -shc /usr/home/storage If there is any directory contents under the mountpoint for your storage ZFS then when /usr/home/storage is mounted over it, it will still take up space in your zpool, but you won't be able to access it at all. Aside from anything else, I'd do this: # rm /home # zfs rename zroot/home zroot/home2 # zfs rename zroot/usr/home zroot/home # zfs rename zroot/home2 zroot/home/storage # zfs set canmount=3Don zroot/home # zfs inherit mountpoint zroot/home/storage # ln -s /usr/home /home So you should end up with zroot/home mounted on /home zroot/home/storage mounted on /home/storage Personally I like to mount /home directly rather than faffing around with symlinks, and this will make your zfs hierarchy rather less confusing. The one slight gotcha is that you have to set the 'canmount' property on zroot/home, since you don't want to inherit the 'canmount=3Doff' setting that zroot has. Cheers, Matthew --AHxciXGVX1wM8EAdvrgpG0kbJx29xDtOf-- --pUfkEBFSVFt7IxNWge9DkUAXqbsbupikT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQJ8BAEBCgBmBQJZlFhtXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATjKgQAIcbYiIjtalTjkVJBxOjOKfj 5Ya8RGiFbBGO+MVA8gIkgSz1BnDSj6cmZS6Tv3kl770k4msyJ9lINijZSmkssG+D qJxBpsdqmHc/uydrIVIN+w4hq79KfcEqwZYokkrSzvWj6nm+x9xPJQdXA30Hn8lT tSBnhuJ6Vyv94euSBnpB8SmWntXrDBIqh/p0fG2topDsG99CWQBhGCxHh8MFSO5d 8h5EDJD9ZAQ1nuwmyR0op91lEAgU/UE/4rmqcCLXq2VLfYMNqeN5atsdBGr5savU taAhJvWMbv1urDfBNGBEF/btOYnfk2aDDe0xLNXTFx4DfX3xHcec3ye2WhWNNBUb eaZ8iIt04MVnmmJdd+JGNmF61IXsVvNsGRuyf4wUjHYulbZXL2rgVAR0lkStLwny uUfT2EnmMI58E9GsiCIjuf79glqtoo82SkXCedBLPK0RCM0VVfp0zncvZWQl9aez lIEctczbvvIino1LLHvYZb+LbKRwTv97FtzVjqxhPlMNyav0SoS6GM0YEwXI2cLA khF3TtDQDT9DtacB1Dh8o0BSIkRhlLm+mOfs5uhJD1aXO+aXJbGMaZlyGR1KL4sy smTcuFvTieDvtYpx+My74OwXw+50k8qNiLnyiV6AH2CAnPJRBkdZM3HCAmY6rhdK 9GSc0Qyq+QzCklFdqaY4 =HlMI -----END PGP SIGNATURE----- --pUfkEBFSVFt7IxNWge9DkUAXqbsbupikT--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?209906b0-4c1e-fff1-8f39-7b046494b793>