06-08-2015
If he used zpool create with the existing lun, the data and former pool is lost, no matter the names.
Regards.
10 More Discussions You Might Find Interesting
1. Filesystems, Disks and Memory
Hi,
Can I do the following:
On SunOS 5.8
/etc/vfstab:
remote-host:/Volumes/webdata - /export/home/webdata nfs - yes rw,vers=3,soft,intr,bg,timeo=600
In /etc/auto_direct:
/home/science $HOST:/export/home/webdata/science
/home/science-edu ... (2 Replies)
Discussion started by: bloyall
2 Replies
2. Solaris
I've been wondering about this one, is there any way to do the following with ZFS ACL's (i.e. "copy" the ACL over to another file)?
getfacl /bla/dir1 | setfacl -f - /bla/dir2
I know about inheritence on dirs, it doesn't work in this scenario I'm working on. Just looking to copy the ACL's.
... (3 Replies)
Discussion started by: vimes
3 Replies
3. Shell Programming and Scripting
Hey guys.. I am not sure if this is the right place to post this - but here goes. I need to manipulate an openldap export to match a different schema so that I can import into that system. Basically - its just text manipulation. I have gotten alot of it done just by using simple sed, but I am sorta... (0 Replies)
Discussion started by: i2ambler
0 Replies
4. Solaris
Hello, I have a problem on my backup server. I lost my system hdd and my separate ZIL device while the system crashs and now I'm in trouble. The old system was running under the least version of osol/dev (snv_134) with zfs v22.
After the server crashs I was very optimistic of solving the problems... (2 Replies)
Discussion started by: ron2105
2 Replies
5. Shell Programming and Scripting
I have a calling script which consists of calls to other scripts via the sh command.
ie vi callscript.sh
sh smallscript1.sh
extra unix commands
sh smallscript2.sh
exit
In smallscript1, I prompt for a filename, which I handle via :-
read f1
export f1
I then need... (5 Replies)
Discussion started by: malts18
5 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I need to export an existing PGP key and import it into GnuPG on a different machine.
This is how I did the export:
pgp -kx myuser _myuser_public
pgp -kx myuser _myuser_private secring.skr
(this is from the pgp installation directory that contains secring.skr).
This produced two... (0 Replies)
Discussion started by: imchi
0 Replies
7. Solaris
I have a role.
lets call it "Oracle Backup"
that role has the following profiles:
oraback@devl0:~$ profiles
formaters
zoneadm
Oracle Backup
ZFS File System Management
ZFS Storage Management
Basic Solaris User
All
but when I try to export a zpool:
oraback@devl0:~$ zpool export... (3 Replies)
Discussion started by: os2mac
3 Replies
8. Homework & Coursework Questions
Hi Guys,
I Just wanted your opinion/ suggestion/ Help on my unix script about db2 export data with deli file and import into oracle.
db2 connect to Tablename user id using psswrd
db2 "EXPORT TO '/cardpro/brac/v5/dev/dat/AAAAA.DEL' OF DEL select * FROM AAAAA"
db2 "EXPORT TO... (3 Replies)
Discussion started by: Sonny_103024
3 Replies
9. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
is this enough to make the data perfect export into delimited file? there are some posted that i read, they... (9 Replies)
Discussion started by: Sonny_103024
9 Replies
10. Solaris
On an OmniOS server, I removed a single-disk pool I was using for testing.
Now, when I run zpool import it will show it as FAULTED, since that single disk not available anymore.
# zpool import
pool: fido
id: 7452075738474086658
state: FAULTED
status: The pool was last... (11 Replies)
Discussion started by: priyadarshan
11 Replies
LEARN ABOUT CENTOS
libtalloc_pools
libtalloc_pools(3) talloc libtalloc_pools(3)
NAME
libtalloc_pools - Chapter 5: Memory pools
Memory pools
Allocation of a new memory is an expensive operation and large programs can contain thousands of calls of malloc() for a single
computation, where every call allocates only a very small amount of the memory. This can result in an undesirable slowdown of the
application. We can avoid this slowdown by decreasing the number of malloc() calls by using a memory pool.
A memory pool is a preallocated memory space with a fixed size. If we need to allocate new data we will take the desired amount of the
memory from the pool instead of requesting a new memory from the system. This is done by creating a pointer that points inside the
preallocated memory. Such a pool must not be reallocated as it would change its location - pointers that were pointing inside the pool
would become invalid. Therefore, a memory pool requires a very good estimate of the required memory space.
The talloc library contains its own implementation of a memory pool. It is highly transparent for the programmer. The only thing that needs
to be done is an initialization of a new pool context using talloc_pool() - which can be used in the same way as any other context.
Refactoring of existing code (that uses talloc) to take the advantage of a memory pool is quite simple due to the following properties of
the pool context:
o if we are allocating data on a pool context, it takes the desired amount of memory from the pool,
o if the context is a descendant of the pool context, it takes the space from the pool as well,
o if the pool does not have sufficient portion of memory left, it will create a new non-pool context, leaving the pool intact
/* allocate 1KiB in a pool */
TALLOC_CTX *pool_ctx = talloc_pool(NULL, 1024);
/* Take 512B from the pool, 512B is left there */
void *ptr = talloc_size(pool_ctx, 512);
/* 1024B > 512B, this will create new talloc chunk outside
the pool */
void *ptr2 = talloc_size(ptr, 1024);
/* The pool still contains 512 free bytes
* this will take 200B from them. */
void *ptr3 = talloc_size(ptr, 200);
/* This will destroy context 'ptr3' but the memory
* is not freed, the available space in the pool
* will increase to 512B. */
talloc_free(ptr3);
/* This will free memory taken by 'pool_ctx'
* and 'ptr2' as well. */
talloc_free(pool_ctx);
The above given is very convenient, but there is one big issue to be kept in mind. If the parent of a talloc pool child is changed to a
parent that is outside of this pool, the whole pool memory will not be freed until the child is freed. For this reason we must be very
careful when stealing a descendant of a pool context.
TALLOC_CTX *mem_ctx = talloc_new(NULL);
TALLOC_CTX *pool_ctx = talloc_pool(NULL, 1024);
struct foo *foo = talloc(pool_ctx, struct foo);
/* mem_ctx is not in the pool */
talloc_steal(mem_ctx, foo);
/* pool_ctx is marked as freed but the memory is not
deallocated, accessing the pool_ctx again will cause
an error */
talloc_free(pool_ctx);
/* This deallocates the pool_ctx. */
talloc_free(mem_ctx);
It may often be better to copy the memory we want instead of stealing it to avoid this problem. If we do not need to retain the context
name (to keep the type information), we can use talloc_memdup() to do this.
Copying the memory out of the pool may, however, discard all the performance boost given by the pool, depending on the size of the copied
memory. Therefore, the code should be well profiled before taking this path. In general, the golden rule is: if we need to steal from the
pool context, we should not use a pool context.
Version 2.0 Tue Jun 17 2014 libtalloc_pools(3)