* [gentoo-user] Extended file attributes: ext4
@ 2012-04-08 15:26 meino.cramer
2012-04-08 15:56 ` David W Noon
0 siblings, 1 reply; 27+ messages in thread
From: meino.cramer @ 2012-04-08 15:26 UTC (permalink / raw
To: Gentoo
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
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-08 15:26 [gentoo-user] Extended file attributes: ext4 meino.cramer
@ 2012-04-08 15:56 ` David W Noon
2012-04-08 16:34 ` Mick
0 siblings, 1 reply; 27+ messages in thread
From: David W Noon @ 2012-04-08 15:56 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 982 bytes --]
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)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-08 15:56 ` David W Noon
@ 2012-04-08 16:34 ` Mick
2012-04-08 16:44 ` meino.cramer
2012-04-08 17:34 ` [gentoo-user] " Nikos Chantziaras
0 siblings, 2 replies; 27+ messages in thread
From: Mick @ 2012-04-08 16:34 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1094 bytes --]
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
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-08 16:34 ` Mick
@ 2012-04-08 16:44 ` meino.cramer
2012-04-08 17:36 ` [gentoo-user] " Nikos Chantziaras
2012-04-08 18:21 ` [gentoo-user] " Canek Peláez Valdés
2012-04-08 17:34 ` [gentoo-user] " Nikos Chantziaras
1 sibling, 2 replies; 27+ messages in thread
From: meino.cramer @ 2012-04-08 16:44 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-user] Re: Extended file attributes: ext4
2012-04-08 16:34 ` Mick
2012-04-08 16:44 ` meino.cramer
@ 2012-04-08 17:34 ` Nikos Chantziaras
2012-04-08 17:59 ` Mick
1 sibling, 1 reply; 27+ messages in thread
From: Nikos Chantziaras @ 2012-04-08 17:34 UTC (permalink / raw
To: gentoo-user
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.
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-user] Re: Extended file attributes: ext4
2012-04-08 16:44 ` meino.cramer
@ 2012-04-08 17:36 ` Nikos Chantziaras
2012-04-08 18:21 ` [gentoo-user] " Canek Peláez Valdés
1 sibling, 0 replies; 27+ messages in thread
From: Nikos Chantziaras @ 2012-04-08 17:36 UTC (permalink / raw
To: gentoo-user
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.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Re: Extended file attributes: ext4
2012-04-08 17:34 ` [gentoo-user] " Nikos Chantziaras
@ 2012-04-08 17:59 ` Mick
0 siblings, 0 replies; 27+ messages in thread
From: Mick @ 2012-04-08 17:59 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1220 bytes --]
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
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-08 16:44 ` meino.cramer
2012-04-08 17:36 ` [gentoo-user] " Nikos Chantziaras
@ 2012-04-08 18:21 ` Canek Peláez Valdés
2012-04-08 18:37 ` meino.cramer
` (3 more replies)
1 sibling, 4 replies; 27+ messages in thread
From: Canek Peláez Valdés @ 2012-04-08 18:21 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-08 18:21 ` [gentoo-user] " Canek Peláez Valdés
@ 2012-04-08 18:37 ` meino.cramer
2012-04-08 18:41 ` Michael Mol
` (2 subsequent siblings)
3 siblings, 0 replies; 27+ messages in thread
From: meino.cramer @ 2012-04-08 18:37 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-08 18:21 ` [gentoo-user] " Canek Peláez Valdés
2012-04-08 18:37 ` meino.cramer
@ 2012-04-08 18:41 ` Michael Mol
2012-04-08 18:51 ` Canek Peláez Valdés
2012-04-09 10:06 ` Stroller
2012-04-12 22:24 ` Frank Steinmetzger
3 siblings, 1 reply; 27+ messages in thread
From: Michael Mol @ 2012-04-08 18:41 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-08 18:41 ` Michael Mol
@ 2012-04-08 18:51 ` Canek Peláez Valdés
2012-04-08 18:59 ` Michael Mol
0 siblings, 1 reply; 27+ messages in thread
From: Canek Peláez Valdés @ 2012-04-08 18:51 UTC (permalink / raw
To: gentoo-user
On Sun, Apr 8, 2012 at 1:41 PM, Michael Mol <mikemol@gmail.com> wrote:
> 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.
Didn't we already had this discussion? You can mount an ext3 partition
as ext4, and it will be treated as ext4, but it will keep bein fully
backwards compatible with ext3 (i.e., you can still mount it as ext3).
This, however, negates the purpose of using ext4, as you are not using
extents: From /usr/src/linux/Documentation/ext4.txt:
- Create a new filesystem using the ext4 filesystem type:
# mke2fs -t ext4 /dev/hda1
Or to configure an existing ext3 filesystem to support extents:
# tune2fs -O extents /dev/hda1
The moment you enable extents on a ext4 partition, you need to fsck
the filesystem, and stops being backwards compatible (i.e., it will no
longer mount as ext3, and in particular GRUB will not be able to read
the kernel inside it).
If the partition has extents support, doesn't necessarily means that
their files use extents: Therefore, if you want to fully convert your
partition to ext4 (i.e., make all the files and directories to use
extents), you need to chattr +e every file and directory in the
filesystem, hence the commands:
> find <directory> -xdev -type f -print0 | xargs -0 chattr +e
> find <directory> -xdev -type d -print0 | xargs -0 chattr +e
Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-08 18:51 ` Canek Peláez Valdés
@ 2012-04-08 18:59 ` Michael Mol
2012-04-08 19:00 ` Michael Mol
2012-04-08 19:04 ` Canek Peláez Valdés
0 siblings, 2 replies; 27+ messages in thread
From: Michael Mol @ 2012-04-08 18:59 UTC (permalink / raw
To: gentoo-user
On Sun, Apr 8, 2012 at 2:51 PM, Canek Peláez Valdés <caneko@gmail.com> wrote:
> On Sun, Apr 8, 2012 at 1:41 PM, Michael Mol <mikemol@gmail.com> wrote:
>> 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]:
[snip]
>>>> 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.
>
> Didn't we already had this discussion? You can mount an ext3 partition
> as ext4, and it will be treated as ext4, but it will keep bein fully
> backwards compatible with ext3 (i.e., you can still mount it as ext3).
> This, however, negates the purpose of using ext4, as you are not using
> extents:
Sure, ext4 is a better filesystem than ext3. I'm not disputing that.
I'm disputing that. I'm disputing two things:
1) That you need to convert a filesystem to ext4 in order to use
extended attributes.
2) That you need to convert the filesystem at all; Meino's 'status
quo' filesystem is already ext4, per the portion of his email I
quoted.
--
:wq
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-08 18:59 ` Michael Mol
@ 2012-04-08 19:00 ` Michael Mol
2012-04-08 19:04 ` Canek Peláez Valdés
1 sibling, 0 replies; 27+ messages in thread
From: Michael Mol @ 2012-04-08 19:00 UTC (permalink / raw
To: gentoo-user
On Sun, Apr 8, 2012 at 2:59 PM, Michael Mol <mikemol@gmail.com> wrote:
> On Sun, Apr 8, 2012 at 2:51 PM, Canek Peláez Valdés <caneko@gmail.com> wrote:
>> On Sun, Apr 8, 2012 at 1:41 PM, Michael Mol <mikemol@gmail.com> wrote:
>>> 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]:
>
> [snip]
>
>>>>> 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.
>>
>> Didn't we already had this discussion? You can mount an ext3 partition
>> as ext4, and it will be treated as ext4, but it will keep bein fully
>> backwards compatible with ext3 (i.e., you can still mount it as ext3).
>> This, however, negates the purpose of using ext4, as you are not using
>> extents:
>
> Sure, ext4 is a better filesystem than ext3. I'm not disputing that.
> I'm disputing that. I'm disputing two things:
(bleh. Editing error. Omit phrase 'I'm disputing that')
--
:wq
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-08 18:59 ` Michael Mol
2012-04-08 19:00 ` Michael Mol
@ 2012-04-08 19:04 ` Canek Peláez Valdés
2012-04-08 19:19 ` Michael Mol
1 sibling, 1 reply; 27+ messages in thread
From: Canek Peláez Valdés @ 2012-04-08 19:04 UTC (permalink / raw
To: gentoo-user
On Sun, Apr 8, 2012 at 1:59 PM, Michael Mol <mikemol@gmail.com> wrote:
> On Sun, Apr 8, 2012 at 2:51 PM, Canek Peláez Valdés <caneko@gmail.com> wrote:
>> On Sun, Apr 8, 2012 at 1:41 PM, Michael Mol <mikemol@gmail.com> wrote:
>>> 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]:
>
> [snip]
>
>>>>> 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.
>>
>> Didn't we already had this discussion? You can mount an ext3 partition
>> as ext4, and it will be treated as ext4, but it will keep bein fully
>> backwards compatible with ext3 (i.e., you can still mount it as ext3).
>> This, however, negates the purpose of using ext4, as you are not using
>> extents:
>
> Sure, ext4 is a better filesystem than ext3. I'm not disputing that.
> I'm disputing that. I'm disputing two things:
>
> 1) That you need to convert a filesystem to ext4 in order to use
> extended attributes.
> 2) That you need to convert the filesystem at all; Meino's 'status
> quo' filesystem is already ext4, per the portion of his email I
> quoted.
From Mick's mail:
> Status quo: System with ext4 and no extended attributes.
> Where I want to be: The same system with extended attributes.
I assume with that he meant the "extents" option. Therefore, all the
things I already said.
Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-08 19:04 ` Canek Peláez Valdés
@ 2012-04-08 19:19 ` Michael Mol
0 siblings, 0 replies; 27+ messages in thread
From: Michael Mol @ 2012-04-08 19:19 UTC (permalink / raw
To: gentoo-user
On Sun, Apr 8, 2012 at 3:04 PM, Canek Peláez Valdés <caneko@gmail.com> wrote:
> On Sun, Apr 8, 2012 at 1:59 PM, Michael Mol <mikemol@gmail.com> wrote:
>> On Sun, Apr 8, 2012 at 2:51 PM, Canek Peláez Valdés <caneko@gmail.com> wrote:
>>> On Sun, Apr 8, 2012 at 1:41 PM, Michael Mol <mikemol@gmail.com> wrote:
>>>> 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]:
>>
>> [snip]
>>
>>>>>> 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.
>>>
>>> Didn't we already had this discussion? You can mount an ext3 partition
>>> as ext4, and it will be treated as ext4, but it will keep bein fully
>>> backwards compatible with ext3 (i.e., you can still mount it as ext3).
>>> This, however, negates the purpose of using ext4, as you are not using
>>> extents:
>>
>> Sure, ext4 is a better filesystem than ext3. I'm not disputing that.
>> I'm disputing that. I'm disputing two things:
>>
>> 1) That you need to convert a filesystem to ext4 in order to use
>> extended attributes.
>> 2) That you need to convert the filesystem at all; Meino's 'status
>> quo' filesystem is already ext4, per the portion of his email I
>> quoted.
>
> From Mick's mail:
>
>> Status quo: System with ext4 and no extended attributes.
>> Where I want to be: The same system with extended attributes.
>
> I assume with that he meant the "extents" option. Therefore, all the
> things I already said.
Ah. 'extents' and 'extended attributes' are completely different
things. I did a bit of googling to confirm my recollection.
FWIW, I came across this very excellent page in discussion of Ext4
compared to other and previous filesystems:
http://kernelnewbies.org/Ext4
--
:wq
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-08 18:21 ` [gentoo-user] " Canek Peláez Valdés
2012-04-08 18:37 ` meino.cramer
2012-04-08 18:41 ` Michael Mol
@ 2012-04-09 10:06 ` Stroller
2012-04-09 10:23 ` Canek Peláez Valdés
2012-04-09 14:09 ` Michael Mol
2012-04-12 22:24 ` Frank Steinmetzger
3 siblings, 2 replies; 27+ messages in thread
From: Stroller @ 2012-04-09 10:06 UTC (permalink / raw
To: gentoo-user
On 8 April 2012, at 19:21, Canek Peláez Valdés wrote:
> …
> 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
Ok, so I was just casually reading the chattr manpage, following this post…
The letters `acdeijstuADST' select the new attributes for the files:
append only (a), compressed (c), …
A file with the `c' attribute set is automatically compressed on the
disk by the kernel. A read from this file returns uncompressed data.
A write to this file compresses data before storing them on the disk.
COMPRESSED?!?!
You mean, all I need to do is `touch new.dd.img && chattr +c new.dd.img && dd if=/dev/sdX of=new.dd.img` and I never again need to worry about piping dd through bzip and bunzip?
If I have a massive great big uncompressed dd image, I can compress it as simply as touching a new file, changing this attribute on the new file and copying it over?
Is there a reason I've been unaware of this? Why isn't this hugely popular?
Stroller.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-09 10:06 ` Stroller
@ 2012-04-09 10:23 ` Canek Peláez Valdés
2012-04-09 11:35 ` Stroller
2012-04-09 14:09 ` Michael Mol
1 sibling, 1 reply; 27+ messages in thread
From: Canek Peláez Valdés @ 2012-04-09 10:23 UTC (permalink / raw
To: gentoo-user
On Mon, Apr 9, 2012 at 5:06 AM, Stroller <stroller@stellar.eclipse.co.uk> wrote:
>
> On 8 April 2012, at 19:21, Canek Peláez Valdés wrote:
>> …
>> 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
>
> Ok, so I was just casually reading the chattr manpage, following this post…
>
> The letters `acdeijstuADST' select the new attributes for the files:
> append only (a), compressed (c), …
>
> A file with the `c' attribute set is automatically compressed on the
> disk by the kernel. A read from this file returns uncompressed data.
> A write to this file compresses data before storing them on the disk.
>
> COMPRESSED?!?!
>
> You mean, all I need to do is `touch new.dd.img && chattr +c new.dd.img && dd if=/dev/sdX of=new.dd.img` and I never again need to worry about piping dd through bzip and bunzip?
>
> If I have a massive great big uncompressed dd image, I can compress it as simply as touching a new file, changing this attribute on the new file and copying it over?
>
> Is there a reason I've been unaware of this? Why isn't this hugely popular?
From the same man page:
BUGS AND LIMITATIONS
The `c', 's', and `u' attributes are not honored by the ext2
and ext3 filesystems as implemented in the current mainline Linux
kernels. These attributes may be implemented in future versions of the
ext2 and ext3 filesystems.
This means ext4 mandatory if you want to use it, and this (usually)
means GRUB2, which is still considered beta. Also, I don't see
anywhere any mention on the compress algorithm used, which will
probably mean bzip or gzip; I really don't think they use something
like xz, for example, although maybe it's possible. Even more, it has
to have some performance hit, specially on large files; and lastly,
with the current harddrive size/price ratio, the option of
automatically compress/decompress files is not really that necessary
(remember DoubleSpace, from DOS days?).
Oh, and I'm not sure about the following, but a *lot* of Unix programs
use the same trick to write atomically files: They write the new
version to a new file, and if that is successful, it moves the new
file over the old one. In this case, I don't know how the new file can
be created with the 'c' attribute (unless you set all the files to use
it, and then for sure the performance hit will cost you).
Anyhow, it's an incredible cool feature; I just don't know how useful
it is with the size of modern disks.
Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-09 10:23 ` Canek Peláez Valdés
@ 2012-04-09 11:35 ` Stroller
2012-04-09 12:03 ` Neil Bothwick
2012-04-09 12:04 ` Canek Peláez Valdés
0 siblings, 2 replies; 27+ messages in thread
From: Stroller @ 2012-04-09 11:35 UTC (permalink / raw
To: gentoo-user
On 9 April 2012, at 11:23, Canek Peláez Valdés wrote:
> …
> The `c', 's', and `u' attributes are not honored by the ext2
> and ext3 filesystems as implemented in the current mainline Linux
> kernels. …
>
> This means ext4 mandatory if you want to use it, and this (usually)
> means GRUB2, which is still considered beta.
# eix -Ic grub
[I] sys-boot/grub (0.97-r10@03/07/12): GNU GRUB boot loader
# df -Th
Filesystem Type Size Used Avail Use% Mounted on
rootfs rootfs 228G 5.8G 211G 3% /
/dev/root ext4 228G 5.8G 211G 3% /
devtmpfs devtmpfs 875M 212K 875M 1% /dev
rc-svcdir tmpfs 1.0M 60K 964K 6% /lib64/rc/init.d
cgroup_root tmpfs 10M 0 10M 0% /sys/fs/cgroup
shm tmpfs 876M 0 876M 0% /dev/shm
#
> Also, I don't see
> anywhere any mention on the compress algorithm used, which will
> probably mean bzip or gzip; I really don't think they use something
> like xz, for example, although maybe it's possible.
I was guessing LZMA - I don't believe it's the highest-compression algorithm out there, but it seems to have been around for a while. I'm pretty sure I've seen it in menuconfig's kernel options somewhere.
> Even more, it has
> to have some performance hit, specially on large files;
Sure, but that applies to all file compression.
> >and lastly,
> with the current harddrive size/price ratio, the option of
> automatically compress/decompress files is not really that necessary
> (remember DoubleSpace, from DOS days?).
Yeah, in my case I've got about 1TB consumed by dd disk images which I've had to copy and unpack so I can mount them as loopback.
These images are of the "installed gentoo, got it booting, zero'd over the free space" and factory-installation of Linpus types - i.e 5GB to 20GB when compressed. But the files are so huge because the system has this big empty 250GB or 500GB hard-drive installed from the factory, and I'm just dd'ing the whole thing, because who cares for more elegant methods when you're bzipping them, anyway, and you can just leave the copy running overnight? So this is a present issue for me right now.
> Oh, and I'm not sure about the following, but a *lot* of Unix programs
> use the same trick to write atomically files: They write the new
> version to a new file, and if that is successful, it moves the new
> file over the old one. In this case, I don't know how the new file can
> be created with the 'c' attribute (unless you set all the files to use
> it, and then for sure the performance hit will cost you).
Yeah, I got the notion from `man chattr` ("with the `c' attribute set … A read from this file returns uncompressed data. A write to this file compresses data before storing them on the disk.") that one might be initiate the dd copying process to a new file (which would write uncompressed data) then, in a new terminal, immediately change the compression attribute of the file, and that the *remainder* of the file would be compressed.
I was saving this speculation to wait hopefully for a reply from someone who has actually used this feature.
Stroller.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-09 11:35 ` Stroller
@ 2012-04-09 12:03 ` Neil Bothwick
2012-04-09 12:04 ` Canek Peláez Valdés
1 sibling, 0 replies; 27+ messages in thread
From: Neil Bothwick @ 2012-04-09 12:03 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 699 bytes --]
On Mon, 9 Apr 2012 12:35:44 +0100, Stroller wrote:
> Yeah, I got the notion from `man chattr` ("with the `c' attribute set …
> A read from this file returns uncompressed data. A write to this file
> compresses data before storing them on the disk.") that one might be
> initiate the dd copying process to a new file (which would write
> uncompressed data) then, in a new terminal, immediately change the
> compression attribute of the file, and that the *remainder* of the file
> would be compressed.
It appears that you can set this attribute on a directory then all files
created in that directory will inherit it.
--
Neil Bothwick
Don't be humble, you're not that great.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-09 11:35 ` Stroller
2012-04-09 12:03 ` Neil Bothwick
@ 2012-04-09 12:04 ` Canek Peláez Valdés
2012-04-10 11:00 ` Stroller
1 sibling, 1 reply; 27+ messages in thread
From: Canek Peláez Valdés @ 2012-04-09 12:04 UTC (permalink / raw
To: gentoo-user
On Mon, Apr 9, 2012 at 6:35 AM, Stroller <stroller@stellar.eclipse.co.uk> wrote:
>
> On 9 April 2012, at 11:23, Canek Peláez Valdés wrote:
>> …
>> The `c', 's', and `u' attributes are not honored by the ext2
>> and ext3 filesystems as implemented in the current mainline Linux
>> kernels. …
>>
>> This means ext4 mandatory if you want to use it, and this (usually)
>> means GRUB2, which is still considered beta.
>
> # eix -Ic grub
> [I] sys-boot/grub (0.97-r10@03/07/12): GNU GRUB boot loader
> # df -Th
> Filesystem Type Size Used Avail Use% Mounted on
> rootfs rootfs 228G 5.8G 211G 3% /
> /dev/root ext4 228G 5.8G 211G 3% /
> devtmpfs devtmpfs 875M 212K 875M 1% /dev
> rc-svcdir tmpfs 1.0M 60K 964K 6% /lib64/rc/init.d
> cgroup_root tmpfs 10M 0 10M 0% /sys/fs/cgroup
> shm tmpfs 876M 0 876M 0% /dev/shm
> #
Interesting. Do you have extents enabled in the filesystem? Mine does:
# tune2fs -l /dev/sda4 | grep features
Filesystem features: has_journal ext_attr resize_inode dir_index
filetype needs_recovery extent sparse_super large_file uninit_bg
I was under the impression that GRUB legacy could not read ext4
filesystems with extents enabled; that was the primary reason I
migrated to GRUB2. I believe there is a patch for GRUB legacy which
adds ext4+extents support, but I don't think Gentoo applies it.
If GRUB legacy supports ext4 from upstream, then it's a new feature
(or certainly, I hadn't heard about it until now).
Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-09 10:06 ` Stroller
2012-04-09 10:23 ` Canek Peláez Valdés
@ 2012-04-09 14:09 ` Michael Mol
2012-04-10 9:55 ` Stroller
1 sibling, 1 reply; 27+ messages in thread
From: Michael Mol @ 2012-04-09 14:09 UTC (permalink / raw
To: gentoo-user
On Mon, Apr 9, 2012 at 6:06 AM, Stroller <stroller@stellar.eclipse.co.uk> wrote:
>
> On 8 April 2012, at 19:21, Canek Peláez Valdés wrote:
>> …
>> 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
>
> Ok, so I was just casually reading the chattr manpage, following this post…
>
> The letters `acdeijstuADST' select the new attributes for the files:
> append only (a), compressed (c), …
>
> A file with the `c' attribute set is automatically compressed on the
> disk by the kernel. A read from this file returns uncompressed data.
> A write to this file compresses data before storing them on the disk.
>
> COMPRESSED?!?!
>
> You mean, all I need to do is `touch new.dd.img && chattr +c new.dd.img && dd if=/dev/sdX of=new.dd.img` and I never again need to worry about piping dd through bzip and bunzip?
>
> If I have a massive great big uncompressed dd image, I can compress it as simply as touching a new file, changing this attribute on the new file and copying it over?
>
> Is there a reason I've been unaware of this? Why isn't this hugely popular?
>
> Stroller.
From the kernel sources, Documentation/filesystems/ext2.txt:
" Specification
=============
ext2 shares many properties with traditional Unix filesystems. It has
the concepts of blocks, inodes and directories. It has space in the
specification for Access Control Lists (ACLs), fragments, undeletion and
compression though these are not yet implemented (some are available as
separate patches). There is also a versioning mechanism to allow new
features (such as journalling) to be added in a maximally compatible
manner. "
So, ext2's extended attribute set listed support for compression
(among other things), but it wasn't implemented. None of the other
ext*.txt files reference compression.
Digging into the kenrel source for ext4 in linux-3.2.1.-gentoo-r2,
there are symbols defined for managing compression, but they're not
used. In short, compression support is specced, but not implemented.
--
:wq
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-09 14:09 ` Michael Mol
@ 2012-04-10 9:55 ` Stroller
0 siblings, 0 replies; 27+ messages in thread
From: Stroller @ 2012-04-10 9:55 UTC (permalink / raw
To: gentoo-user
On 9 April 2012, at 15:09, Michael Mol wrote:
> …
> So, ext2's extended attribute set listed support for compression
> (among other things), but it wasn't implemented. …
>
> Digging into the kenrel source for ext4 in linux-3.2.1.-gentoo-r2,
> there are symbols defined for managing compression, but they're not
> used. In short, compression support is specced, but not implemented.
Many thanks. I appreciate your interest.
Stroller.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-09 12:04 ` Canek Peláez Valdés
@ 2012-04-10 11:00 ` Stroller
2012-04-10 17:01 ` Canek Peláez Valdés
0 siblings, 1 reply; 27+ messages in thread
From: Stroller @ 2012-04-10 11:00 UTC (permalink / raw
To: gentoo-user
On 9 April 2012, at 13:04, Canek Peláez Valdés wrote:
>>> …
>>> This means ext4 mandatory if you want to use it, and this (usually)
>>> means GRUB2, which is still considered beta.
>>
> …
> Interesting. Do you have extents enabled in the filesystem? Mine does:
>
> # tune2fs -l /dev/sda4 | grep features
> Filesystem features: has_journal ext_attr resize_inode dir_index
> filetype needs_recovery extent sparse_super large_file uninit_bg
# df -Th
Filesystem Type Size Used Avail Use% Mounted on
rootfs rootfs 228G 5.8G 211G 3% /
/dev/root ext4 228G 5.8G 211G 3% /
devtmpfs devtmpfs 875M 212K 875M 1% /dev
rc-svcdir tmpfs 1.0M 60K 964K 6% /lib64/rc/init.d
cgroup_root tmpfs 10M 0 10M 0% /sys/fs/cgroup
shm tmpfs 876M 0 876M 0% /dev/shm
# tune2fs -l /dev/root | grep extent
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink
> I was under the impression that GRUB legacy could not read ext4
> filesystems with extents enabled; that was the primary reason I
> migrated to GRUB2. I believe there is a patch for GRUB legacy which
> adds ext4+extents support, but I don't think Gentoo applies it.
No idea where it comes from, but you can see for yourself now you know to look.
Stroller.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-10 11:00 ` Stroller
@ 2012-04-10 17:01 ` Canek Peláez Valdés
0 siblings, 0 replies; 27+ messages in thread
From: Canek Peláez Valdés @ 2012-04-10 17:01 UTC (permalink / raw
To: gentoo-user
On Tue, Apr 10, 2012 at 6:00 AM, Stroller
<stroller@stellar.eclipse.co.uk> wrote:
>
> On 9 April 2012, at 13:04, Canek Peláez Valdés wrote:
>>>> …
>>>> This means ext4 mandatory if you want to use it, and this (usually)
>>>> means GRUB2, which is still considered beta.
>>>
>> …
>> Interesting. Do you have extents enabled in the filesystem? Mine does:
>>
>> # tune2fs -l /dev/sda4 | grep features
>> Filesystem features: has_journal ext_attr resize_inode dir_index
>> filetype needs_recovery extent sparse_super large_file uninit_bg
>
> # df -Th
> Filesystem Type Size Used Avail Use% Mounted on
> rootfs rootfs 228G 5.8G 211G 3% /
> /dev/root ext4 228G 5.8G 211G 3% /
> devtmpfs devtmpfs 875M 212K 875M 1% /dev
> rc-svcdir tmpfs 1.0M 60K 964K 6% /lib64/rc/init.d
> cgroup_root tmpfs 10M 0 10M 0% /sys/fs/cgroup
> shm tmpfs 876M 0 876M 0% /dev/shm
> # tune2fs -l /dev/root | grep extent
> Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink
>
>> I was under the impression that GRUB legacy could not read ext4
>> filesystems with extents enabled; that was the primary reason I
>> migrated to GRUB2. I believe there is a patch for GRUB legacy which
>> adds ext4+extents support, but I don't think Gentoo applies it.
>
> No idea where it comes from, but you can see for yourself now you know to look.
OK, I went out and did my homework. GRUB legacy upstream doesn't
support ext4 partitions (using extents, of course; without extents,
they can be mounted as ext3), but Gentoo (as almost any other
distribution under the sun) applies a patch to support it. Actually,
it applies 37 patches, contained in grub-0.97-patches-1.12.tar.bz2,
one of them called 850_all_grub-0.97_ext4.patch, which says:
Gentoo bug #250829 - Include support for booting from ext4 partitions.
This is the respun and tested patch adapted from
http://code.google.com/p/grub4ext4/ so that it will apply with the rest of the
Gentoo patches.
Tested with:
/boot on ext2
/boot on ext3
/boot on ext4
/ on ext4 (no seperate /boot)
Patch ported by Diego E. Pettenò (flameeyes)
Testing by Robin H. Johnson (robbat2)
Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gentoo.org>
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
So mistery solved: GRUB legacy in Gentoo supports ext4, but it differs
from upstream. When I was doing research for converting my filesystem
to ext4, everywhere I looked it said that GRUB legacy doesn't support
ext4... because it doesn't. Gentoo patches the sources, but upstream
GRUB legacy does not support ext4.
So I can finally stop telling people to migrate to GRUB2 if they want
to use ext4. Thanks Stroller.
Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-08 18:21 ` [gentoo-user] " Canek Peláez Valdés
` (2 preceding siblings ...)
2012-04-09 10:06 ` Stroller
@ 2012-04-12 22:24 ` Frank Steinmetzger
2012-04-12 22:43 ` Frank Steinmetzger
2012-04-13 2:23 ` Canek Peláez Valdés
3 siblings, 2 replies; 27+ messages in thread
From: Frank Steinmetzger @ 2012-04-12 22:24 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1104 bytes --]
On Sun, Apr 08, 2012 at 01:21:05PM -0500, Canek Peláez Valdés wrote:
> 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.
Hm... I wonder what I’m missing in my setup. I still run grub-0.97 (I like it
more because it loads faster than Grub 2 ^^). Anyhoo, I have /boot on my root
partition, and a longer while ago I made the switch from ext3 to ext4 through
backup, reformat and restore. According to dumpe2fs, I have the following
features enabled on the partition in question:
has_journal ext_attr resize_inode dir_index filetype needs_recovery extent
flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
My fstab entry is minimalist:
/dev/sda3 / ext4 auto 0 1
So how did I manage to get the system booted with grub 0.97 in the first
place? I’m not using an “init thingy” BTW. ;-)
--
Gruß | Greetings | Qapla'
Please do not use my email addresses within any Facebook service.
GNU jokes are not Unix jokes.
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-12 22:24 ` Frank Steinmetzger
@ 2012-04-12 22:43 ` Frank Steinmetzger
2012-04-13 2:23 ` Canek Peláez Valdés
1 sibling, 0 replies; 27+ messages in thread
From: Frank Steinmetzger @ 2012-04-12 22:43 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 779 bytes --]
On Fri, Apr 13, 2012 at 12:24:38AM +0200, Frank Steinmetzger wrote:
> On Sun, Apr 08, 2012 at 01:21:05PM -0500, Canek Peláez Valdés wrote:
>
> > 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.
>
> Hm... I wonder what I’m missing in my setup.
> […]
> So how did I manage to get the system booted with grub 0.97 in the first
> place? I’m not using an “init thingy” BTW. ;-)
-_- I should have read the entire thread before answering. Canek asked the
same thing and got the answer.
--
Gruß | Greetings | Qapla'
Please do not use my email addresses within any Facebook service.
Dyslexics of the world untie!
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Extended file attributes: ext4
2012-04-12 22:24 ` Frank Steinmetzger
2012-04-12 22:43 ` Frank Steinmetzger
@ 2012-04-13 2:23 ` Canek Peláez Valdés
1 sibling, 0 replies; 27+ messages in thread
From: Canek Peláez Valdés @ 2012-04-13 2:23 UTC (permalink / raw
To: gentoo-user
On Thu, Apr 12, 2012 at 5:24 PM, Frank Steinmetzger <Warp_7@gmx.de> wrote:
> On Sun, Apr 08, 2012 at 01:21:05PM -0500, Canek Peláez Valdés wrote:
>
>> 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.
>
> Hm... I wonder what I’m missing in my setup. I still run grub-0.97 (I like it
> more because it loads faster than Grub 2 ^^). Anyhoo, I have /boot on my root
> partition, and a longer while ago I made the switch from ext3 to ext4 through
> backup, reformat and restore. According to dumpe2fs, I have the following
> features enabled on the partition in question:
>
> has_journal ext_attr resize_inode dir_index filetype needs_recovery extent
> flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
>
> My fstab entry is minimalist:
> /dev/sda3 / ext4 auto 0 1
>
> So how did I manage to get the system booted with grub 0.97 in the first
> place? I’m not using an “init thingy” BTW. ;-)
As I said in my last email:
OK, I went out and did my homework. GRUB legacy upstream doesn't
support ext4 partitions (using extents, of course; without extents,
they can be mounted as ext3), but Gentoo (as almost any other
distribution under the sun) applies a patch to support it. Actually,
it applies 37 patches, contained in grub-0.97-patches-1.12.tar.bz2,
one of them called 850_all_grub-0.97_ext4.patch, which says:
Gentoo bug #250829 - Include support for booting from ext4 partitions.
This is the respun and tested patch adapted from
http://code.google.com/p/grub4ext4/ so that it will apply with the
rest of the Gentoo patches.
Tested with:
/boot on ext2
/boot on ext3
/boot on ext4
/ on ext4 (no seperate /boot)
Patch ported by Diego E. Pettenò (flameeyes)
Testing by Robin H. Johnson (robbat2)
Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gentoo.org>
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
So mistery solved: GRUB legacy in Gentoo supports ext4, but it differs
from upstream. When I was doing research for converting my filesystem
to ext4, everywhere I looked it said that GRUB legacy doesn't support
ext4... because it doesn't. Gentoo patches the sources, but upstream
GRUB legacy does not support ext4.
So I can finally stop telling people to migrate to GRUB2 if they want
to use ext4.
Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2012-04-13 2:24 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-08 15:26 [gentoo-user] Extended file attributes: ext4 meino.cramer
2012-04-08 15:56 ` David W Noon
2012-04-08 16:34 ` Mick
2012-04-08 16:44 ` meino.cramer
2012-04-08 17:36 ` [gentoo-user] " Nikos Chantziaras
2012-04-08 18:21 ` [gentoo-user] " Canek Peláez Valdés
2012-04-08 18:37 ` meino.cramer
2012-04-08 18:41 ` Michael Mol
2012-04-08 18:51 ` Canek Peláez Valdés
2012-04-08 18:59 ` Michael Mol
2012-04-08 19:00 ` Michael Mol
2012-04-08 19:04 ` Canek Peláez Valdés
2012-04-08 19:19 ` Michael Mol
2012-04-09 10:06 ` Stroller
2012-04-09 10:23 ` Canek Peláez Valdés
2012-04-09 11:35 ` Stroller
2012-04-09 12:03 ` Neil Bothwick
2012-04-09 12:04 ` Canek Peláez Valdés
2012-04-10 11:00 ` Stroller
2012-04-10 17:01 ` Canek Peláez Valdés
2012-04-09 14:09 ` Michael Mol
2012-04-10 9:55 ` Stroller
2012-04-12 22:24 ` Frank Steinmetzger
2012-04-12 22:43 ` Frank Steinmetzger
2012-04-13 2:23 ` Canek Peláez Valdés
2012-04-08 17:34 ` [gentoo-user] " Nikos Chantziaras
2012-04-08 17:59 ` Mick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox