So I don’t understand where the issue is with mount /export which is preventing the system from booting into multi-user mode.
Just read again this thread fom the beginning.
Creating snapshots cannot have any adverse effects.
Importing a root pool without taking specific precautions will create trouble, which is what you are experiencing.
In post 9 I wrote:
Quote:
There are also specific options you need to use to import a root pool as otherwise, some of the properties, especially mount points, will collide with your current root pool.
In post #13 I wrote:
Quote:
This is dubious, as I already wrote, you need specific options to import a root pool, at least a different root mountpoint.
Hi Folks,
I'm a serious UNIX newbie... I'm using a bash shell on Mac OS X.
Basically I took up unix in order to use a specific image processing software package... I've learned enough to write a script to batch process all of my images, but I have so many that I would like to use an... (1 Reply)
Hi ,
We are using Veritas Net Backup , I want to create a new policy for backing up the (Solaris Operating System & the file systems) only the OS. not Full backup because we have an other policy for Oracle Apps and it takes full backup for all Partitions.
I need the OS backup to be in... (2 Replies)
I have a Solaris 10 container that is running on ZFS filesystems being presented from the Global Zone.
I have a filesystem presented to the Local zone and my user wants me to remove it.
It there any way I can remove this while the zone is running?
I tried unmounting it from the local zone... (0 Replies)
how would a make a complete backup of all files spanning all file systems on my SCO box to tape?
i read somewhere:
find . -print | cpio -ocv > /dev/rStp0
from / ... will this do it??
(yes /dev/rStp0 is my tape drive) (11 Replies)
Hi,
I want to take backup of files older than 20 days from a directory onto a tape drive on remote machine on Solaris.
The files are of format abc-20100301000000.gz on my local machine.
I know the below commands for searching files older than x days and command for backup procedure.
solar1 #... (7 Replies)
Hi Guys
I have one Global Zone and 2 non-global zones.
root@solar109
# zoneadm list -icv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
20 solar109b running ... (1 Reply)
I have noticed that when I copy files to flash disk and in UI I see message copy completed in notification area on task bar, usually copy is not completed. So, if I eject the media I loose data.
It is very serious problem because may cause loss of valuable and even critical data.
Moreover, when... (2 Replies)
Hi Guys,
I want to take backup of a ZFS file system on tape drive.
Can anybody help me with this?
Thanks,
Pras (0 Replies)
Discussion started by: prashant2507198
0 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)