PDA

View Full Version : [ubuntu] ext2 and user_xattr



mvelicu
December 11th, 2009, 04:44 AM
Hello

How I can add user_xattr attribute to a ext2 partition in fstab file

An why ubuntu 9.1 server install by default ext 2 partition instead on ext3 or ext4

Regards,
Mihai

lemming465
December 13th, 2009, 01:22 AM
Ubuntu 9.10 uses ext4 by default, but the partition type code byte (as seen by fdisk -lu or the like, will still be 0x83, which displays as ext2. ext3 and ext4 are forward (but not backward) compatible with ext2. One crude way to tell the difference is to run sudo tune2fs -l ... against the partition; if the features include has_journal it's ext3 or later, and if it has extent it's ext4. If it doesn't have user_xattr try turning that on with sudo tune2fs -O user_xattr ...

mvelicu
December 15th, 2009, 05:55 AM
I tried how you said but I have this error

mihai@userver03:~$ sudo tune2fs -O user_xattr /dev/sda1
tune2fs 1.41.9 (22-Aug-2009)
tune2fs: Bad magic number in super-block while trying to open /dev/sda1
Couldn't find valid filesystem superblock.
mihai@userver03:~$


What should I do ?

Regards,
Mihai

lemming465
December 17th, 2009, 05:34 AM
What output do you get from
sudo -i
fdisk -lu
blkid
mount
Knowing more about your disk structure will help understand it.

Your specific error message suggested that partition sda1 wasn't a valid ext2 style filesystem. It could be damaged, or the ext2 partition could be somewhere else, or there might be RAID or LVM devices involved, or something.