OSInside / kiwi

KIWI - Appliance Builder Next Generation
https://osinside.github.io/kiwi
GNU General Public License v3.0
294 stars 150 forks source link

Allow setting of NoCOW attribute for btrfs subvolumes #218

Closed thkukuk closed 7 years ago

thkukuk commented 7 years ago

Problem description

Some btrfs subvolumes needs the "NoCOW" attribute to disable Copy-On-Write, e.q. the subvolumes for containers and virtualisation images. We need a way to set the attribute during creation.

Actual behaviour

It's not possible and Copy-on-write will be used for databases, containers and images.

Steps to reproduce the behaviour

Check with chattr (google for btrfs nocow) if it is set or not. Setting it should work with "chattr +C ", but best is to ask the libstorage developer from the YaST team.

schaefi commented 7 years ago

https://btrfs.wiki.kernel.org/index.php/FAQ

schaefi commented 7 years ago

I'm going to work on this one next

schaefi commented 7 years ago

I have several questions to the attribute setup:

I asked Arvin via mail

thkukuk commented 7 years ago

On Fri, Jan 20, Marcus Schäfer wrote:

I have several questions to the attribute setup:

• is it required that the subvolume is mounted prior to call chattr on the mountpoint directory ?

You need access to the subvolume, it does not matter if it is mounted or not. What will work ist: chattr +C /@/var/lib/etcd

• Is this a permanent setting or do we have to repeat it again and again ?

It is permanent.

Thorsten

-- Thorsten Kukuk, Distinguished Engineer, Senior Architect SLES & CaaSP SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)