Skip to content

Commit

Permalink
update disk pause function to by-id device name type rockstor#1320
Browse files Browse the repository at this point in the history
  • Loading branch information
phillxnet committed May 23, 2016
1 parent f5bd733 commit ca15cc3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/rockstor/system/osi.py
Expand Up @@ -1081,14 +1081,14 @@ def read_hdparm_setting(dev_byid):
return None


def enter_standby(device_name):
def enter_standby(dev_byid):
"""
Simple wrapper to execute hdparm -y /dev/device_name which requests that the
Simple wrapper to execute hdparm -y /dev/disk/by-id/device_name which requests that the
named device enter 'standby' mode which usually means it will spin down.
Should only be available if he power status of the device can be
successfully read without errors (ui inforced)
:param device_name: device name as stored in db ie sda
:param dev_byid: device name as stored in db ie /dev/disk/by-id type
:return: None or out, err, rc of command
"""
hdparm_command = [HDPARM, '-q', '-y', '%s' % get_devname(device_name, True)]
hdparm_command = [HDPARM, '-q', '-y', '/dev/disk/by-id/%s' % dev_byid]
return run_command(hdparm_command)

0 comments on commit ca15cc3

Please sign in to comment.