Disk reservation: Difference between revisions

From Grid5000
Jump to navigation Jump to search
Line 17: Line 17:


== Reserve disks and nodes at the same time ==
== Reserve disks and nodes at the same time ==
Reserve a node with its main disk on grimoire cluster
Reserve a node with its main disk on grimoire cluster:
{{Term|location=fnancy|cmd=<code class="command">oarsub</code> <code>-I -t deploy -l {"cluster='grimoire'"}/host=1</code>}}
{{Term|location=fnancy|cmd=<code class="command">oarsub</code> <code>-I -t deploy -l {"cluster='grimoire'"}/host=1</code>}}


Or reserve a node with all its disks
Or reserve a node with all its disks:
{{Term|location=fnancy|cmd=<code class="command">oarsub</code> <code>-I -t deploy -l {"type='disk' or type='default' and disk_reservation_count > 0"}/host=1</code>}}
{{Term|location=fnancy|cmd=<code class="command">oarsub</code> <code>-I -t deploy -l {"type='disk' or type='default' and disk_reservation_count > 0"}/host=1</code>}}
disk_reservation_count is equal to the number of bookable disks on a node. At present, bookable disks are only present on the grimoire cluster.
disk_reservation_count is equal to the number of bookable disks on a node. At present, bookable disks are only present on the grimoire cluster.


Reserve nodes grimoire-1 and grimoire-2 with 1 disk per node
Reserve nodes grimoire-1 and grimoire-2 with 1 disk per node:
{{Term|location=fnancy|cmd=<code class="command">oarsub</code> <code>-I -t deploy -l {"type='default' and host in ('grimoire-1.nancy.grid5000.fr','grimoire-2.nancy.grid5000.fr')"}/host=2+{"type='disk' and host in ('grimoire-1.nancy.grid5000.fr','grimoire-2.nancy.grid5000.fr')"}/host=2/disk=1</code>}}
{{Term|location=fnancy|cmd=<code class="command">oarsub</code> <code>-I -t deploy -l {"type='default' and host in ('grimoire-1.nancy.grid5000.fr','grimoire-2.nancy.grid5000.fr')"}/host=2+{"type='disk' and host in ('grimoire-1.nancy.grid5000.fr','grimoire-2.nancy.grid5000.fr')"}/host=2/disk=1</code>}}


Line 31: Line 31:
You can decide to reserve some disks for one week, and the corresponding nodes only when you want to carry out an experiment.
You can decide to reserve some disks for one week, and the corresponding nodes only when you want to carry out an experiment.


Reserve two disks on grimoire-1 for one week, starting on January 1st
Reserve two disks on grimoire-1 for one week, starting on January 1st:
{{Term|location=fnancy|cmd=<code class="command">oarsub</code> <code>-r "2018-01-01 00:00:00" -t noop -l {"type='disk' and host='grimoire-1.nancy.grid5000.fr'"}/host=1/disk=2,walltime=168</code>}}
{{Term|location=fnancy|cmd=<code class="command">oarsub</code> <code>-r "2018-01-01 00:00:00" -t noop -l {"type='disk' and host='grimoire-1.nancy.grid5000.fr'"}/host=1/disk=2,walltime=168</code>}}


Specify you want the first two disks of grimoire-2
Specify you want the first two disks of grimoire-2:
{{Term|location=fnancy|cmd=<code class="command">oarsub</code> <code>-r "2018-01-01 00:00:00" -t noop -l {"type='disk' and host='grimoire-2.nancy.grid5000.fr' and disk in ('1', '2')"}/host=1/disk=2,walltime=168</code>}}
{{Term|location=fnancy|cmd=<code class="command">oarsub</code> <code>-r "2018-01-01 00:00:00" -t noop -l {"type='disk' and host='grimoire-2.nancy.grid5000.fr' and disk in ('1', '2')"}/host=1/disk=2,walltime=168</code>}}


Or reserve all disks of two nodes
Or reserve all disks of two nodes:
{{Term|location=fnancy|cmd=<code class="command">oarsub</code> <code>-r "2018-01-01 00:00:00" -t noop -l {"type='disk' and cluster='grimoire'"}/host=2/disk=ALL,walltime=168</code>}}
{{Term|location=fnancy|cmd=<code class="command">oarsub</code> <code>-r "2018-01-01 00:00:00" -t noop -l {"type='disk' and cluster='grimoire'"}/host=2/disk=ALL,walltime=168</code>}}


=== Secondly: reserve the nodes ===
=== Secondly: reserve the nodes ===
You can reserve in the usual way nodes grimoire-1 and grimoire-2 for 3 hours
You can reserve in the usual way nodes grimoire-1 and grimoire-2 for 3 hours:
{{Term|location=fnancy|cmd=<code class="command">oarsub</code> <code>-I -t deploy -l {"host in ('grimoire-1.nancy.grid5000.fr', 'grimoire-2.nancy.grid5000.fr')"}/host=2,walltime=3</code>}}
{{Term|location=fnancy|cmd=<code class="command">oarsub</code> <code>-I -t deploy -l {"host in ('grimoire-1.nancy.grid5000.fr', 'grimoire-2.nancy.grid5000.fr')"}/host=2,walltime=3</code>}}



Revision as of 15:09, 5 May 2017

Disk reservation is available for beta testing on the grimoire cluster in Nancy. Grimoire has eight nodes with five bookable disks on each node.

You can reserve hard disks, in order to store large datasets between your nodes reservations for example (and avoid moving data to nodes at the beginning of each nodes reservations).

How it works

When a job of type deploy starts, the disks you reserved are enabled by the RAID card of the node, and the other disks are disabled. Thus, reserved disks can only be accessed by the user who reserved them.

Main commands

The main commands to reserve disks are given below. Note that disk reservation only works with a node reservation of type deploy. Additionally, by default, reserving a node on grimoire will only grant access to the main disk (additional disks need to be reserved).

The maximum duration of a disk reservation is defined in the Usage Policy.

Reserve disks and nodes at the same time

Reserve a node with its main disk on grimoire cluster:

Terminal.png fnancy:
oarsub -I -t deploy -l {"cluster='grimoire'"}/host=1

Or reserve a node with all its disks:

Terminal.png fnancy:
oarsub -I -t deploy -l {"type='disk' or type='default' and disk_reservation_count > 0"}/host=1

disk_reservation_count is equal to the number of bookable disks on a node. At present, bookable disks are only present on the grimoire cluster.

Reserve nodes grimoire-1 and grimoire-2 with 1 disk per node:

Terminal.png fnancy:
oarsub -I -t deploy -l {"type='default' and host in ('grimoire-1.nancy.grid5000.fr','grimoire-2.nancy.grid5000.fr')"}/host=2+{"type='disk' and host in ('grimoire-1.nancy.grid5000.fr','grimoire-2.nancy.grid5000.fr')"}/host=2/disk=1

Reserve disks and nodes separately

First : reserve the disks

You can decide to reserve some disks for one week, and the corresponding nodes only when you want to carry out an experiment.

Reserve two disks on grimoire-1 for one week, starting on January 1st:

Terminal.png fnancy:
oarsub -r "2018-01-01 00:00:00" -t noop -l {"type='disk' and host='grimoire-1.nancy.grid5000.fr'"}/host=1/disk=2,walltime=168

Specify you want the first two disks of grimoire-2:

Terminal.png fnancy:
oarsub -r "2018-01-01 00:00:00" -t noop -l {"type='disk' and host='grimoire-2.nancy.grid5000.fr' and disk in ('1', '2')"}/host=1/disk=2,walltime=168

Or reserve all disks of two nodes:

Terminal.png fnancy:
oarsub -r "2018-01-01 00:00:00" -t noop -l {"type='disk' and cluster='grimoire'"}/host=2/disk=ALL,walltime=168

Secondly: reserve the nodes

You can reserve in the usual way nodes grimoire-1 and grimoire-2 for 3 hours:

Terminal.png fnancy:
oarsub -I -t deploy -l {"host in ('grimoire-1.nancy.grid5000.fr', 'grimoire-2.nancy.grid5000.fr')"}/host=2,walltime=3

Data loss

Such as for your home directory, your data on the disks will not be backuped by Grid'5000. You must be cautious : several events such as a disk failure or a bad command on the node may delete your data.

Security issues

Unfortunately, it is not possible to avoid a malicious user to take control of the RAID card and therefore of the disks. If you have sensitive data and don't know how to protect them, you may contact the Grid'5000 technical team to help you. It is also your responsibility to erase the data on the disks you reserved, at the end of your experiment.