FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 04-08-2012, 03:26 PM
 
Default Extended file attributes: ext4

Hi,

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 (?) ?

Thank you very much in advance for any help!
Best regards,
mcc
 
Old 04-08-2012, 03:56 PM
David W Noon
 
Default Extended file attributes: ext4

On Sun, 8 Apr 2012 17:26:03 +0200, meino.cramer@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.
--
Regards,

Dave [RLU #314465]
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
dwnoon@ntlworld.com (David W Noon)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
 
Old 04-08-2012, 04:34 PM
Mick
 
Default Extended file attributes: ext4

On Sunday 08 Apr 2012 16:56:23 David W Noon wrote:
> On Sun, 8 Apr 2012 17:26:03 +0200, meino.cramer@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
 
Old 04-08-2012, 04:44 PM
 
Default Extended file attributes: ext4

Mick <michaelkintzios@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.cramer@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?

Best regards,
mcc
 
Old 04-08-2012, 05:34 PM
Nikos Chantziaras
 
Default Extended file attributes: ext4

On 08/04/12 19:34, Mick wrote:

On Sunday 08 Apr 2012 16:56:23 David W Noon wrote:

On Sun, 8 Apr 2012 17:26:03 +0200, meino.cramer@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?


Yes, it's incorrect.
 
Old 04-08-2012, 05:36 PM
Nikos Chantziaras
 
Default Extended file attributes: ext4

On 08/04/12 19:44, meino.cramer@gmx.de wrote:

Mick<michaelkintzios@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.cramer@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.


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?


Yes. David already explained how. Extended attributes can be enabled
and disabled at any time.


For even more information, Google it.
 
Old 04-08-2012, 05:59 PM
Mick
 
Default Extended file attributes: ext4

On Sunday 08 Apr 2012 18:34:46 Nikos Chantziaras wrote:
> On 08/04/12 19:34, Mick wrote:
> > On Sunday 08 Apr 2012 16:56:23 David W Noon wrote:
> >> On Sun, 8 Apr 2012 17:26:03 +0200, meino.cramer@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?
>
> Yes, it's incorrect.

Thanks for letting me know. :-)
--
Regards,
Mick
 
Old 04-08-2012, 06:21 PM
Canek Peláez Valdés
 
Default Extended file attributes: ext4

On Sun, Apr 8, 2012 at 11:44 AM, <meino.cramer@gmx.de> wrote:
> Mick <michaelkintzios@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.cramer@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
 
Old 04-08-2012, 06:37 PM
 
Default Extended file attributes: ext4

Canek Peláez Valdés <caneko@gmail.com> [12-04-08 20:28]:
> On Sun, Apr 8, 2012 at 11:44 AM, <meino.cramer@gmx.de> wrote:
> > Mick <michaelkintzios@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.cramer@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
>

Ok, thanks for the introduction and the link, Canek!

Best regards,
mcc
 
Old 04-08-2012, 06:41 PM
Michael Mol
 
Default Extended file attributes: ext4

On Sun, Apr 8, 2012 at 2:21 PM, Canek Peláez Valdés <caneko@gmail.com> wrote:
> On Sun, Apr 8, 2012 at 11:44 AM, *<meino.cramer@gmx.de> wrote:
>> Mick <michaelkintzios@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.cramer@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>

Um, why? Ext3 had extended attribute support, and ISTR the ext4 code
being able to handle ext3 filesystems.


--
:wq
 

Thread Tools




All times are GMT. The time now is 09:32 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org