Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option to not cross filesystem boundaries #304

Open
roycewilliams opened this issue Oct 14, 2013 · 2 comments
Open

add option to not cross filesystem boundaries #304

roycewilliams opened this issue Oct 14, 2013 · 2 comments

Comments

@roycewilliams
Copy link

Disk partitions can be mounted in such a way that they appear within a single directory tree. It would be very useful for hashdeep to be optionally configurable to only run against files within the target filesystem. This functionality would mimic the Linux find "-xdev" option.

For example, consider this Unix-like mount setup:

/dev/ad4s1e on /var
/dev/ad6s1f on /var/data2
/dev/ad6s1g on /var/data3

If hashdeep has already been run against /var/data2, and we now want to checksum the files in /var that are not within /var/data2 or /var/data3, there is no mechanism within hashdeep today to do this.

EDIT: Possibly related feature request (#180) was closed without comment, so I'm not sure if my request is still applicable or not.

@dw-ec
Copy link

dw-ec commented Nov 10, 2018

Aside from using find -xdev to generate the file list, if you're using Linux, there's a very simple work-around that can achieve this: the --bind option to mount lets you virtually mount one directory at another location on your filesystem. By default any nested mounts are not mounted at the destination.

mount --bind /data /data-one-fs

Then just scan /data-one-fs.

I couldn't see an option to do this with lofs loopback mounts on SunOS unfortunately so it would be nice to see this added as a cross-platform feature in hashdeep.

@BillyCroan
Copy link

I second this. Because of the ext4 kernel bug yesterday I was going to use hashdeep to generate a weekly hash list of all my files on all my devices. But this quickly becomes impractical with the dozen or so virtual filesystems that gnu/linux mounts today.
Yes. I can string it together with gnu find. but the parallelism from hashdeep is nice, and would be hard to get right in a bash script.
if only there was a --one-file-system option to hashdeep!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants