PoC-Consortium/scavenger

Can not read network drives sectors

andreivcodes opened this issue · 7 comments

Because diskutil does not show network drives on MacOS, scavenger is not able to start

Is there any workaround for this?

Screenshot 2021-05-20 at 16 29 14

Hi,

issue acknowledged.

fn get_sector_size_macos(path: &str) -> u64 {

The macos routine panics if sector size can't be determined. I'll change it to just warn and default to 4096. Should be done by EOD.

Johnny

I've just pushed a fix into master, please let me know if working.

should have looked at PRs first :p

macOS works, I tested it, thanks for the tip.

I found a similar issue on aarch64 linux, on my Synology NAS to be exact

./scavenger -c config.yaml 
23:09:18 [INFO]  Scavenger v.1.8.0
thread 'main' panicked at 'failed to execute 'lsblk -o PHY-SeC': Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/utils.rs:83:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I forced sector_size to 4096 in there as well and now it's all good now.

I believe all the checks regarding sector_size should have a mechanism to fail gracefully to avoid such problems on other platforms.

agreed,

.expect("failed to execute 'lsblk -o PHY-SeC'");

replace .expect(...) with .unwrap_or_default() should do the trick.

I will test it tomorrow and make a PR :)

Done in PR #94