[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ezjail] creating archives under ZFS



Nathan Tice wrote:
> On Fri, 15 Jan 2010, Philipp Wuensche wrote:
>> [...] Until then, you can alway snapshot/clone or send/recv the jails
>> ZFS filesystem by hand and create the new jail with ezjail-admin -x -c
>> zfs to create a jail with preexisting root. To make this work I update
>> ezjail-admin in the CVS
>> (https://erdgeist.org/cvsweb/ezjail/ezjail-admin?rev=1.237)
>>
> I did a clone + promote on the file system snapshot I wanted, and this
> seems to have worked great.

Nice! But keep in mind that now the old filesystem depends on the
filesystem you promoted and you can not get rid of this dependency. Of
course you can always break up those two by doing zfs send/recv.

> I tried this and got the following error :
> 
> manjushri# ezjail-admin archive web1
> pax: Access/modification time set failed on: ./var/empty <Operation not
> permitted>
> Error: Archiving jail failed.
>   You might want to check and remove /root/web1-201001151233.58.tar.gz.
> manjushri#

Seems like the cpio we are doing when creating a jail without ZFS
backend is not coping the system immutable flag of /var/empty. When
managing everything in ZFS we do a zfs send/recv which of course keeps
the flag inplace. Thats why pax is unable to set the access/modification
time.

This is a bug, but I'm not sure which of the two has the wrong behaviour.

> By the way, Thanks to everyone for maintaining and updating this.  It is
> a great resource.  (Much better than the scripts that I wrote years ago
> to do some of the same things.)

Thanks! :-)

greetings,
philipp