Expanding Harddrive memory of Nvidia Xavier

Hello ,
I have a basic doubt that the Xavier I have, has a 32gb inbuilt memory. The problem is that even basic libraries like opencv takes up 10gb of the space. Is there any way to increase the memory by attaching an external harddrive, which can then be used as a internal memory to install all libraries?
Thanking you in advance.

I usually just mount an extra drive partition for “/usr/local”, which is the majority of the extra content. This is trivial, and allows boot even if the drive is missing, whereas putting the entire operating system is non-trivial effort, and then the system will require that disk to boot.

Do you have a specific location, e.g., in “/home” or in “/usr/local”, where most of your work goes? If so, then this is trivial to set up. Information for booting directly to an external drive has some limitations, e.g., the bootloader itself will need a driver for that type of drive (consider NVMe versus SATA, and SATA over USB versus a directly attached SATA controller would all need different driver combinations within the bootloader itself).

1 Like

Yes I have a location within home where I have all my work. My basic doubt is that can I connect an extra hard disk and then some how use to as my partition where I can install all my libraries along with different versions of python?
I’m new to all this so it would be really helpful. Thank you again.

Probably the best thing is to test this manually first. To start with, do you have partitions on your disk? These can be added from either the Jetson or a desktop PC. It’ll probably be more convenient to just do these steps directly on the Jetson since you won’t need to move the disk between systems.

To start with, I am assuming this is an ordinary SATA hard drive. This could instead be something like a USB external drive, so be sure to specify what this is. Most steps won’t care, but there can be some special case issues. SATA is the most general use case.

When your system is running, then “lsblk -f” is a really useful way to see what block devices (and partitions) are visible. You can run this at any time to see what is there and where partitions are mounted. Note the “/dev/mmcblk0” and its partitions (append anything to “mmcblk0” and it is a partition of the mmcblk0 drive) are the built in eMMC. You should avoid changing anything on mmcblk0 since this would probably be a mistake requiring flash to fix.

If this is a SATA disk (or perhaps even as a SATA over USB), then the first drive will likely have name “/dev/sda”. The first partition of “sda” would be “sda1”. This is only on the Jetson. On your host PC sda is probably the running system, and you definitely would not want to overwrite or format your running PC. In that case this would probably the second or later disk, e.g., “/dev/sdb” or “/dev/sdc”. Adjust for your case wherever you are working.

“lsblk” is mainly for listing information. Actual partitions are often created with “gdisk”. Any information you find on these tools on the internet will be valid, a Jetson is no different in partitioning than would be a desktop PC. “gdisk” is a bit more manual to use, but can do more. If you see references to “fdisk”, do not use fdisk…this is an older tool which was replaced by gdisk. The difference is that fdisk works with old style BIOS partitions, whereas gdisk works with newer UEFI partition schemes (and this is mostly standard for all newer PCs and for solid state memory/eMMC).

To see all partitions of sda with gdisk you could run “sudo gdisk -l /dev/sda”.

A GUI front end to gdisk which is often convenient is “gparted”. If you don’t have this, then you can use “sudo apt-get install gparted”. An example of viewing sda with this:
sudo gparted /dev/sda

In your case you probably want to create a single partition the size of the entire disk. However, it is still possible you might want to have a separate partition on “/usr/local” and “/home”. For now I will assume just a single large partition. Then that partition gets formatted with “sudo mkfs.ext4 /dev/sda1” (assuming the first partition of sda). Once the format is complete you can use this any way you want, e.g., copying files onto it, mounting it in place of “/home/*” after copying that content onto the partition, so on.

So at this point can we verify if you are doing this directly on the Jetson? Can we verify the type of drive is SATA or something else?

If this is on the Jetson, then you might want to experiment with the gparted GUI tool and create a big partition of the whole disk, and then tell it to format as ext4. Usually you will make changes in setup, e.g., “new partition”, and then set to ext4. Under “edit” you will see “apply all operations” to actually invoke this. Make very sure you are only editing your disk and not something else.

Once you have an ext4 formatted partition we can go from there. If your disk is “/dev/sda”, then you might post the output of “lsblk -f /dev/sda”.

Thanks a lot!! While searching I came across this post → Installing an NVMe SSD on Nvidia Jetson Xavier | Medium . Can you please tell me that would this be good to look into?
Thank you again.

The physical install steps would be good regardless of which software release is installed. The article was written in 2018, and so some of the software steps might differ in newer releases which did not exist back then. I do not have an NVMe to test, and newer kernels may have enabled some of the NVMe items which were not already enabled in earlier releases…don’t know. Regardless, even if software install steps are slightly different now, I would expect the NVMe to work.

Although an NVMe could be slightly more complicated to set up for use versus SATA, this will still be more simple if you are only mounting on “/home” and/or “/usr/local”, versus booting all content from the NVMe. Even if you choose to boot the entire system from NVMe (which I am not certain is possible with this type of drive, but perhaps is) you would still want to test for basic disk function (e.g., seeing it in “lsblk -f”) prior to switching to running entirely on NVMe.

Note: I’d use gparted and not parted (I like the GUI on this).