Format attached storage to ext3 fs
(ssh_client, device="/dev/sda")
| 191 | |
| 192 | |
| 193 | def format_volume_to_ext3(ssh_client, device="/dev/sda"): |
| 194 | """Format attached storage to ext3 fs""" |
| 195 | cmds = [ |
| 196 | "echo -e 'n\np\n1\n\n\nw' | fdisk %s" % device, |
| 197 | "mkfs.ext3 %s1" % device, |
| 198 | ] |
| 199 | for c in cmds: |
| 200 | ssh_client.execute(c) |
| 201 | |
| 202 | |
| 203 | def fetch_api_client(config_file='datacenterCfg'): |