fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fab-user] mkfs doesn't work using fabric


From: Khaled Diab
Subject: [Fab-user] mkfs doesn't work using fabric
Date: Thu, 20 Feb 2014 03:09:33 -0800

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 directory
The 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]