Skip to contentSkip to conversation

reiser4 (was Re: [PATCH] Revised extended attributes interface)

DISCUSSION Hans Reiser 4 participants 4 messages Dec 14, 2001 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 19 lines · Brad Boyer
Quoted 6 lines · Hans Reiser

I remember that I used to be a sysadmin with some NetApp boxes that have a .snapshot directory that is invisible, and has special qualities.

It worked. There were no namespace collision problems. None.

These things can be survived by users.;-)

Yes, these things can be survived, but speaking as someone who currently has a job involving multiple NetApp boxes, I can say that the .snapshot directory has some seriously annoying properties that break tar and other programs that expect things to look normal. The snapshots have saved my ass a few times, but they're still a pain to work with due to a few little quirks. In particular, the files in the snapshot keep the same inode number as the actual file. Just remember that clever solutions that almost fit the traditional model can have strange results over time.

Quoted 5 lines

Brad Boyer
[email protected]

Can you detail the problem?

Hans

#2 lore raw
Quoted 11 lines · Hans Reiser
Quoted 9 lines · Brad Boyer

Yes, these things can be survived, but speaking as someone who currently has a job involving multiple NetApp boxes, I can say that the .snapshot directory has some seriously annoying properties that break tar and other programs that expect things to look normal. The snapshots have saved my ass a few times, but they're still a pain to work with due to a few little quirks. In particular, the files in the snapshot keep the same inode number as the actual file. Just remember that clever solutions that almost fit the traditional model can have strange results over time.

Quoted 2 lines

Can you detail the problem?

The problem with the NetApp snapshots is that tar and cp and a few other programs that check inode numbers get confused and think everything in the snapshot is a hard link. So you can't copy a snapshot of a file back over the original without copying it somewhere else first, and it's painful to make an archive of the snapshots. We have data files on our filers that get updated frequently, and any time I need to analyze the same file over time, or restore an old file, it causes problems. I was throwing it out more as an example of what sort of unexpected things happen when you slightly change the way the filesystem works.

Brad Boyer
[email protected]

#3 lore raw
In reply to a message not in the archive

In article <[email protected]> you write:

Quoted 7 lines
Quoted 4 lines · Brad Boyer

In particular, the files in the snapshot keep
the same inode number as the actual file. Just remember that clever solutions that almost fit the traditional model can have strange results over time.

Can you detail the problem?

Anything that uses something like file1.st_dev==file2.st_dev && file1.st_ino==file2.st_ino to decide if two filenames point to the same file can get terribly confused. For example,

$ ls -li .snapshot/hourly.0/.zshrc .zshrc
1411878 -rw-r--r--    1     1247 Mar 19  2001 .snapshot/hourly.0/.zshrc
1411878 -rw-r--r--    1     1248 Dec 14 09:51 .zshrc

Clearly, the file has been modified since the hourly.0 snapshot; however

$ cp .snapshot/hourly.0/.zshrc .zshrc
cp: `.snapshot/hourly.0/.zshrc' and `.zshrc' are the same file

you can't copy the snapshot on top of the current version, since they have the same inode number. A somewhat contrived example, perhaps, but I have been bitten by something similar in the real world. One of the things I would like to be able to do with a snapshot is to open a file in emacs, open a snapshot in another window, and compare the two files with ediff. And you can't; emacs treats the original and the snapshot as if they were the same file - just like cp does - even though the file contents are different.

Signature · 2 lines
Dave Meyer
[email protected]
#4 lore raw
Quoted 1 line · In article <[email protected]> you wrote:

Clearly, the file has been modified since the hourly.0 snapshot; however

What kind of snapshot software are u using here? lvm?

Greetings
Bernd