2001-11-21 10:25:36

by Dieter Nützel

[permalink] [raw]
Subject: Re: [reiserfs-list] Re: [REISERFS TESTING] new patches on ftp.namesys.com: 2.4.15-pre7

Am Mittwoch, 21. November 2001 11:02 schrieb Nikita Danilov:

> Yes, it's right, but currently we have what we have currently. I am
> going to extend inode-attrs.patch and add new mount option
> "noattrs". With it ioctls to set and get attributes will continue to
> work, but attributes themselves will not have any effect. Then, one can
> boot with "rootflags=noattrs" and read-write root, clear all attributes
> by chattr -R and remount root.
>
> I put new version of the patch in the same place, Dieter, can you please
> try it?

So here it goes.
You made one mistake in your README file:

[-]
chattr -R -SAadiscu /reiserfs-mount-point

for each reiserfs file system. Said garbage on root file-system can
prevent system from booting (for example spurious immutable flag on
/dev/console) to work around this, new mount option
"noattrs" is provided. With it chattr and lsattr still work, but
attributes don't have any actual effect. So, boot system with
"rootflags=noattr", clear all attributes and reboot or remount root
file system.
[-]

You've forgotten the little "s" but had it right in your post.

After I've 'booted into single user mode with "linux rootflags=noattrs" I
could change my archives but _NOT_ /dev/console the right way. After the
second reboot I got the warning and kernel hang, again. Something wrong with
your patch or my installation?

SunWave1 /# l /dev/console
crw------- 1 root root 5, 1 Nov 21 11:01 /dev/console
SunWave1 /# lsattr /dev/console
lsattr: Invalid argument While reading flags on /dev/console

Two other FS in /dev have some problems, too. But I think that is right.

SunWave1 /# chattr -R -SAadiscu /dev/
chattr: Inappropriate ioctl for device while reading flags on /dev//pts
chattr: Inappropriate ioctl for device while reading flags on /dev//shm

All the files in /proc show the same.

Here comes a little positive example, I think.

SunWave1 /# lsattr /tmp/
----------X-j /tmp//xwlog
--------B-X-j /tmp//kde-nuetzel
------------- /tmp//dcop6SKhoM
---------D-Ej /tmp//YaST2.tdir
----------XEj /tmp//ksocket-root
--------B-X-j /tmp//mcop-nuetzel
--------B--Ej /tmp//kde-root
--------B-X-j /tmp//ksocket-nuetzel
--------B--Ej /tmp//INSTALL
--------BD-Ej /tmp//modules.conf.-
---------DX-j /tmp//vi.recover
--------BD-Ej /tmp//mcop-root
------------j /tmp//lost+found
--------BD-Ej /tmp//modules.conf

What next?

Thanks,
Dieter

PS Have you read about the latest ACL discussion on LKML?


2001-11-21 11:21:31

by Nikita Danilov

[permalink] [raw]
Subject: Re: [reiserfs-list] Re: [REISERFS TESTING] new patches on ftp.namesys.com: 2.4.15-pre7

Dieter N?tzel writes:
> Am Mittwoch, 21. November 2001 11:02 schrieb Nikita Danilov:
>
> > Yes, it's right, but currently we have what we have currently. I am
> > going to extend inode-attrs.patch and add new mount option
> > "noattrs". With it ioctls to set and get attributes will continue to
> > work, but attributes themselves will not have any effect. Then, one can
> > boot with "rootflags=noattrs" and read-write root, clear all attributes
> > by chattr -R and remount root.
> >
> > I put new version of the patch in the same place, Dieter, can you please
> > try it?
>
> So here it goes.
> You made one mistake in your README file:
>
> [-]
> chattr -R -SAadiscu /reiserfs-mount-point
>
> for each reiserfs file system. Said garbage on root file-system can
> prevent system from booting (for example spurious immutable flag on
> /dev/console) to work around this, new mount option
> "noattrs" is provided. With it chattr and lsattr still work, but
> attributes don't have any actual effect. So, boot system with
> "rootflags=noattr", clear all attributes and reboot or remount root
> file system.
> [-]
>
> You've forgotten the little "s" but had it right in your post.
>
> After I've 'booted into single user mode with "linux rootflags=noattrs" I
> could change my archives but _NOT_ /dev/console the right way. After the
> second reboot I got the warning and kernel hang, again. Something wrong with
> your patch or my installation?

Something is wrong with my head, it looks. Well, the simplest way to get
it working is

chattr -SAadiscu /dev
rm /dev/console
mknod /dev/console c 5 1
chmod 700 /dev/console

this way /dev/console will be recreated and attributes of parent
directory "/dev" will be inherited.

>
> SunWave1 /# l /dev/console
> crw------- 1 root root 5, 1 Nov 21 11:01 /dev/console
> SunWave1 /# lsattr /dev/console
> lsattr: Invalid argument While reading flags on /dev/console
>
> Two other FS in /dev have some problems, too. But I think that is right.
>
> SunWave1 /# chattr -R -SAadiscu /dev/
> chattr: Inappropriate ioctl for device while reading flags on /dev//pts
> chattr: Inappropriate ioctl for device while reading flags on /dev//shm
>
> All the files in /proc show the same.
>
> Here comes a little positive example, I think.
>
> SunWave1 /# lsattr /tmp/
> ----------X-j /tmp//xwlog
> --------B-X-j /tmp//kde-nuetzel
> ------------- /tmp//dcop6SKhoM
> ---------D-Ej /tmp//YaST2.tdir
> ----------XEj /tmp//ksocket-root
> --------B-X-j /tmp//mcop-nuetzel
> --------B--Ej /tmp//kde-root
> --------B-X-j /tmp//ksocket-nuetzel
> --------B--Ej /tmp//INSTALL
> --------BD-Ej /tmp//modules.conf.-
> ---------DX-j /tmp//vi.recover
> --------BD-Ej /tmp//mcop-root
> ------------j /tmp//lost+found
> --------BD-Ej /tmp//modules.conf
>
> What next?
>
> Thanks,
> Dieter
>
> PS Have you read about the latest ACL discussion on LKML?

Yes, but Hans thinks we shouldn't do ACL reiserfs 3.x and concentrate on
v4 in stead. You can try to persuade him though. Same for extended
attributes.

Nikita.

2001-11-21 23:30:31

by Stuart Young

[permalink] [raw]
Subject: Re: [reiserfs-list] Re: [REISERFS TESTING] new patches on ftp.namesys.com: 2.4.15-pre7

At 11:24 AM 21/11/01 +0100, Dieter N?tzel wrote:
>Am Mittwoch, 21. November 2001 11:02 schrieb Nikita Danilov:
>
> > Yes, it's right, but currently we have what we have currently. I am
> > going to extend inode-attrs.patch and add new mount option
> > "noattrs". With it ioctls to set and get attributes will continue to
> > work, but attributes themselves will not have any effect. Then, one can
> > boot with "rootflags=noattrs" and read-write root, clear all attributes
> > by chattr -R and remount root.
>
>After I've 'booted into single user mode with "linux rootflags=noattrs" I
>could change my archives but _NOT_ /dev/console the right way. After the
>second reboot I got the warning and kernel hang, again. Something wrong
>with your patch or my installation?

Erm, while disabling set and get as a nice idea, you only need to disable
get. Disabling set will mean you 'cannot' reset the file that is causing
the problem, because chattr won't actually be able to do what you want.

I haven't looked at the code that chattr uses either, but you may want to
check at HOW it sets/resets values.

eg: Does it read in the value, change the bit and write it out again, or
does it just change that bit? If it reads and get is disabled, well then
you would want to make sure you set the 'full value' that needs to be
there. Not a bug so much as something that just needs to be documented.


AMC Enterprises P/L - Stuart Young
First Floor - Network and Systems Admin
3 Chesterville Rd - [email protected]
Cheltenham Vic 3192 - Ph: (03) 9584-2700
http://www.amc.com.au/ - Fax: (03) 9584-2755