Skip to content

Instantly share code, notes, and snippets.

@joepie91
Last active April 17, 2019 19:27
Show Gist options
  • Save joepie91/13b0ef03071cb5e3ed55f07f855afe9c to your computer and use it in GitHub Desktop.
Save joepie91/13b0ef03071cb5e3ed55f07f855afe9c to your computer and use it in GitHub Desktop.
query SomeDrives($drivePaths: [String]) {
hardware {
drives(paths: $drivePaths) {
path
interface
model
modelFamily
blockDevice {
removable
children {
name
mountpoint
size
}
}
}
}
resources {
blockDevices {
name
children {
name
mountpoint
size
}
}
}
}
cvm:execBinary Running: sudo "smartctl" "--scan" +0ms
cvm:execBinary Running: lsblk "--json" +10ms
cvm:execBinary Running: sudo "smartctl" "--info" "/dev/sda" +39ms
cvm:execBinary Running: sudo "smartctl" "--info" "/dev/sdb" +5ms
cvm:execBinary Running: sudo "smartctl" "--info" "/dev/sdc" +5ms
cvm:execBinary Running: sudo "smartctl" "--info" "/dev/sdd" +6ms
{ hardware:
{ drives:
[ { path: '/dev/sda',
interface: 'scsi',
model: 'TOSHIBA MD04ACA400',
modelFamily: 'Toshiba 3.5" MD04ACA... Enterprise HDD',
blockDevice:
{ removable: false,
children:
[ { name: 'sda1', mountpoint: '/mnt/temp', size: <Unit> 3.7 TiB } ] } },
{ path: '/dev/sdb',
interface: 'scsi',
model: 'WDC WD40EZRX-00SPEB0',
modelFamily: 'Western Digital Green',
blockDevice:
{ removable: false,
children:
[ { name: 'sdb1', mountpoint: null, size: <Unit> 2 GiB },
{ name: 'sdb2',
mountpoint: '/mnt/storage1',
size: <Unit> 1.8 TiB },
{ name: 'sdb3',
mountpoint: '/mnt/storage2',
size: <Unit> 1.8 TiB } ] } },
{ path: '/dev/sdc',
interface: 'scsi',
model: 'WDC WD10EZEX-60M2NA0',
modelFamily: 'Western Digital Blue',
blockDevice:
{ removable: false,
children:
[ { name: 'sdc1', mountpoint: '/boot', size: <Unit> 156 MiB },
{ name: 'sdc2',
mountpoint: '/mnt/opensuse',
size: <Unit> 396.8 GiB },
{ name: 'sdc3', mountpoint: '/', size: <Unit> 534.6 GiB } ] } },
{ path: '/dev/sdd',
interface: 'sat',
model: 'ST4000DM005-2DP166',
modelFamily: 'Seagate Barracuda 3.5',
blockDevice:
{ removable: false,
children: [ { name: 'sdd1', mountpoint: null, size: <Unit> 3.7 TiB } ] } } ] },
resources:
{ blockDevices:
[ { name: 'loop0', children: [] },
{ name: 'loop1', children: [] },
{ name: 'loop2', children: [] },
{ name: 'sda',
children:
[ { name: 'sda1', mountpoint: '/mnt/temp', size: <Unit> 3.7 TiB } ] },
{ name: 'sdb',
children:
[ { name: 'sdb1', mountpoint: null, size: <Unit> 2 GiB },
{ name: 'sdb2',
mountpoint: '/mnt/storage1',
size: <Unit> 1.8 TiB },
{ name: 'sdb3',
mountpoint: '/mnt/storage2',
size: <Unit> 1.8 TiB } ] },
{ name: 'sdc',
children:
[ { name: 'sdc1', mountpoint: '/boot', size: <Unit> 156 MiB },
{ name: 'sdc2',
mountpoint: '/mnt/opensuse',
size: <Unit> 396.8 GiB },
{ name: 'sdc3', mountpoint: '/', size: <Unit> 534.6 GiB } ] },
{ name: 'sdd',
children: [ { name: 'sdd1', mountpoint: null, size: <Unit> 3.7 TiB } ] } ] } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment