On Sun, Apr 8, 2012 at 11:44 AM, <meino.cra...@gmx.de> wrote: > Mick <michaelkintz...@gmail.com> [12-04-08 18:40]: >> On Sunday 08 Apr 2012 16:56:23 David W Noon wrote: >> > On Sun, 8 Apr 2012 17:26:03 +0200, meino.cra...@gmx.de wrote about >> > >> > [gentoo-user] Extended file attributes: ext4: >> > > is it possible to go from an ext4-filesystem with no extended file >> > > attributes to one with extended file attributes without reformatting >> > > the disk or other very risky low level things just by adding this >> > > feature to the kenrel (?) ? >> > >> > Yes, it's simple. >> > >> > You need to ensure that your kernel configuration has the extended >> > attribute support (ACL is a good idea too) and you have booted with the >> > ext4 driver so configured. >> > >> > You then add the xattr option in /etc/fstab for the filesystem(s) where >> > you want extended attribute support. If you do that before you reboot >> > (as above) then you will have full extended attribute support. >> >> I thought that you are meant to pass such options on the CLI at the time you >> are formatting the partition ... is this incorrect? >> >> Of course if you must format the drive with such options then the data won't >> survive. >> -- >> Regards, >> Mick > > > Hi, > > thank you very much for all the input. > > To clearify things a little: > > Status quo: System with ext4 and no extended attributes. > Where I want to be: The same system with extended attributes. > > Way to go: No reformatting and mkfs and all that things. Only kernel > reconfiguring / recompiling / rebooting and emerging some tools. > > Possible?
As others had said, this is possible. I used this guide: http://www.debian-administration.org/articles/643 You need basically to enable the ext4-only features: tune2fs -O extents,uninit_bg,dir_index <partition> Do the fsck: fsck.ext4 -yfD <partition> And (optionally) convert all the files and directories to use extends: find <directory> -xdev -type f -print0 | xargs -0 chattr +e find <directory> -xdev -type d -print0 | xargs -0 chattr +e I did this on my laptop and desktop (including the root filesystem, booting into emergency mode with systemd), and everything worked perfectly. Note, however, that you *need* GRUB2 if your kernel lives in an ext4 partition that it's not longer compatible with ext3. Don't do the change without migrating to GRUB2 before. Regards. -- Canek Peláez Valdés Posgrado en Ciencia e Ingeniería de la Computación Universidad Nacional Autónoma de México