Re: [zfs-discuss] libzfs API: sharenfs, sharesmb, shareiscsi, $custom ?
Jorgen, > As the developer of software that exports data/shares like that of NFS and > Samba. (HTTP/UPnP export, written in C) I am curious if the libzfs API is > flexible enough for me to create my own file-system attributes, similar to > that of "sharenfs" and obtain this information in my software. > > Perhaps something in the lines of: > > zfs -o shareupnp=on zpool1/media ZFS allows user-defined attributes to be set on datasets. So how about something like that: zfs set net.lundman:shareupnp=on rpool/export/ext > And I will modify my streamer software to do the necessary calls to obtain > the file-systems set to export. > > Or are there other suggestions to achieve similar results? I could mirror > "sharenfs" but I was under the impression that the API is flexible. The > ultimate goal is to move away from static paths listed in the config file. That's a perfect use case for user-defined attributes -- Regards, Cyril ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] Books on File Systems and File System Programming
On Fri, Aug 14, 2009 at 12:34:50PM +0200, Joerg Schilling wrote: > Louis-Fr?d?ric Feuillette wrote: > > > I saw this question on another mailing list, and I too would like to > > know. And I have a couple questions of my own. > > > > == Paraphrased from other list == > > Does anyone have any recommendations for books on File Systems and/or > > File Systems Programming? > > == end == "Solaris Internals" has a chapter on Filesystems which talks about the VNODE/VFS layer and how they interface with different filesystems. You might find this useful as well. Thanks and regards, Sanjeev. > > Are you interested in how to write a filesystem or in how to write the > filesystem/kernel interface part? > > If it is the latter, you will not get help from Linux related books. > > J?rg > > -- > EMail:jo...@schily.isdn.cs.tu-berlin.de (home) J?rg Schilling D-13353 Berlin >j...@cs.tu-berlin.de(uni) >joerg.schill...@fokus.fraunhofer.de (work) Blog: > http://schily.blogspot.com/ > URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily > ___ > zfs-discuss mailing list > zfs-discuss@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss -- Sanjeev Bagewadi Solaris RPE Bangalore, India ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] order bug, legacy mount and nfs sharing
Hi kurosan, kurosan wrotes; Hi, I've encountered this bug: http://www.opensolaris.org/jive/thread.jspa?threadID=108316&tstart=30 and to obviate to the problem I'm using legacy mounts. Now the system boot without problems, but nfs server doesn't start because couldn't find any share. So I've disabled nfs with zfs set sharenfs=off on my zfs filesystems and tried to use the share command. The filesystem are correctly mounted at boot, but if I try to configure nfs share with: share -F nfs /pathname I get: Could not share: /pathname: system error I met the same but probably it cannot work. check zfs get all your_pool_mounted_/pathname you can see 'mountpoint' is 'legacy' so you have to use zfs sharenfs=on again to try and I cant see the bug in detail but you might run the workaround bugzilla says. I'm very new to solaris... so please bear with me^^ Thanks. No problem at all :) you seem japanese right? if so,please subscribe ug-jpousg ML. You can ask in Japansese. for more detail check:http://mail.opensolaris.org/mailman/listinfo/ug-jposug -masasfumi Leader of TSUG(Tokyo OpenSolaris User Group) ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] *Almost* empty ZFS filesystem - 14GB?
i'm not sure if it applies to your situation, but when i FIRST starting using ZFS on freebsd, i noticed a similar error, where a filesystem would be totally empty and still show 14 GB space...it's weird but i remember this because i had quotas set (freebsd didn't have refquotas at the time). We had a user who kept running out of space, but swore he shouldn' be, so we deleted all the files and sure enough, it was empty with 14 gb still showing...the only way i was able to solve it was to destroy the filesystem and create it again...i remember this happening 2 times on freebsd 7.2 which used version 6 of ZFS (a much older version) I'm not sure if this is a common bug or not but i HAVE seen it. On Sun, Aug 16, 2009 at 4:49 PM, Chris Murray wrote: > Accidentally posted the below earlier against ZFS Code, rather than ZFS > Discuss. > > My ESXi box now uses ZFS filesystems which have been shared over NFS. > Spotted something odd this afternoon - a filesystem which I thought didn't > have any files in it, weighs in at 14GB. Before I start deleting the empty > folders to see what happens, any ideas what's happened here? > > # zfs list | grep temp > zp/nfs/esx_temp 14.0G 225G 14.0G /zp/nfs/esx_temp > # ls -la /zp/nfs/esx_temp > total 20 > drwxr-xr-x 5 root root 5 Aug 13 12:54 . > drwxr-xr-x 7 root root 7 Aug 13 12:40 .. > drwxr-xr-x 2 root root 2 Aug 13 12:53 iguana > drwxr-xr-x 2 root root 2 Aug 13 12:54 meerkat > drwxr-xr-x 2 root root 2 Aug 16 19:39 panda > # ls -la /zp/nfs/esx_temp/iguana/ > total 8 > drwxr-xr-x 2 root root 2 Aug 13 12:53 . > drwxr-xr-x 5 root root 5 Aug 13 12:54 .. > # ls -la /zp/nfs/esx_temp/meerkat/ > total 8 > drwxr-xr-x 2 root root 2 Aug 13 12:54 . > drwxr-xr-x 5 root root 5 Aug 13 12:54 .. > # ls -la /zp/nfs/esx_temp/panda/ > total 8 > drwxr-xr-x 2 root root 2 Aug 16 19:39 . > drwxr-xr-x 5 root root 5 Aug 13 12:54 .. > # > > Could there be something super-hidden, which I can't see here? > > There don't appear to be any snapshots relating to zp/nfs/esx_temp. > > On a suggestion, I have ran the following: > > # zfs list -r zp/nfs/esx_temp > NAME USED AVAIL REFER MOUNTPOINT > zp/nfs/esx_temp 14.0G 225G 14.0G /zp/nfs/esx_temp > # du -sh /zp/nfs/esx_temp > 8K /zp/nfs/esx_temp > # > > Thanks, > Chris > -- > This message posted from opensolaris.org > ___ > zfs-discuss mailing list > zfs-discuss@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss > ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
[zfs-discuss] libzfs API: sharenfs, sharesmb, shareiscsi, $custom ?
Hello list, As the developer of software that exports data/shares like that of NFS and Samba. (HTTP/UPnP export, written in C) I am curious if the libzfs API is flexible enough for me to create my own file-system attributes, similar to that of "sharenfs" and obtain this information in my software. Perhaps something in the lines of: zfs -o shareupnp=on zpool1/media And I will modify my streamer software to do the necessary calls to obtain the file-systems set to export. Or are there other suggestions to achieve similar results? I could mirror "sharenfs" but I was under the impression that the API is flexible. The ultimate goal is to move away from static paths listed in the config file. Lund -- Jorgen Lundman | Unix Administrator | +81 (0)3 -5456-2687 ext 1017 (work) Shibuya-ku, Tokyo| +81 (0)90-5578-8500 (cell) Japan| +81 (0)3 -3375-1767 (home) ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] *Almost* empty ZFS filesystem - 14GB?
>> what the heck is refreservation ?? 8-) >> > > PSARC/2009/204 ZFS user/group quotas & space accounting [1] > Integrated in build 114 > > [1] http://arc.opensolaris.org/caselog/PSARC/2009/204/ > [2] http://mountall.blogspot.com/2009/05/sxce-build-114-is-out.html that was fast . Cyril, long time no hear. :-( Hows life the universe and risc processors for you these days ? -- Dennis Clarke dcla...@opensolaris.ca <- Email related to the open source Solaris dcla...@blastwave.org <- Email related to open source for Solaris ps: I have been busy porting as per usual. New 64-bit ready Tk/Tcl released today. ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] *Almost* empty ZFS filesystem - 14GB?
On Mon, Aug 17, 2009 at 12:31 AM, Dennis Clarke wrote: > >> Chris Murray wrote: >>> Accidentally posted the below earlier against ZFS Code, rather than ZFS >>> Discuss. >>> >>> My ESXi box now uses ZFS filesystems which have been shared over NFS. >>> Spotted something odd this afternoon - a filesystem which I thought >>> didn't have any files in it, weighs in at 14GB. Before I start deleting >>> the empty folders to see what happens, any ideas what's happened here? >>> >>> # zfs list | grep temp >>> zp/nfs/esx_temp 14.0G 225G 14.0G /zp/nfs/esx_temp >>> # ls -la /zp/nfs/esx_temp >>> total 20 >>> drwxr-xr-x 5 root root 5 Aug 13 12:54 . >>> drwxr-xr-x 7 root root 7 Aug 13 12:40 .. >>> drwxr-xr-x 2 root root 2 Aug 13 12:53 iguana >>> drwxr-xr-x 2 root root 2 Aug 13 12:54 meerkat >>> drwxr-xr-x 2 root root 2 Aug 16 19:39 panda >>> # ls -la /zp/nfs/esx_temp/iguana/ >>> total 8 >>> drwxr-xr-x 2 root root 2 Aug 13 12:53 . >>> drwxr-xr-x 5 root root 5 Aug 13 12:54 .. >>> # ls -la /zp/nfs/esx_temp/meerkat/ >>> total 8 >>> drwxr-xr-x 2 root root 2 Aug 13 12:54 . >>> drwxr-xr-x 5 root root 5 Aug 13 12:54 .. >>> # ls -la /zp/nfs/esx_temp/panda/ >>> total 8 >>> drwxr-xr-x 2 root root 2 Aug 16 19:39 . >>> drwxr-xr-x 5 root root 5 Aug 13 12:54 .. >>> # >>> >>> Could there be something super-hidden, which I can't see here? >>> >>> There don't appear to be any snapshots relating to zp/nfs/esx_temp. >>> >>> On a suggestion, I have ran the following: >>> >>> # zfs list -r zp/nfs/esx_temp >>> NAME USED AVAIL REFER MOUNTPOINT >>> zp/nfs/esx_temp 14.0G 225G 14.0G /zp/nfs/esx_temp >>> # du -sh /zp/nfs/esx_temp >>> 8K /zp/nfs/esx_temp >>> # >>> >> >> Does >> >> zfs list -t snapshot -r zp/nfs/esx_temp >> >> show anything? >> >> What about >> >> zfs get refquota,refreservation,quota,reservation zp/fs/esx_tmp >> > > pardon me for butting in .. but I thought that was a spelling error. > > It wasn't : > > # zfs get refquota,refreservation,quota,reservation fibre0 > NAME PROPERTY VALUE SOURCE > fibre0 refquota none default > fibre0 refreservation none default > fibre0 quota none default > fibre0 reservation none default > > what the heck is refreservation ?? 8-) > PSARC/2009/204 ZFS user/group quotas & space accounting [1] Integrated in build 114 [1] http://arc.opensolaris.org/caselog/PSARC/2009/204/ [2] http://mountall.blogspot.com/2009/05/sxce-build-114-is-out.html -- Regards, Cyril ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] Books on File Systems and File System Programming
There aren't many good books on file system design. The "VAX/VMS Internals and Data Structures" book by Goldenberg covers a fair amount of the RMS file system design along with its rationale. There is also a "VMS File System Internals" book which I haven't yet read. Apple's early Inside Macintosh volumes include a good description of MFS and HFS (which became HFS+) and the rationale behind HFS. There are many good academic papers. I would suggest starting with McKusick's exposition on UFS and Selzer et al's work on log-structured file systems, if you're interested in traditional UNIX-style (stream-of-bytes) file systems. If you're willing to go a little deeper, IBM has published a variety of papers related to file systems through the years, starting in the 1960s or so. The database literature is a rich source of ideas for file systems. In particular, you should understand a bit about journaling. -- This message posted from opensolaris.org ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] *Almost* empty ZFS filesystem - 14GB?
Thanks Tim. Results are below: # zfs list -t snapshot -r zp/nfs/esx_temp no datasets available # zfs get refquota,refreservation,quota,reservation zp/nfs/esx_temp NAME PROPERTYVALUE SOURCE zp/nfs/esx_temp refquotanone default zp/nfs/esx_temp refreservation none default zp/nfs/esx_temp quota none default zp/nfs/esx_temp reservation none default # I'm 99% sure I've done something 'obvious', which is escaping me at the minute. The filesystem only has 3 folders in it, which are all empty, so I could very quickly destroy and recreate, but it has piqued my curiosity enough to wonder what's happened here. -- This message posted from opensolaris.org ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] *Almost* empty ZFS filesystem - 14GB?
> Chris Murray wrote: >> Accidentally posted the below earlier against ZFS Code, rather than ZFS >> Discuss. >> >> My ESXi box now uses ZFS filesystems which have been shared over NFS. >> Spotted something odd this afternoon - a filesystem which I thought >> didn't have any files in it, weighs in at 14GB. Before I start deleting >> the empty folders to see what happens, any ideas what's happened here? >> >> # zfs list | grep temp >> zp/nfs/esx_temp 14.0G 225G 14.0G /zp/nfs/esx_temp >> # ls -la /zp/nfs/esx_temp >> total 20 >> drwxr-xr-x 5 root root 5 Aug 13 12:54 . >> drwxr-xr-x 7 root root 7 Aug 13 12:40 .. >> drwxr-xr-x 2 root root 2 Aug 13 12:53 iguana >> drwxr-xr-x 2 root root 2 Aug 13 12:54 meerkat >> drwxr-xr-x 2 root root 2 Aug 16 19:39 panda >> # ls -la /zp/nfs/esx_temp/iguana/ >> total 8 >> drwxr-xr-x 2 root root 2 Aug 13 12:53 . >> drwxr-xr-x 5 root root 5 Aug 13 12:54 .. >> # ls -la /zp/nfs/esx_temp/meerkat/ >> total 8 >> drwxr-xr-x 2 root root 2 Aug 13 12:54 . >> drwxr-xr-x 5 root root 5 Aug 13 12:54 .. >> # ls -la /zp/nfs/esx_temp/panda/ >> total 8 >> drwxr-xr-x 2 root root 2 Aug 16 19:39 . >> drwxr-xr-x 5 root root 5 Aug 13 12:54 .. >> # >> >> Could there be something super-hidden, which I can't see here? >> >> There don't appear to be any snapshots relating to zp/nfs/esx_temp. >> >> On a suggestion, I have ran the following: >> >> # zfs list -r zp/nfs/esx_temp >> NAME USED AVAIL REFER MOUNTPOINT >> zp/nfs/esx_temp 14.0G 225G 14.0G /zp/nfs/esx_temp >> # du -sh /zp/nfs/esx_temp >> 8K /zp/nfs/esx_temp >> # >> > > Does > > zfs list -t snapshot -r zp/nfs/esx_temp > > show anything? > > What about > > zfs get refquota,refreservation,quota,reservation zp/fs/esx_tmp > pardon me for butting in .. but I thought that was a spelling error. It wasn't : # zfs get refquota,refreservation,quota,reservation fibre0 NAMEPROPERTYVALUE SOURCE fibre0 refquotanone default fibre0 refreservation none default fibre0 quota none default fibre0 reservation none default what the heck is refreservation ?? 8-) -- Dennis Clarke dcla...@opensolaris.ca <- Email related to the open source Solaris dcla...@blastwave.org <- Email related to open source for Solaris ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] *Almost* empty ZFS filesystem - 14GB?
Chris Murray wrote: Accidentally posted the below earlier against ZFS Code, rather than ZFS Discuss. My ESXi box now uses ZFS filesystems which have been shared over NFS. Spotted something odd this afternoon - a filesystem which I thought didn't have any files in it, weighs in at 14GB. Before I start deleting the empty folders to see what happens, any ideas what's happened here? # zfs list | grep temp zp/nfs/esx_temp 14.0G 225G 14.0G /zp/nfs/esx_temp # ls -la /zp/nfs/esx_temp total 20 drwxr-xr-x 5 root root 5 Aug 13 12:54 . drwxr-xr-x 7 root root 7 Aug 13 12:40 .. drwxr-xr-x 2 root root 2 Aug 13 12:53 iguana drwxr-xr-x 2 root root 2 Aug 13 12:54 meerkat drwxr-xr-x 2 root root 2 Aug 16 19:39 panda # ls -la /zp/nfs/esx_temp/iguana/ total 8 drwxr-xr-x 2 root root 2 Aug 13 12:53 . drwxr-xr-x 5 root root 5 Aug 13 12:54 .. # ls -la /zp/nfs/esx_temp/meerkat/ total 8 drwxr-xr-x 2 root root 2 Aug 13 12:54 . drwxr-xr-x 5 root root 5 Aug 13 12:54 .. # ls -la /zp/nfs/esx_temp/panda/ total 8 drwxr-xr-x 2 root root 2 Aug 16 19:39 . drwxr-xr-x 5 root root 5 Aug 13 12:54 .. # Could there be something super-hidden, which I can't see here? There don't appear to be any snapshots relating to zp/nfs/esx_temp. On a suggestion, I have ran the following: # zfs list -r zp/nfs/esx_temp NAME USED AVAIL REFER MOUNTPOINT zp/nfs/esx_temp 14.0G 225G 14.0G /zp/nfs/esx_temp # du -sh /zp/nfs/esx_temp 8K /zp/nfs/esx_temp # Does zfs list -t snapshot -r zp/nfs/esx_temp show anything? What about zfs get refquota,refreservation,quota,reservation zp/fs/esx_tmp -tim Thanks, Chris ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
[zfs-discuss] *Almost* empty ZFS filesystem - 14GB?
Accidentally posted the below earlier against ZFS Code, rather than ZFS Discuss. My ESXi box now uses ZFS filesystems which have been shared over NFS. Spotted something odd this afternoon - a filesystem which I thought didn't have any files in it, weighs in at 14GB. Before I start deleting the empty folders to see what happens, any ideas what's happened here? # zfs list | grep temp zp/nfs/esx_temp 14.0G 225G 14.0G /zp/nfs/esx_temp # ls -la /zp/nfs/esx_temp total 20 drwxr-xr-x 5 root root 5 Aug 13 12:54 . drwxr-xr-x 7 root root 7 Aug 13 12:40 .. drwxr-xr-x 2 root root 2 Aug 13 12:53 iguana drwxr-xr-x 2 root root 2 Aug 13 12:54 meerkat drwxr-xr-x 2 root root 2 Aug 16 19:39 panda # ls -la /zp/nfs/esx_temp/iguana/ total 8 drwxr-xr-x 2 root root 2 Aug 13 12:53 . drwxr-xr-x 5 root root 5 Aug 13 12:54 .. # ls -la /zp/nfs/esx_temp/meerkat/ total 8 drwxr-xr-x 2 root root 2 Aug 13 12:54 . drwxr-xr-x 5 root root 5 Aug 13 12:54 .. # ls -la /zp/nfs/esx_temp/panda/ total 8 drwxr-xr-x 2 root root 2 Aug 16 19:39 . drwxr-xr-x 5 root root 5 Aug 13 12:54 .. # Could there be something super-hidden, which I can't see here? There don't appear to be any snapshots relating to zp/nfs/esx_temp. On a suggestion, I have ran the following: # zfs list -r zp/nfs/esx_temp NAME USED AVAIL REFER MOUNTPOINT zp/nfs/esx_temp 14.0G 225G 14.0G /zp/nfs/esx_temp # du -sh /zp/nfs/esx_temp 8K /zp/nfs/esx_temp # Thanks, Chris -- This message posted from opensolaris.org ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
[zfs-discuss] strange zpool error "bad config type 16 for stats"
I have messed up the zpool on my fileserver. It has 3 1TB disks in a z1 config. r...@metallica:~# uname -a SunOS metallica 5.11 snv_111b i86pc i386 i86pc Solaris r...@metallica:~# zpool import -f pool: rzpool id: 12681757329416170242 state: FAULTED status: One or more devices contains corrupted data. action: The pool cannot be imported due to damaged devices or data. see: http://www.sun.com/msg/ZFS-8000-5E config: rzpool FAULTED corrupted data raidz1DEGRADED c7d0s1 FAULTED corrupted data c7d1s1 ONLINE c8d0s1 ONLINE r...@metallica:~# zdb -p /mnt -e rzpool version=14 name='rzpool' state=0 txg=0 pool_guid=12681757329416170242 hostid=4447284 hostname='libzpool' vdev_tree type='root' id=0 guid=12681757329416170242 bad config type 16 for stats children[0] type='raidz' id=0 guid=16080596779047081945 nparity=1 metaslab_array=23 metaslab_shift=34 ashift=9 asize=2934534832128 is_log=0 bad config type 16 for stats children[0] type='disk' id=0 guid=3515092960794277744 path='/dev/dsk/c7d0s1' devid='id1,c...@asamsung_hd103uj=s13pj9aqb16353/b' phys_path='/p...@0,0/pci-...@11/i...@0/c...@0,0:b' whole_disk=0 DTL=37 bad config type 16 for stats children[1] type='disk' id=1 guid=2332105117201928997 path='/dev/dsk/c7d1s1' devid='id1,c...@asamsung_hd103uj=s13pj90qb40727/b' phys_path='/p...@0,0/pci-...@11/i...@0/c...@1,0:b' whole_disk=0 DTL=36 bad config type 16 for stats children[2] type='disk' id=2 guid=13931150792773514278 path='/dev/dsk/c8d0s1' devid='id1,c...@asamsung_hd103uj=s13pj90qb39853/b' phys_path='/p...@0,0/pci-...@11/i...@1/c...@0,0:b' whole_disk=0 DTL=35 bad config type 16 for stats zdb: can't open rzpool: No such file or directory Not really sure where to go from here. From what I can read on this forum there may still be a way to rescue the zpool by using a previous uberblock. Is this a valid approach for this kind of error? And will zdb be able to do this automatically with the use of dd and such? I have not been able to find any solutions on the "bad config type 16 for stats" error. Any help and pointers is welcome. Thanks Bruno -- This message posted from opensolaris.org ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss