All of lore.kernel.org
 help / color / mirror / Atom feed
* immutability
@ 2004-05-29 15:21 Alexy Khrabrov
  2004-05-30 18:16 ` immutability Miguel
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Alexy Khrabrov @ 2004-05-29 15:21 UTC (permalink / raw)
  To: ReiserFS List


About immutability...

Now I have to confess, I've deleted those two files while trying to
make them immutable whith chattr.  I didn't realize it applies to
ext2/3 filesystems, and lsattr did show ..-i-...  Seeing i, I did rm,
and there they went.  On the good side, I know what to do now if I
accidentally delete a file on Linux, which is no small feat -- for years,
I just thought, forget it.  Unix approach to recovery was, and still is,
"backup", and if you didn't, you're an idiot whose files are not worth
recovery anyway.  :)  Undoing an rm on Linux is a deeply vindicating
experience :).  I wonder what v4 offers in that area.  And even with
the current routine, as can be easily seen, there could be automated
assembly scripts.

So, just to confirm -- is there chattr or a similar way to make files
immutable?  I use a RAID to store digital photographs, running LVM on
top of it consisting of the RAID physical volume only, and reiserfs in
the logical volume spanning the only volume group spanning the RAID.
The idea was, I'll just get those logical extents I need in case I
need a used part of it -- here I'd need help from reiserfs's bitmap,
still have to figure that out, that's what my original "partial dd"
question was about.  I'd like to make the files "write once" via some
kind of automated process.  Is there any way simpler than remounting
the thing read-only after each write from a CF card?

-- 
Cheers,
Alexy Khrabrov :: www.setup.org :: Age Quod Agis

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

* Re: immutability
  2004-05-29 15:21 immutability Alexy Khrabrov
@ 2004-05-30 18:16 ` Miguel
  2004-06-05 14:31   ` immutability Sander
  2004-05-30 19:13 ` immutability mjt
  2004-05-31  7:40 ` immutability Vladimir Saveliev
  2 siblings, 1 reply; 6+ messages in thread
From: Miguel @ 2004-05-30 18:16 UTC (permalink / raw)
  To: Alexy Khrabrov; +Cc: ReiserFS List

On Sat, 29 May 2004 11:21:54 -0400
Alexy Khrabrov <list+reiserfs@setup.org> wrote:

> 
> About immutability...
> 
> Now I have to confess, I've deleted those two files while trying to
> make them immutable whith chattr.  I didn't realize it applies to
> ext2/3 filesystems, and lsattr did show ..-i-...  Seeing i, I did rm,
> and there they went.  On the good side, I know what to do now if I
> accidentally delete a file on Linux, which is no small feat -- for
> years, I just thought, forget it.  Unix approach to recovery was, and
> still is,"backup", and if you didn't, you're an idiot whose files are
> not worth recovery anyway.  :)  Undoing an rm on Linux is a deeply
> vindicating experience :).  I wonder what v4 offers in that area.  And
> even with the current routine, as can be easily seen, there could be
> automated assembly scripts.

Yes but backup is a bit annoyning when you need to recover just a few
files, I'm using a procedure on my machines to restore recently deleted
files (24h).

Firt you need libtrash (http://www.m-arriaga.net/software/libtrash/)
which intercepts some system calls when you try to delete a file and mv
those files to a special directory.

Then tmpreaper cleans the "trash" directory deleting old files when
atime > 24h in my case.

(http://packages.debian.org/unstable/admin/tmpreaper)

it's easy and 100% userspace.


> 
> So, just to confirm -- is there chattr or a similar way to make files
> immutable?  I use a RAID to store digital photographs, running LVM on
> top of it consisting of the RAID physical volume only, and reiserfs in
> the logical volume spanning the only volume group spanning the RAID.
> The idea was, I'll just get those logical extents I need in case I
> need a used part of it -- here I'd need help from reiserfs's bitmap,
> still have to figure that out, that's what my original "partial dd"
> question was about.  I'd like to make the files "write once" via some
> kind of automated process.  Is there any way simpler than remounting
> the thing read-only after each write from a CF card?
> 
> -- 
> Cheers,
> Alexy Khrabrov :: www.setup.org :: Age Quod Agis
> 


-- 
La resistencia es fútil todos seréis asimilados

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

* Re: immutability
  2004-05-29 15:21 immutability Alexy Khrabrov
  2004-05-30 18:16 ` immutability Miguel
@ 2004-05-30 19:13 ` mjt
  2004-05-31  7:40 ` immutability Vladimir Saveliev
  2 siblings, 0 replies; 6+ messages in thread
From: mjt @ 2004-05-30 19:13 UTC (permalink / raw)
  To: Alexy Khrabrov; +Cc: ReiserFS List

On Sat, May 29, 2004 at 11:21:54AM -0400, Alexy Khrabrov wrote:

>So, just to confirm -- is there chattr or a similar way to make files
>immutable?  I use a RAID to store digital photographs, running LVM on

Write a plugin:
echo 1 > ..metas/plugin/immutable

;)

-- 
mjt


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

* Re: immutability
  2004-05-29 15:21 immutability Alexy Khrabrov
  2004-05-30 18:16 ` immutability Miguel
  2004-05-30 19:13 ` immutability mjt
@ 2004-05-31  7:40 ` Vladimir Saveliev
  2 siblings, 0 replies; 6+ messages in thread
From: Vladimir Saveliev @ 2004-05-31  7:40 UTC (permalink / raw)
  To: Alexy Khrabrov; +Cc: ReiserFS List

Hello

On Sat, 2004-05-29 at 19:21, Alexy Khrabrov wrote:
> About immutability...
> 
> Now I have to confess, I've deleted those two files while trying to
> make them immutable whith chattr.  I didn't realize it applies to
> ext2/3 filesystems, and lsattr did show ..-i-...  Seeing i, I did rm,
> and there they went.  On the good side, I know what to do now if I
> accidentally delete a file on Linux, which is no small feat -- for years,
> I just thought, forget it.  Unix approach to recovery was, and still is,
> "backup", and if you didn't, you're an idiot whose files are not worth
> recovery anyway.  :)  Undoing an rm on Linux is a deeply vindicating
> experience :).  I wonder what v4 offers in that area.  And even with
> the current routine, as can be easily seen, there could be automated
> assembly scripts.
> 
> So, just to confirm -- is there chattr or a similar way to make files
> immutable? 

reiserfs has mount option attrs (mount -o attrs). chattr and lsattr
starts to work then. You may have to run reiserfsck --clean-attributes
before using it, though

>  I use a RAID to store digital photographs, running LVM on
> top of it consisting of the RAID physical volume only, and reiserfs in
> the logical volume spanning the only volume group spanning the RAID.
> The idea was, I'll just get those logical extents I need in case I
> need a used part of it -- here I'd need help from reiserfs's bitmap,
> still have to figure that out, that's what my original "partial dd"
> question was about.  I'd like to make the files "write once" via some
> kind of automated process.  Is there any way simpler than remounting
> the thing read-only after each write from a CF card?


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

* Re: immutability
  2004-05-30 18:16 ` immutability Miguel
@ 2004-06-05 14:31   ` Sander
  2004-06-05 14:57     ` immutability Miguel
  0 siblings, 1 reply; 6+ messages in thread
From: Sander @ 2004-06-05 14:31 UTC (permalink / raw)
  To: Miguel; +Cc: Alexy Khrabrov, ReiserFS List

Miguel wrote (ao):
> Yes but backup is a bit annoyning when you need to recover just a few
> files, I'm using a procedure on my machines to restore recently
> deleted files (24h).

How can backups be annoying if you need to recover (just a few) files?

Btw, I would not consider the immutable bit a safetybit for important
files. It wont protect you against hardware failure for example.

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

* Re: immutability
  2004-06-05 14:31   ` immutability Sander
@ 2004-06-05 14:57     ` Miguel
  0 siblings, 0 replies; 6+ messages in thread
From: Miguel @ 2004-06-05 14:57 UTC (permalink / raw)
  To: sander; +Cc: Alexy Khrabrov, ReiserFS List

On Sat, 5 Jun 2004 16:31:16 +0200
Sander <sander@humilis.net> wrote:

> Miguel wrote (ao):
> > Yes but backup is a bit annoyning when you need to recover just a
> > few files, I'm using a procedure on my machines to restore recently
> > deleted files (24h).
> 
> How can backups be annoying if you need to recover (just a few) files?

Tape backups are one good example.

> 
> Btw, I would not consider the immutable bit a safetybit for important
> files. It wont protect you against hardware failure for example.
> 

Agree, I prefer the trash-like protection for file deletions only.


-- 
La resistencia es fútil todos seréis asimilados

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

end of thread, other threads:[~2004-06-05 14:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-29 15:21 immutability Alexy Khrabrov
2004-05-30 18:16 ` immutability Miguel
2004-06-05 14:31   ` immutability Sander
2004-06-05 14:57     ` immutability Miguel
2004-05-30 19:13 ` immutability mjt
2004-05-31  7:40 ` immutability Vladimir Saveliev

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.