hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Shvachko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-2802) Support for RW/RO snapshots in HDFS
Date Fri, 02 Nov 2012 18:01:17 GMT

    [ https://issues.apache.org/jira/browse/HDFS-2802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13489599#comment-13489599
] 

Konstantin Shvachko commented on HDFS-2802:
-------------------------------------------

Sure date+timestamp sounds good as the default snapshot name.

> rm -r <path> - as already stated in the document, if there are snapshots under
that path, then deletion is not allowed, until all the snapshots are deleted.

The document says you cannot delete the directory, which is the root of a snapshot. You should
be able to remove -r a subdirectory if it is not a root of another snapshot, no?

> ls -r <path>/.snapshot - I was thinking this would be same as ls <path>/.snapshot.

Yeh, {{ls -r}} can be expensive on HDFS directories in general. I would just support it rather
than deciding for users.

> rm <path>/.snapshot or rm -r <path>/.snapshot - removes all the snapshots.

> rm <path>/.snapshot/snapname or rm -r <path>/.snapshot/snapname - deletes
the snapshot

You know, I just remembered a 1 PB disaster that was a result of a bug in a script.
I am afraid of a script that does ls -r, and then applies rm or rm-r to each entry.
Let's make both rm and rm -r fail on anything that includes .snapshot. This ensures that snapshots
are read-only.
And let snapshots be deleted with a new option rm -rs.
The .snapshot directory can disappear automatically when all snapshots are gone.

What about ls -rs? How do you discover directories that are snapshotable?
Should we introduce -rs option to list all directories that are snapshottable under the path.
                
> Support for RW/RO snapshots in HDFS
> -----------------------------------
>
>                 Key: HDFS-2802
>                 URL: https://issues.apache.org/jira/browse/HDFS-2802
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>          Components: data-node, name-node
>            Reporter: Hari Mankude
>            Assignee: Hari Mankude
>         Attachments: HDFS-2802.20121101.patch, HDFS-2802-meeting-minutes-121101.txt,
HDFSSnapshotsDesign.pdf, snap.patch, snapshot-design.pdf, snapshot-design.tex, snapshot-one-pager.pdf,
Snapshots20121018.pdf, Snapshots20121030.pdf
>
>
> Snapshots are point in time images of parts of the filesystem or the entire filesystem.
Snapshots can be a read-only or a read-write point in time copy of the filesystem. There are
several use cases for snapshots in HDFS. I will post a detailed write-up soon with with more
information.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message