Peter Taps
2010-Aug-04 18:55 UTC
[zfs-discuss] How to identify user-created zfs filesystems?
Folks, In my application, I need to present user-created filesystems. For my test, I created a zfs pool called mypool and two file systems called cifs1 and cifs2. However, when I run "zfs list," I see a lot more entries: # zfs list NAME USED AVAIL REFER MOUNTPOINT mypool 1.31M 1.95G 33K /volumes/mypool mypool/cifs1 1.12M 1.95G 1.12M /volumes/mypool/cifs1 mypool/cifs2 44K 1.95G 44K /volumes/mypool/cifs2 syspool 3.58G 4.23G 35.5K legacy syspool/dump 716M 4.23G 716M - syspool/rootfs-nmu-000 1.85G 4.23G 1.36G legacy syspool/rootfs-nmu-001 53.5K 4.23G 1.15G legacy syspool/swap 1.03G 5.19G 71.4M - I just need to present cifs1 and cifs2 to the user. Is there a property on the filesystem that I can use to determine user-created filesystems? Thank you in advance for your help. Regards, Peter -- This message posted from opensolaris.org
Cindy Swearingen
2010-Aug-04 19:06 UTC
[zfs-discuss] How to identify user-created zfs filesystems?
Hi Peter, I don''t think we have any property that determines who created the file system. Would this work instead: # zfs list -r mypool NAME USED AVAIL REFER MOUNTPOINT mypool 172K 134G 33K /mypool mypool/cifs1 31K 134G 31K /mypool/cifs1 mypool/cifs2 31K 134G 31K /mypool/cifs2 Or, take a look at user properties, which is text that you can apply to a file system for whatever purpose you choose. Thanks, Cindy On 08/04/10 12:55, Peter Taps wrote:> Folks, > > In my application, I need to present user-created filesystems. For my test, I created a zfs pool called mypool and two file systems called cifs1 and cifs2. However, when I run "zfs list," I see a lot more entries: > > # zfs list > NAME USED AVAIL REFER MOUNTPOINT > mypool 1.31M 1.95G 33K /volumes/mypool > mypool/cifs1 1.12M 1.95G 1.12M /volumes/mypool/cifs1 > mypool/cifs2 44K 1.95G 44K /volumes/mypool/cifs2 > syspool 3.58G 4.23G 35.5K legacy > syspool/dump 716M 4.23G 716M - > syspool/rootfs-nmu-000 1.85G 4.23G 1.36G legacy > syspool/rootfs-nmu-001 53.5K 4.23G 1.15G legacy > syspool/swap 1.03G 5.19G 71.4M - > > I just need to present cifs1 and cifs2 to the user. Is there a property on the filesystem that I can use to determine user-created filesystems? > > Thank you in advance for your help. > > Regards, > Peter
Mark J Musante
2010-Aug-04 19:16 UTC
[zfs-discuss] How to identify user-created zfs filesystems?
You can use ''zpool history -l syspool'' to show the username of the person who created the dataset. The history is in a ring buffer, so if too many pool operations have happened since the dataset was created, the information is lost. On Wed, 4 Aug 2010, Peter Taps wrote:> Folks, > > In my application, I need to present user-created filesystems. For my test, I created a zfs pool called mypool and two file systems called cifs1 and cifs2. However, when I run "zfs list," I see a lot more entries: > > # zfs list > NAME USED AVAIL REFER MOUNTPOINT > mypool 1.31M 1.95G 33K /volumes/mypool > mypool/cifs1 1.12M 1.95G 1.12M /volumes/mypool/cifs1 > mypool/cifs2 44K 1.95G 44K /volumes/mypool/cifs2 > syspool 3.58G 4.23G 35.5K legacy > syspool/dump 716M 4.23G 716M - > syspool/rootfs-nmu-000 1.85G 4.23G 1.36G legacy > syspool/rootfs-nmu-001 53.5K 4.23G 1.15G legacy > syspool/swap 1.03G 5.19G 71.4M - > > I just need to present cifs1 and cifs2 to the user. Is there a property on the filesystem that I can use to determine user-created filesystems? > > Thank you in advance for your help. > > Regards, > Peter > -- > This message posted from opensolaris.org > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >Regards, markm
Peter Taps
2010-Aug-05 16:56 UTC
[zfs-discuss] How to identify user-created zfs filesystems?
Thank you all for your help. It turns out that I just need to ignore the ones that have their mount points either not defined or are marked as "legacy." It is good to learn about history command. Could come in handy. Regards, Peter -- This message posted from opensolaris.org