DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD General

NetBSD General Other questions regarding NetBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 3rd December 2015
rons's Avatar
rons rons is offline
Snoozing
 
Join Date: Oct 2015
Posts: 69
Default extended attributes

I'm setting up the extended attributes like this:

Code:
# Initialize the extended attrib backend: (only done once).
mkdir -p /.attribute/user
mkdir -p ./attribute/system
cd /.attribute/user
extattrctl initattr -p / 4096 ./extattrstore
extattrctl start /
Code:
#Then, I enable the "author" extended attribute
extattrctl enable / user author /.attribute/user/extattrstore
Code:
#Then I set and retrieve the author attribute for the file joes-stuff.txt:
# Set
setextattr user author "Joe Jimmy" /home/jake/joes-stuff.txt
# Get
getextattr -x user author /home/jake/joes-stuff.txt
This seems to work great! I can build a little script to make this a snap. A couple things I wonder about. The initattr step seems to go into a recursive store build (eventually getting to 50G of null bytes) before I killed it. The only non-null bytes were the first few:

Code:
d5ec 00b5 0003 0000 1000 0000 0000 0000 and then 0000 -> up to 50G
So, the initialization adds very little to the store. Everything worked OK (seemingly) with the huge mostly empty store backing. I wonder if I should report this as a bug? Or am I doing something stupid to make it build recursively? The extended attributes seem to work great (based on the small amount of time spent playing with it), even with 50G of null bytes at the end of the store file. Anybody else use this stuff?

Last edited by rons; 3rd December 2015 at 07:17 PM.
Reply With Quote
  #2   (View Single Post)  
Old 3rd December 2015
rons's Avatar
rons rons is offline
Snoozing
 
Join Date: Oct 2015
Posts: 69
Default How robust is it?

I like to think about what I might do with extended attributes, but I wonder about the reliability/robustness of extended attributes on NetBSD. It seems not much used, and that could translate to "there are still things that must be ironed out." How can that all important store file be safeguarded? How likely is it to become corrupt? There are other questions.

For instance, can I copy a file and be assured the attributes will follow? Can I tarball a bunch of files and be assured that the attributes will be included, and subsequently expanded? I have no idea whether or not those kinds of operations can be safely executed with extended attributes. Is there anyone here on the forum who has done this kind of thing (especially looking for someone who has done it for a pretty long time)?

Seems to have potential though...

Last edited by rons; 3rd December 2015 at 07:20 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
jQuery 1.6 has better attributes J65nko News 0 3rd May 2011 06:17 PM
OpenBSD Extended partition support changes J65nko News 1 24th March 2011 01:34 AM
sed(1) support for Extended Regulare Expressions (ERE) J65nko OpenBSD General 0 25th January 2010 05:46 PM
When will be possible install BSD system on extended partitions? aleunix Off-Topic 5 15th December 2009 08:47 AM
Allow i386 and amd64 to boot from extended DOS partitions lvlamb OpenBSD General 4 16th July 2008 03:24 PM


All times are GMT. The time now is 10:04 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick