chflags (uappnd) on ZFS
Jeremy Chadwick
freebsd at jdc.parodius.com
Tue Feb 8 10:12:52 UTC 2011
On Tue, Feb 08, 2011 at 10:18:55AM +0100, Damien Fleuriot wrote:
> Getting the very same error on 8.2-RC3 amd64
>
> FreeBSD mybsd 8.2-RC3 FreeBSD 8.2-RC3 #1: Thu Feb 3 11:03:48 CET 2011
> root at mybsd:/usr/obj/usr/src/sys/DAM amd64
>
> mybsd# zpool get version data
> NAME PROPERTY VALUE SOURCE
> data version 15 default
>
> mybsd# zfs get version
> NAME PROPERTY VALUE SOURCE
> data version 4
>
>
> On 2/7/11 8:52 PM, Michael wrote:
> > Hello,
> >
> > Is uappnd flag supported on ZFS? I'm using 8.1-R and when I try to:
> > chflags uappnd file.txt
> > then I get:
> > chflags: file.txt: Operation not supported
It looks like the implemented/translated chflags(2) bits are:
SF_IMMUTABLE ("chflags schg") <--> ZFS_IMMUTABLE
SF_APPEND ("chflags sappnd") <--> ZFS_APPENDONLY
SF_NOUNLINK ("chflags sunlnk") <--> ZFS_NOUNLINK
UF_NODUMP ("chflags nodump") <--> ZFS_NODUMP
This is based on "grep -r FLAG_CHANGE /usr/src/sys/cddl", and reading
src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h. I
assume that one can use the inverse operations (clearing bits) as well.
Please see the chflags(2) man page (don't skim please) for details of
what the difference is between SF_xxx and UF_xxx flags.
--
| Jeremy Chadwick jdc at parodius.com |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP 4BD6C0CB |
More information about the freebsd-fs
mailing list