GNU bug report logs - #12301
tail -F & ZFS

Previous Next

Package: coreutils;

Reported by: Raimonds Miltins <raimonds <at> pro-9.com>

Date: Wed, 29 Aug 2012 06:57:02 UTC

Severity: normal

Merged with 12498, 16080, 18492

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #30 received at 12301 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Jim Meyering <jim <at> meyering.net>
Cc: Erik Auerswald <auerswal <at> unix-ag.uni-kl.de>,
	Bernhard Voelker <mail <at> bernhard-voelker.de>, 12301 <at> debbugs.gnu.org
Subject: Re: bug#12301: tail -F & ZFS
Date: Wed, 29 Aug 2012 17:11:54 +0100
On 08/29/2012 04:13 PM, Jim Meyering wrote:
> reopen 12301
> thanks
> 
> Erik Auerswald wrote:
>> On Wed, Aug 29, 2012 at 11:33:13AM +0200, Bernhard Voelker wrote:
>>> On 08/29/2012 11:12 AM, Jim Meyering wrote:
>>>>> Can we be sure that 0x2fc12fc1 is used for all ZFS
>>>>> implementations?
>>>>
>>>> If there end up being two or more magic numbers for the same file
>>>> system (or ZFS variants going by new names), we'll adapt.
>>>
>>> Ok, that sounds good. Thanks.
>>
>> How can I check this magic number on a Solaris 10 system with ZFS?
>> Neither GNU coreutils nor a C compiler installed. :-(
>>
>> $ uname -a
>> SunOS demchpux 5.10 Generic_138888-08 sun4v sparc SUNW,SPARC-Enterprise-T5120
>> $ df -n /
>> /                  : zfs
>> $ df -g /
>> /                  (/                 ):       131072 block size           512 frag size
>>        0 total blocks   82144537 free blocks 82144537 available       82388038 total files
>> 82144537 free files     67174412 filesys id
>>      zfs fstype       0x00000004 flag             255 filename length
> 
> Thanks for your interest.
> If you have perl of python, you can have them call statvfs,
> then simply run truss on the script and you'll see what
> statvfs produces, one field of which should be an "fsid" member:
> 
> However, your query prompted me to build the latest on
> a Solaris 10 system and see:
> 
>     sol10$ ./stat --fo=%T -f /
>     zfs
>     sol10$ truss -v statvfs ./stat --fo=%T -f /
>     ...
>     statvfs64("/", 0xFFBFFAA8)                      = 0
>             bsize=131072     frsize=512       blocks=117101360 bfree=92845257
>             bavail=92845257  files=93143101   ffree=92845257  favail=92845257
>             fsid=0x4010002   basetype=zfs     namemax=255
>             flag=ST_NOTRUNC
>             fstr=""
>     ...
> 
> Hmm... fsid=0x4010002.
> That is definitely not the same number as what is now recorded in
> stat.c, so this deserves more investigation:
> 
>     case S_MAGIC_ZFS: /* 0x2FC12FC1 local */
>       return "zfs";
> 
> This also shows there is room for improvement.
> (should print the hexadecimal FSID):
> 
>     sol10$ ./stat --fo=%t -f /
>     ?
> 
> This latter might deserve its own bug, but for now,
> I've simply reopened the original ZFS-related bug.

I don't think there is an issue here.

fsid is a per file system rather than per file system type.
So '?' is correct on Solaris as it doesn't expose the file
system type ID (it doesn't have statfs).

Also tail will default to the more portable polling
method when f_type is not available.

cheers,
Pádraig.




This bug report was last modified 10 years and 250 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.