Clara Holoscan v0.1.0
1.0

Storage Setup (m2 SSD)

Note

If the Clara AGX Developer Kit is reflashed with a new JetPack image, the partition table of the m2 drive will not be modified and the contents of the partition will be retained. In this case the Create Partition steps can be skipped, however the Mount Partition steps should be followed again in order to remount the partition.

Also note that any state, binaries, or docker images that persist on the m2 drive after flashing the system may be made incompatible with new libraries or components that are flashed onto the system. It may be required to recompile or rebuild these persistent objects to restore runtime compatibility with the system.

The Clara AGX Developer Kit includes a pre-installed 250GB m2 solid-state drive (SSD), but this drive is not partitioned or mounted by default. This page outlines the steps that should followed after the initial SDK installation in order to partition and format the drive for use.

Note

The following steps assume that the m2 drive is identified by the Clara AGX Developer Kit as /dev/sda. This is the case if no additional drives have been attached, but if other drives have been attached (such as USB drives) then the disk identifier may change. This can be verified by looking at the symlink to the drive that is created for the m2 hardware address on the system. If the symlink below shows something other than ../../sda, replace all instances of sda in the instruction below with the identifier that is being used by your system:

Copy
Copied!
            

$ ls -l /dev/disk/by-path/platform-14100000.pcie-pci-0001\:01\:00.0-ata-1 lrwxrwxrwx 1 root root 9 Jan 28 12:24 /dev/disk/by-path/platform-14100000.pcie-pci-0001:01:00.0-ata-1 -> ../../sda

  1. Launch fdisk utility:

    Copy
    Copied!
                

    $ sudo fdisk /dev/sda

  2. Create a new primary partition. Use the command ‘n’, then accept the defaults (press enter) for the next 4 questions to create a single partition that uses the entire drive:

    Copy
    Copied!
                

    Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): Using default response p. Partition number (1-4, default 1): First sector (2048-488397167, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-488397167, default 488397167): Created a new partition 1 of type 'Linux' and of size 232.9 GiB.

  3. Write the new partition table and exit. Use the ‘w’ command:

    Copy
    Copied!
                

    Command (m for help): w The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks.

  4. Initialize ext4 filesystem on the new partition:

    Copy
    Copied!
                

    $ sudo mkfs -t ext4 /dev/sda1 mke2fs 1.44.1 (24-Mar-2018) Creating filesystem with 486400 4k blocks and 121680 inodes Filesystem UUID: c3817b9c-eaa9-4423-ad5b-d6bae8aa44ea Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912 Allocating group tables: done Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done

  1. Create a directory for the mount point. These instructions will use the path /media/m2, but any path may be used if preferred.

    Copy
    Copied!
                

    $ sudo mkdir /media/m2

  2. Determine the UUID of the new partition. The UUID will be displayed as a symlink to the /dev/sda1 partition within the /dev/disk/by-uuid directory. For example, the following output shows that the UUID of the /dev/sda1 partition is 4b2bb292-a4d8-4b7e-a8cc-bb799dfeb925:

    Copy
    Copied!
                

    $ ls -l /dev/disk/by-uuid/ | grep sda1 lrwxrwxrwx 1 root root 10 Jan 28 10:05 4b2bb292-a4d8-4b7e-a8cc-bb799dfeb925 -> ../../sda1

  3. Add the fstab entry. Using the mount path and the UUID from the previous steps, add the following line to the end of /etc/fstab:

    Copy
    Copied!
                

    UUID=4b2bb292-a4d8-4b7e-a8cc-bb799dfeb925 /media/m2 ext4 defaults 0 2

  4. Mount the partition. The /etc/fstab entry above will mount the partition automatically at boot time. To instead mount the partition immediately without rebooting, use the mount command (and df to verify the mount):

    Copy
    Copied!
                

    $ sudo mount -a $ df -h /dev/sda1 Filesystem Size Used Avail Use% Mounted on /dev/sda1 229G 5.6M 229G 0% /media/m2

A complete installation of the Clara SDK leaves only about 10GB of storage remaining in the root 32GB filesystem (/dev/mmcblk0p1). When using Docker it is often the case that individual images will be many GB in size, and so this remaining disk space is generally insufficient for the storage needs of Docker images. For this reason it is highly recommended that the Docker daemon data directory be moved to a location on the new m2 partition. This can be done with the following steps:

  1. Create a new Docker data directory. This is where Docker will store all of its data including build cache and container images. These instructions use the path /media/m2/docker-data, but another directory name can be used if preferred:

    Copy
    Copied!
                

    $ sudo mkdir /media/m2/docker-data

  2. Configure the Docker Daemon. Add the following data-root configuration option to the /etc/docker/daemon.json file, pointing to the new data directory created above. Create the /etc/docker/daemon.json file if it does not already exist.

    Copy
    Copied!
                

    { "data-root": "/media/m2/docker-data" }

    Note

    If existing configuration already exists in the daemon.json file, make sure to add a comma to the preceeding line before the data-root configuration, e.g.

    Copy
    Copied!
                

    { ... "default-runtime": "nvidia", "data-root": "/media/m2/docker-data" }

  3. Restart the Docker Daemon.

    Copy
    Copied!
                

    $ sudo systemctl daemon-reload $ sudo systemctl restart docker

© Copyright 2021, NVIDIA Corporation. Last updated on Jun 28, 2023.