How to enlarge the disk space on Xavier?

Hello, anyone can help?

I need to compile the opencv with the support of cuda. But the compiling process consumed all the left disk space of the original SD card on it.

When I tried it with an external usb stick, it failed with the system error: operation not permitted. It seems that compiling process cannot access to the usb filesystem.

So I tried it with another external micro SD card(64G). After the insertion of this sd card on the port, Xavier cannot find it with the command: sudo fdisk -l.

Whats the problem? How to make Xavier know this insertion of sd card.

Many thanks in advance!

When I tried it with an external usb stick, it failed with the system error: operation not permitted. It seems that compiling process cannot access to the usb filesystem.

Are you sure the usb drive is mounted correctly with correct file system?

I think yes. After mounted I could copy files to/from use drive.
With “df -h” I could find it.
I also tried to fill the mount info with a new line in “/etc/fstab”.

The file system was actually fat32. So that was possibly the reason why cmake could not create symlink during the compiling process. I also failed to try other commands like the user change with “chown”. I am not quite familiar with the file system issues. I would appreciate a lot for further help.

I won’t be able to answer everything, but as a general rule I have observed various programs running on Linux which do not recognize fat32 (VFAT) or NTFS partitions (e.g., vlc). If you have an option to format as ext4, then this could simplify your life (or perhaps not…but it is fairly trivial to switch to ext4 if nothing depends on VFAT).

Note also that non-Linux filesystems do not understand many of the Linux permissions. I believe chown though should work if you use sudo, and if the mount is writable.

In many cases you would need to add a VFAT kernel module to use VFAT, but that just depends. Some installs already include this. Sometimes you need to install VFAT user space tools as well.

Note that “fdisk” is an older partitioning tool, and is not intended to work with the newer GPT partitions, but generally speaking fdisk should able to see or list such partitions despite not having the ability to create such partitions. The correct tool to use for this is “gdisk” (e.g., “sudo gdisk -l /dev/mmcblk1” to list the first SD card, mmcblk1, on a dev kit carrier board).

A better tool is to list block devices:

lsblk -f

Note that the “-f” lists UUID and mount point. If you want a specific SD card partition to mount in a particular place automatically, or to be limited to a particular mount point, then the UUID is a good way to do this. If your UUID (as a contrived example, please adjust for your case) is “01234ABCD”, and if you happen to have the mount point “/usr/local/sd”, then this would allow mounting to the correct location with simpler commands than normal, but also not require the device during boot via this line in “/etc/fstab” (also assumes “ext4”, but it could be “vfat”):

# "noauto" means the mount will not occur automatically, but if you issue the
# "sudo mount /usr/local/sd" command, then the mount will work there for that exact
# UUID.
UUID=01234ABCD  /usr/local/sd   ext4   noauto,owner   0 0