Create a Block Storage disk, mount it on a TIR Instance, and write a file to it.
Before you begin
Section titled “Before you begin”You need a TIR project in Delhi or Chennai, a role that can create datasets and update instances, and an instance to mount the disk on. If you need one, create an instance first.
Create the disk
Section titled “Create the disk”- In TIR, open your project. In the side menu, under Storage, select Block Storage (Disk Dataset).
- Select Create Dataset. Before the project has its first disk, select Create Storage on the first screen instead.
- Keep the generated Dataset Name or type your own: up to 50 characters, using lowercase letters, numbers, and hyphens, starting and ending with a letter or number. The name becomes the folder the disk appears in on the instance, so choose one you want to read in a path.
- Set Disk Size. It starts at 100 GB. A disk can only grow later, and you pay for every GB you set, so start close to what you need.
- Select Create.
TIR confirms “Dataset <name> created successfully” and opens Next Steps: Using Disk
Storage. Close the panel to see the disk in the list. Its Status reads Pending and then Ready. Wait for Ready before you mount it.
Mount it on an instance
Section titled “Mount it on an instance”A running instance restarts to apply the mount, so save your work first.
- Open your instance’s page and select the Associated Datasets tab.
- Tick your disk and select Update.
- Tick Are you sure you want to continue updating datasets? and select Update again.
When the instance is Running again, the disk shows Mounted on the Associated Datasets tab.
Write a file to it
Section titled “Write a file to it”Open a terminal on the instance, in JupyterLab or over SSH, and write a file to the disk’s folder:
echo "hello" > /datasets/<name>/hello.txtls /datasets/<name>Replace <name> with your disk’s Dataset Name. The folder is read-write, and the file stays on the disk
when you unmount it or delete the instance.
What to do next
Section titled “What to do next”- Put data on a disk covers copying your own files, and data from an Object Storage dataset.
- Increase the size of a disk when the disk fills up.
- Create a disk explains encryption and every field of the form.
For help with a message, see Troubleshooting TIR Block Storage.