How do you use SSHFS to work on drives in /dev/

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
My laptop for some reason will not power an external 2.5" HDD, so I am using a Raspberry PI to connect to the drive.
The problem is, I am struggling to perform tasks such as formatting disks and backing-up/restoring partitions. For example:
$ sshfs zaz@192.168.1.93:/dev/ /media/pi-dev
# ntfsclone -r -O /media/pi-dev/sda1 backup.iso
[sudo] password for zaz:
ntfsclone v2016.2.22AR.2 (libntfs-3g)
ERROR(13): Couldn't access 'dev/sda1': Permission denied
How can I use sshfs to mount device files so that I can work with partitions?
ssh devices block-device sshfs
add a comment |Â
up vote
0
down vote
favorite
My laptop for some reason will not power an external 2.5" HDD, so I am using a Raspberry PI to connect to the drive.
The problem is, I am struggling to perform tasks such as formatting disks and backing-up/restoring partitions. For example:
$ sshfs zaz@192.168.1.93:/dev/ /media/pi-dev
# ntfsclone -r -O /media/pi-dev/sda1 backup.iso
[sudo] password for zaz:
ntfsclone v2016.2.22AR.2 (libntfs-3g)
ERROR(13): Couldn't access 'dev/sda1': Permission denied
How can I use sshfs to mount device files so that I can work with partitions?
ssh devices block-device sshfs
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
My laptop for some reason will not power an external 2.5" HDD, so I am using a Raspberry PI to connect to the drive.
The problem is, I am struggling to perform tasks such as formatting disks and backing-up/restoring partitions. For example:
$ sshfs zaz@192.168.1.93:/dev/ /media/pi-dev
# ntfsclone -r -O /media/pi-dev/sda1 backup.iso
[sudo] password for zaz:
ntfsclone v2016.2.22AR.2 (libntfs-3g)
ERROR(13): Couldn't access 'dev/sda1': Permission denied
How can I use sshfs to mount device files so that I can work with partitions?
ssh devices block-device sshfs
My laptop for some reason will not power an external 2.5" HDD, so I am using a Raspberry PI to connect to the drive.
The problem is, I am struggling to perform tasks such as formatting disks and backing-up/restoring partitions. For example:
$ sshfs zaz@192.168.1.93:/dev/ /media/pi-dev
# ntfsclone -r -O /media/pi-dev/sda1 backup.iso
[sudo] password for zaz:
ntfsclone v2016.2.22AR.2 (libntfs-3g)
ERROR(13): Couldn't access 'dev/sda1': Permission denied
How can I use sshfs to mount device files so that I can work with partitions?
ssh devices block-device sshfs
asked Jun 27 at 23:36
Zaz
1,1151110
1,1151110
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
SSHFS cannot do this. It cannot access block devices. (Source.)
You have four options:
SSH into the Pi, and mount the drive. Eg:
root@pi# mount /dev/sda1 /mnt/diskThen use SSHFS to mount it on your laptop. Eg:
user@laptop$ sshfs zaz@192.168.1.93:/mnt/disk/ /media/pi-diskNow you can modify files on the hard drive. However, I think this doesn't solve your problem - it sounds like you're trying to reformat or recover a failing disk.
SSH into the Pi, and run your disk recovery commands there. If you don't have enough space on the Pi to do a disk clone, consider trying something like:
ntfsclone --save-image --output - /dev/hda1 |
gzip -c | ssh host 'cat > backup.img.gz'(Source: ntfsclone(8) manual.)
This command clones a local partition, and saves it to a remote system.
Buy a powered USB hub. (The kind with a wall-wart.) They're pretty cheap, and you could connect your hard drive to your laptop without any power issues.
Use Network Block Device (NBD) to share the block device over the network. Example. I have never tried this, so you're on your own. ;)
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
SSHFS cannot do this. It cannot access block devices. (Source.)
You have four options:
SSH into the Pi, and mount the drive. Eg:
root@pi# mount /dev/sda1 /mnt/diskThen use SSHFS to mount it on your laptop. Eg:
user@laptop$ sshfs zaz@192.168.1.93:/mnt/disk/ /media/pi-diskNow you can modify files on the hard drive. However, I think this doesn't solve your problem - it sounds like you're trying to reformat or recover a failing disk.
SSH into the Pi, and run your disk recovery commands there. If you don't have enough space on the Pi to do a disk clone, consider trying something like:
ntfsclone --save-image --output - /dev/hda1 |
gzip -c | ssh host 'cat > backup.img.gz'(Source: ntfsclone(8) manual.)
This command clones a local partition, and saves it to a remote system.
Buy a powered USB hub. (The kind with a wall-wart.) They're pretty cheap, and you could connect your hard drive to your laptop without any power issues.
Use Network Block Device (NBD) to share the block device over the network. Example. I have never tried this, so you're on your own. ;)
add a comment |Â
up vote
1
down vote
accepted
SSHFS cannot do this. It cannot access block devices. (Source.)
You have four options:
SSH into the Pi, and mount the drive. Eg:
root@pi# mount /dev/sda1 /mnt/diskThen use SSHFS to mount it on your laptop. Eg:
user@laptop$ sshfs zaz@192.168.1.93:/mnt/disk/ /media/pi-diskNow you can modify files on the hard drive. However, I think this doesn't solve your problem - it sounds like you're trying to reformat or recover a failing disk.
SSH into the Pi, and run your disk recovery commands there. If you don't have enough space on the Pi to do a disk clone, consider trying something like:
ntfsclone --save-image --output - /dev/hda1 |
gzip -c | ssh host 'cat > backup.img.gz'(Source: ntfsclone(8) manual.)
This command clones a local partition, and saves it to a remote system.
Buy a powered USB hub. (The kind with a wall-wart.) They're pretty cheap, and you could connect your hard drive to your laptop without any power issues.
Use Network Block Device (NBD) to share the block device over the network. Example. I have never tried this, so you're on your own. ;)
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
SSHFS cannot do this. It cannot access block devices. (Source.)
You have four options:
SSH into the Pi, and mount the drive. Eg:
root@pi# mount /dev/sda1 /mnt/diskThen use SSHFS to mount it on your laptop. Eg:
user@laptop$ sshfs zaz@192.168.1.93:/mnt/disk/ /media/pi-diskNow you can modify files on the hard drive. However, I think this doesn't solve your problem - it sounds like you're trying to reformat or recover a failing disk.
SSH into the Pi, and run your disk recovery commands there. If you don't have enough space on the Pi to do a disk clone, consider trying something like:
ntfsclone --save-image --output - /dev/hda1 |
gzip -c | ssh host 'cat > backup.img.gz'(Source: ntfsclone(8) manual.)
This command clones a local partition, and saves it to a remote system.
Buy a powered USB hub. (The kind with a wall-wart.) They're pretty cheap, and you could connect your hard drive to your laptop without any power issues.
Use Network Block Device (NBD) to share the block device over the network. Example. I have never tried this, so you're on your own. ;)
SSHFS cannot do this. It cannot access block devices. (Source.)
You have four options:
SSH into the Pi, and mount the drive. Eg:
root@pi# mount /dev/sda1 /mnt/diskThen use SSHFS to mount it on your laptop. Eg:
user@laptop$ sshfs zaz@192.168.1.93:/mnt/disk/ /media/pi-diskNow you can modify files on the hard drive. However, I think this doesn't solve your problem - it sounds like you're trying to reformat or recover a failing disk.
SSH into the Pi, and run your disk recovery commands there. If you don't have enough space on the Pi to do a disk clone, consider trying something like:
ntfsclone --save-image --output - /dev/hda1 |
gzip -c | ssh host 'cat > backup.img.gz'(Source: ntfsclone(8) manual.)
This command clones a local partition, and saves it to a remote system.
Buy a powered USB hub. (The kind with a wall-wart.) They're pretty cheap, and you could connect your hard drive to your laptop without any power issues.
Use Network Block Device (NBD) to share the block device over the network. Example. I have never tried this, so you're on your own. ;)
answered Jun 28 at 1:43
Nick ODell
8922819
8922819
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f452319%2fhow-do-you-use-sshfs-to-work-on-drives-in-dev%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password