Gentoo Archives: gentoo-user

From: "Canek Peláez Valdés" <caneko@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Extended file attributes: ext4
Date: Sun, 08 Apr 2012 18:23:07
Message-Id: CADPrc83zMKYW18WvvpxR1MB8Wr3jngq5hwM8x_mNBt3PoMujug@mail.gmail.com
In Reply to: Re: [gentoo-user] Extended file attributes: ext4 by meino.cramer@gmx.de
1 On Sun, Apr 8, 2012 at 11:44 AM, <meino.cramer@×××.de> wrote:
2 > Mick <michaelkintzios@×××××.com> [12-04-08 18:40]:
3 >> On Sunday 08 Apr 2012 16:56:23 David W Noon wrote:
4 >> > On Sun, 8 Apr 2012 17:26:03 +0200, meino.cramer@×××.de wrote about
5 >> >
6 >> > [gentoo-user] Extended file attributes: ext4:
7 >> > > is it possible to go from an ext4-filesystem with no extended file
8 >> > > attributes to one with extended file attributes without reformatting
9 >> > > the disk or other very risky low level things just by adding this
10 >> > > feature to the kenrel (?) ?
11 >> >
12 >> > Yes, it's simple.
13 >> >
14 >> > You need to ensure that your kernel configuration has the extended
15 >> > attribute support (ACL is a good idea too) and you have booted with the
16 >> > ext4 driver so configured.
17 >> >
18 >> > You then add the xattr option in /etc/fstab for the filesystem(s) where
19 >> > you want extended attribute support.  If you do that before you reboot
20 >> > (as above) then you will have full extended attribute support.
21 >>
22 >> I thought that you are meant to pass such options on the CLI at the time you
23 >> are formatting the partition ... is this incorrect?
24 >>
25 >> Of course if you must format the drive with such options then the data won't
26 >> survive.
27 >> --
28 >> Regards,
29 >> Mick
30 >
31 >
32 > Hi,
33 >
34 > thank you very much for all the input.
35 >
36 > To clearify things a little:
37 >
38 > Status quo: System with ext4 and no extended attributes.
39 > Where I want to be: The same system with extended attributes.
40 >
41 > Way to go: No reformatting and mkfs and all that things. Only kernel
42 > reconfiguring / recompiling / rebooting and emerging some tools.
43 >
44 > Possible?
45
46 As others had said, this is possible. I used this guide:
47
48 http://www.debian-administration.org/articles/643
49
50 You need basically to enable the ext4-only features:
51
52 tune2fs -O extents,uninit_bg,dir_index <partition>
53
54 Do the fsck:
55
56 fsck.ext4 -yfD <partition>
57
58 And (optionally) convert all the files and directories to use extends:
59
60 find <directory> -xdev -type f -print0 | xargs -0 chattr +e
61 find <directory> -xdev -type d -print0 | xargs -0 chattr +e
62
63 I did this on my laptop and desktop (including the root filesystem,
64 booting into emergency mode with systemd), and everything worked
65 perfectly.
66
67 Note, however, that you *need* GRUB2 if your kernel lives in an ext4
68 partition that it's not longer compatible with ext3. Don't do the
69 change without migrating to GRUB2 before.
70
71 Regards.
72 --
73 Canek Peláez Valdés
74 Posgrado en Ciencia e Ingeniería de la Computación
75 Universidad Nacional Autónoma de México

Replies

Subject Author
Re: [gentoo-user] Extended file attributes: ext4 meino.cramer@×××.de
Re: [gentoo-user] Extended file attributes: ext4 Michael Mol <mikemol@×××××.com>
Re: [gentoo-user] Extended file attributes: ext4 Stroller <stroller@××××××××××××××××××.uk>
Re: [gentoo-user] Extended file attributes: ext4 Frank Steinmetzger <Warp_7@×××.de>