All of lore.kernel.org
 help / color / mirror / Atom feed
* rip?
@ 2004-07-21 23:17 Dirk Wetter
  2004-07-22  2:00 ` reiser4 as module Jeff Davis
  0 siblings, 1 reply; 5+ messages in thread
From: Dirk Wetter @ 2004-07-21 23:17 UTC (permalink / raw)
  To: reiserfs-list


Hi there,

looks a reiserfs on a disk is shredded, hope I can save something. This
is what I did:

Being lazy I used "yast2 disk" (i.e. the partion resizer) under Suse
9.0 I tried to enlarge a fs by the amout of the following swap
partition
(output of a previously recorded layout):


   Device Boot    Start       End    Blocks   Id  System
/dev/hdf1             1     14945 120045681    f  Win95 Ext'd (LBA)
/dev/hdf2             1         1         0    0  Empty
/dev/hdf5   *         1       262   2104452   83  Linux
/dev/hdf6           263      3631  27061461   83  Linux
/dev/hdf7          3632      3680    393561   82  Linux swap
/dev/hdf8          3681     14945  90486081   83  Linux

After this action the disk looked like this:

Disk /dev/hdf: 122.9 GB, 122942324736 bytes
16 heads, 63 sectors/track, 238216 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdf1             1    238186 120045681    f  Win95 Ext'd (LBA)
/dev/hdf5   *         1      4176   2104452   83  Linux
/dev/hdf6          4177     58647  27453352+  83  Linux
/dev/hdf7         58651    238186  90486081   83  Linux

Note the difference in Start/End, I cannot recall what I initially
did to get the first output. I don't remember invoking fdisk with
anything special...

I did unmount all partions from hdf before. yast complained that it
failed (I cannot quite recall the message, I only remember seeing a 
status bar with 0% and the error message on top of it). I quit yast and
tried to mount my filesystem, but it seemed to be gone. Then:

eagle:~# debugreiserfs /dev/hdf6
debugreiserfs 3.6.13 (2003 www.namesys.com)


reiserfs_open: the reiserfs superblock cannot be found on /dev/hdf6.


debugreiserfs: can not open reiserfs on "/dev/hdf6": no filesystem
found

eagle:~# 

I tried to run reiserfsck --rebuild-sb /dev/hdf6 :

eagle:/etc # reiserfsck --rebuild-sb /dev/hdf6
reiserfsck 3.6.13 (2003 www.namesys.com)

*************************************************************
** If you are using the latest reiserfsprogs and  it fails **
** please  email bug reports to reiserfs-list@namesys.com, **
** providing  as  much  information  as  possible --  your **
** hardware,  kernel,  patches,  settings,  all reiserfsck **
** messages  (including version),  the reiserfsck logfile, **
** check  the  syslog file  for  any  related information. **
** If you would like advice on using this program, support **
** is available  for $25 at  www.namesys.com/support.html. **
*************************************************************

Will check superblock and rebuild it if needed
Will put log info to 'stdout'

Do you want to run this program?[N/Yes] (note need to type Yes if you
do):Yes

reiserfs_open: the reiserfs superblock cannot be found on /dev/hdf6.
what the version of ReiserFS do you use[1-4]
        (1)   3.6.x
        (2) >=3.5.9 (introduced in the middle of 1999) (if you use
linux 2.2, choose this one)
        (3) < 3.5.9 converted to new format (don't choose if unsure)
        (4) < 3.5.9 (this is very old format, don't choose if unsure)
        (X)   exit
1

Enter block size [4096]: 
8192
No journal device was specified. (If journal is not available, re-run
with --no-journal-available option specified).
Is journal default? (y/n)[y]: 

Did you use resizer(y/n)[n]: y

Enter partition size [3431669]: ^C


Here I stopped because I didn't know what unit the size asked for is.
Also I thought it was smarter to work on a copy (dd if=/dev/hdf6
of=mydiskfile bs=large), so I did some experiments, but I wasn't able
to access any data yet.


Mount previously divulged:

ReiserFS: hdf6: found reiserfs format "3.6" with standard journal
ReiserFS: hdf6: using ordered data mode
ReiserFS: hdf6: journal params: device hdf6, size 8192, journal first
block 18, max trans len 1024, max batch 900, max commit age 30, max
trans age 30



Any useful hint would be very appreciated.

Thanks,
      Dirk






__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* reiser4 as module
  2004-07-21 23:17 rip? Dirk Wetter
@ 2004-07-22  2:00 ` Jeff Davis
  2004-07-22  3:50   ` David Masover
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Davis @ 2004-07-22  2:00 UTC (permalink / raw)
  To: reiserfs-list

Using 2.6.5-rc with the all.diff.gz patch on the website.

I am trying to develop my own plugin. I think I got a good start, I
added an extra built-in pseudo file. However, it's slow going because I
have to reboot to test my code.

I tried compiling reiser4 as a module, but if I "rmmod reiser4" then
change the code, then "make modules && make modules_install", then
"modprobe reiser4", then I get a seg fault. After that the reiser4
module is stuck (says it's in use) and I can't use reiser4 at all after
I do that, until I reboot.

Does someone have a better suggestion for me? Is the unloading of
reiser4 problem a bug? Am I not doing it correctly (this is my first
kernel modification)?

As a seperate issue, the plugin I'm trying to ultimately create is one
where you can access a script by doing something like
"/path/to/script.py/pyexe" and it would execute the script and the file
contents would be (read only) the stdout. That would allow cool stuff
like having a configuration file be just data pulled from a database (as
an example). Is this even possible? I'm still trying to figure out how
I'd write it in a secure way (we don't want to execute a user's script
in kernel address space).

	Regards,
		Jeff Davis

P.S. Nice code! The parts I saw were very easy to read and modify.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: reiser4 as module
  2004-07-22  2:00 ` reiser4 as module Jeff Davis
@ 2004-07-22  3:50   ` David Masover
  2004-07-22  4:22     ` Jeff Davis
  0 siblings, 1 reply; 5+ messages in thread
From: David Masover @ 2004-07-22  3:50 UTC (permalink / raw)
  To: Jeff Davis; +Cc: reiserfs-list

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Jeff Davis wrote:

| Does someone have a better suggestion for me? Is the unloading of
| reiser4 problem a bug? Am I not doing it correctly (this is my first
| kernel modification)?

I don't think reiser4 is really able to be a module right now.  I think
it's a bug, but not a high-priority one.  I think, I think, I think...

I don't know how to get UML to work with reiser4, but I'm sure it can be
done, as I've heard Namesys people say they use that to develop under.
So there, yes, you'd have to reboot your UML kernel, but you could be
doing other things while that happened -- and it wouldn't take long for
it to reboot anyway.

Also, you may want to use the bitkeeper tree to develop off.  Is that
still up?  http://namesys.com/code.html

| As a seperate issue, the plugin I'm trying to ultimately create is one
| where you can access a script by doing something like
| "/path/to/script.py/pyexe" and it would execute the script and the file
| contents would be (read only) the stdout. That would allow cool stuff
| like having a configuration file be just data pulled from a database (as
| an example). Is this even possible? I'm still trying to figure out how
| I'd write it in a secure way (we don't want to execute a user's script
| in kernel address space).

Possible, and may have some other uses.  But why would anyone want to
put config files in a database?  With reiser4's handling of small files
and things like NFS, I can't find a single reason.  Also, if you're
going to start python, run a python script which accesses a database,
take the results and send them to kernel space, then back to user space,
you're talking about serious performance issues vs. just leaving the
config files alone, as flat text.

Also, what you're proposing could be implemented without reiser4:

cd /path/to
mkfifo script.pipe
while true; do
	./script.py > script.pipe;
done

Run that, then go to another terminal and try 'cat'-ing
/path/to/script.pipe instead of /path/to/script.py/pyexe.  You may have
to ensure that script.py outputs an EOF character.

I don't know about the best way to implement it as a plugin.  Maybe keep
most of it in userland?


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iQIVAwUBQP85e3gHNmZLgCUhAQLdJA//SnsJU9/sVSu56ywbnyjXTyF8B4jdr8xy
b55zT51DRemlDvCVmEbTydc6qx58TL1g3eL67Nq2O3fXYSvuX6ROvdp2S3228PW5
GHN2/ARaL0VoYMpgy+nXkA5iTk+KGXnyZsJE03bMkDdrh4a2uXTvnNoYuajaiFuI
Sl3KVK/5vTD+EYZGYtGdtARGXi+mKLJeCAKsj021L35NnY508567zS9RBFAAgTDj
trSjt+EYMzTJ9Y4mO1BkFFOvqGZQJg6kPbLzZ6oUtoFpfMJRX688fgxVw1FOSsSx
HfjmSSa6RUJeC0JwK7aaWM2M/BSv7+00aP6lmTXC0JC8d01He0ynKU6RifCti6FS
Vif9fZsCpurMkTxh21Mv119H/oEy0shi+O82aoh7nvsB+ZLvvXbQLdnLAoJkseAR
pwBuryDVs7uT/gQmCA50gkWDeuRztRPCwYCyHa8C9dHQDLyLUJoWB25I/F+m1rIE
5Go8Vpzap46T9CHIFVxJRRSjm+yudw85IDTg0MS7h9uRnDDBT7oNFQjErSK7gLJd
IVdNg2rxHaknYN0guxyLWp5+depg4+rnl3/QIZeqe9rWi9rD0128U+FEs4P0firM
gzTC+XfOKExhTGdb3l+VO7YvFbSGegu9Fh5qTqfNlI9/4DkYZrLrfCz/7ZxzLCJ4
dNeKS/zPvog=
=WfBy
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: reiser4 as module
  2004-07-22  3:50   ` David Masover
@ 2004-07-22  4:22     ` Jeff Davis
  2004-07-22 10:13       ` mjt
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Davis @ 2004-07-22  4:22 UTC (permalink / raw)
  To: reiserfs-list


> I don't know how to get UML to work with reiser4, but I'm sure it can be
> done, as I've heard Namesys people say they use that to develop under.
> So there, yes, you'd have to reboot your UML kernel, but you could be
> doing other things while that happened -- and it wouldn't take long for
> it to reboot anyway.
> 

Thanks. I think I'll try UML, I've been meaning to try that for a while.

> Possible, and may have some other uses.  But why would anyone want to
> put config files in a database?  With reiser4's handling of small files
> and things like NFS, I can't find a single reason.  Also, if you're

My idea was more from concern about duplicating data. Let's say it's DNS
data that you already have in a SQL database, and you just want the
named.conf to reflect the data without using update scripts.

> going to start python, run a python script which accesses a database,
> take the results and send them to kernel space, then back to user space,
> you're talking about serious performance issues vs. just leaving the
> config files alone, as flat text.

Yeah, which sometimes matters, and sometimes doesn't (like when reading
a config file).

> cd /path/to
> mkfifo script.pipe
> while true; do
> 	./script.py > script.pipe;
> done

Wow. I feel dumb. That pretty much takes care of my problems right
there. Thanks for educating me.

Regards,
	Jeff





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: reiser4 as module
  2004-07-22  4:22     ` Jeff Davis
@ 2004-07-22 10:13       ` mjt
  0 siblings, 0 replies; 5+ messages in thread
From: mjt @ 2004-07-22 10:13 UTC (permalink / raw)
  To: Jeff Davis; +Cc: reiserfs-list

On Wed, Jul 21, 2004 at 09:22:10PM -0700, Jeff Davis wrote:
>Thanks. I think I'll try UML, I've been meaning to try that for a while.

High hopes for the future now that the auto-snapshots are against
an mm which has UML ;)

BTW, didn't some pretty important things change after the latest stable?
I'm not talking radix here, but I can never remember when psets were
implemented... May be of quite some importance when developing plugins..

-- 
mjt


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-07-22 10:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-21 23:17 rip? Dirk Wetter
2004-07-22  2:00 ` reiser4 as module Jeff Davis
2004-07-22  3:50   ` David Masover
2004-07-22  4:22     ` Jeff Davis
2004-07-22 10:13       ` mjt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.