Jetson Orin Nano File System Integrity and Power Loss
Issue Overview
Users of the Nvidia Jetson Orin Nano have reported concerns about the integrity of the device’s file system when frequently disconnecting power without performing a proper shutdown. The Jetson Orin Nano uses an SSD with NVMe protocol and Ext4 file system format for storage. Users find it inconvenient to perform a proper shutdown in their usage scenarios and are worried about the potential risk of file system damage due to abrupt power disconnections. They are seeking solutions to ensure the integrity of the Jetson file system under these conditions.
Possible Causes
-
Improper Shutdown: Directly disconnecting the power cord without performing a proper shutdown can lead to file system corruption. When the system is not shut down gracefully, data that is being written or cached may not be properly saved, leading to inconsistencies in the file system.
-
File System Vulnerability: The Ext4 file system used by the Jetson Orin Nano, while robust, is still susceptible to corruption if power is lost during critical write operations. The file system may not have enough time to ensure data integrity before the power is abruptly cut off.
-
SSD Limitations: Although SSDs are generally more resilient to power loss compared to HDDs due to the absence of mechanical structures, they are not immune to data corruption. Frequent power disconnections can still cause data loss or file system inconsistencies on SSDs.
Troubleshooting Steps, Solutions & Fixes
-
Proper Shutdown Procedure:
- Always perform a proper shutdown of the Jetson Orin Nano before disconnecting the power cord.
- Use the appropriate shutdown command or menu option provided by the operating system to initiate a graceful shutdown.
- Wait for the system to completely power off before removing the power cord.
-
Enable Root File System Redundancy:
- Nvidia provides a feature called rootfs redundancy that can help mitigate the risk of file system corruption.
- Follow the instructions in the Nvidia documentation to enable rootfs redundancy on the Jetson Orin Nano: https://docs.nvidia.com/jetson/archives/r35.3.1/DeveloperGuide/text/SD/RootFileSystem.html#root-file-system-redundancy
-
Tune Linux for Better Data Reliability:
- Refer to the following forum discussion for tips on tuning Linux on the Jetson Nano for improved data reliability in power failure scenarios: https://forums.developer.nvidia.com/t/tuning-linux-on-jetson-nano-for-better-data-reliability-in-power-failure-scenario/252664/5
- Consider implementing the suggested configurations and optimizations to enhance the file system’s resilience to power loss.
-
Use a Read-Only File System (romfs):
- Investigate the possibility of configuring the root file system of the Jetson Orin Nano to use romfs, which simulates a file system in memory.
- A read-only file system can ensure automatic recovery after each power outage since no changes are persisted to the storage device.
- Note that using a read-only file system may limit the ability to make persistent changes to the system.
-
Utilize OverlayFS:
- Explore the use of OverlayFS, which allows for a read-only underlying file system with a writable RAM overlay.
- Changes made to files are stored in the RAM overlay, while the underlying file system remains unmodified.
- Upon power loss or reboot, the RAM overlay is repopulated with the contents of the read-only file system.
- Be aware that implementing OverlayFS on the Jetson platform may require additional configuration and "Jedi trickery."
-
Increase Journal Size:
- Consider increasing the journal size of the file system to allow for more data loss without corruption.
- While this approach may still result in data loss, it can help prevent the need for user intervention to repair the file system.
- Keep in mind that increasing the journal size may impact performance and storage capacity.
-
Separate Storage for Write-Intensive Operations:
- If the Jetson Orin Nano is used for write-intensive tasks, such as continuous video recording, consider using a separate storage device for those operations.
- By dedicating a separate storage device for write-heavy workloads, the risk of file system corruption on the main operating system storage can be minimized.
It is worth accentuating that while these solutions can help mitigate the risk of file system corruption, they may not completely eliminate the possibility of data loss in the event of abrupt power disconnections. The best approach is to perform proper shutdowns whenever possible and have a robust backup strategy in place.