Axelle Apvrille
2009-Jul-27 07:51 UTC
[zfs-discuss] How to check what''s on a given ZFS file system ?
Hi, I''ve already sent a few posts around this issue, but haven''t quite got the answer - so I''ll try to clarify my question :) Since I have upgraded from 2008.11 to 2009.06 a new BE has been created. On ZFS, that corresponds to two file systems, both (strangely) mounted on /. The old BE corresponds to a file system of 7G, the new one to a fs of 3G. As I fall short of space and do not need the old 2008.11 any more, I would like to work out how to delete it. I know I should do beadm destroy <name>. But before I do that I would like to understand what I am erasing in those 7G (makes sense, doesn''t it ?). In particular, I''d like to: - understand what''s in that old 7G ? - understand why the new environment only takes 3G - possibly mount the old 7G to check what''s inside ? I''m surprised it is said to be mounted on / - understand what beadm destroy actually destroys ! Thanks very much ! Axelle $ zfs list NAME USED AVAIL REFER MOUNTPOINT rpool 42.1G 5.90G 1.42G /a/rpool rpool/ROOT 10.5G 5.90G 18K legacy rpool/ROOT/opensolaris 7.18G 5.90G 6.75G / rpool/ROOT/opensolaris-1 3.30G 5.90G 7.39G / rpool/dump 895M 5.90G 895M - rpool/export 28.4G 5.90G 19K /export rpool/export/home 28.4G 5.90G 654M /export/home rpool/export/home/axelle 27.8G 5.90G 27.4G /export/home/axelle rpool/swap 895M 6.69G 88.3M - $ beadm list BE Active Mountpoint Space Policy Created -- ------ ---------- ----- ------ ------- opensolaris - - 7.57G static 2009-01-03 13:18 opensolaris-1 NR / 3.42G static 2009-07-20 22:38 -- This message posted from opensolaris.org
Fajar A. Nugraha
2009-Jul-27 08:55 UTC
[zfs-discuss] How to check what''s on a given ZFS file system ?
On Mon, Jul 27, 2009 at 2:51 PM, Axelle Apvrille<no-reply at opensolaris.org> wrote:> Hi, > I''ve already sent a few posts around this issue, but haven''t quite got the answer - so I''ll try to clarify my question :) > > Since I have upgraded from 2008.11 to 2009.06 a new BE has been created. On ZFS, that corresponds to two file systems, both (strangely) mounted on /. The old BE corresponds to a file system of 7G, the new one to a fs of 3G.Not quite. "beadm list" and the "USED" column of "zfs list" does not always correspond to the sum of data size of all it''s files/directories. Do something like this: - mkdir /a (if not''s there already) - beadm mount rpool/ROOT/opensolaris /a - df -h / - df -h /a - beadm umount rpool/ROOT/opensolaris Compare the output of df to the output of "beadm list", and you''ll see what I mean. Note that the df output should be similar to that of "REFER" from "zfs list".> As I fall short of space and do not need the old 2008.11 any more, I would like to work out how to delete it. I know I should do beadm destroy <name>. But before I do that I would like to understand what I am erasing in those 7G (makes sense, doesn''t it ?). > > In particular, I''d like to: > - understand what''s in that old 7G ? > - understand why the new environment only takes 3Gsome of the space is probably shared (as in they refer to the same block) between the old and new environment (/var comes to mind). If you destroy the old BE (which is essentially a "zfs destroy"), it might be possible that you won''t be able to reclaim all that 7G space if the new environment still refers to them. It''s actualy odd that your old BE uses more space. In my setup the new BE always uses most space. Try runnning this: zfs get all | grep origin> - possibly mount the old 7G to check what''s inside ?use "beadm mount"> I''m surprised it is said to be mounted on /No they aren''t. The "mountpoint" property merely records what the mountpoint is or will be when the fs is mounted, and not the actual current mountpoint. In your case rpool/ROOT/opensolaris is not mounted anywhere. Do this zfs get mounted,mountpoint,canmount rpool/ROOT/opensolaris rpool/ROOT/opensolaris-1> - understand what beadm destroy actually destroys !This fs> rpool/ROOT/opensolaris ? ?7.18G ?5.90G ?6.75G ?/which should be a zfs clone of this fs, or the other way around> rpool/ROOT/opensolaris-1 ?3.30G ?5.90G ?7.39G ?/-- Fajar