Khaled Diab
2014-02-20 11:09:33 UTC
Hi,I am writing a python script that creating an amazon volume and attach it to an instance.To do so, I need to create a file system using mkfs command.So, I wrote this code:
with settings(host_string=instance.public_dns_name, user = "my_user", key_filename="my_pem", warn_only=True): run('mkfs.ext4 /dev/xvdh') run('mount -t ext4 /dev/xvdh /work')
It returns:Could not stat /dev/xvdh --- No such file or directoryThe device apparently does not exist; did you specify it correctly?
I tries multiple options:- using sudo rather than run- using pty=False and/or shell=False in the run command
I SSHed to the VM and executed these commands, and it works fine! but didn't working using fabric.Any help is appreciated :)
Regards,Khaled
with settings(host_string=instance.public_dns_name, user = "my_user", key_filename="my_pem", warn_only=True): run('mkfs.ext4 /dev/xvdh') run('mount -t ext4 /dev/xvdh /work')
It returns:Could not stat /dev/xvdh --- No such file or directoryThe device apparently does not exist; did you specify it correctly?
I tries multiple options:- using sudo rather than run- using pty=False and/or shell=False in the run command
I SSHed to the VM and executed these commands, and it works fine! but didn't working using fabric.Any help is appreciated :)
Regards,Khaled