# Customize

This section explains how to customize the storage features, such as adding a new partition and mounting the SD card to a specific path.

## File system

EXT4 is an open-source file system that is used on data partitions on the Qualcomm Linux. The EXT4 file system can support volumes with sizes up to 64 ZB, and single files with sizes up to 16 TB with the standard 4 kB block size. For more information on EXT4, see [https://opensource.com/article/17/5/introduction-ext4-filesystem](https://opensource.com/article/17/5/introduction-ext4-filesystem).

An extent is a range of contiguous physical blocks, improving large-file performance and reducing fragmentation. A single extent in EXT4 can map up to 128 MiB of contiguous space with a 4 KB block size. EXT4 does not limit the number of subdirectories in a single directory, except by the inherent size limit of the directory itself.

For example:

> 
> 
> /dev/sda3 on /usr type ext4 (ro,relatime,inlinecrypt)
>     Copy to clipboard

1. To mount `/dev/sda3` to `/data`, use the following commands.

mkdir /home/root/data
        Copy to clipboard

mount -o rw,remount /
        Copy to clipboard

mount -t ext4 /dev/sda3 /home/root/data
        Copy to clipboard
2. Verify whether the `/dev/sda3` partition is mounted.

> 
> 
> df -h
>         Copy to clipboard

    Output:

> 
> 
> …
> Filesystem      Size  Used  Avail  Use%  Mounted on
> /dev/sda3       107G  3.6G   99G   4%    /home/root/data
3. To mount a file system with specific SELinux context options, run the following command.

mount -o rootcontext=system_u:object_r:etc_t:s0 -t ext4 /dev/sda3 /home/root/data
        Copy to clipboard

Note

Run the `mount` command to retrieve the exact `rootcontext=<>` value related to the `/dev/sda3`.

### Mount the SD card to a specific path

SD cards are automounted on card insertion. To manually mount the SD card, run the following commands:

1. Remount the root partition as read or write-enabled.

mount -o rw,remount /
        Copy to clipboard
2. Create an SD card directory.

mkdir sdcard
        Copy to clipboard
3. Locate the default path for the SD card directory.

root@qcs6490-rb3gen2-vision-kit:~# pwd
        Copy to clipboard

    Output:

/home/root *(&lt;– this is the default path)*
4. Mount the SD card to the default path (`/sdcard`).

mount -t vfat /dev/mmcblk1p1 /<default_path>/sdcard
        Copy to clipboard

Note

If the SD card has multiple partitions, repeat step 4 to mount each partition.
5. Verify whether the SD card is mounted.

df -h
        Copy to clipboard

    Output:

…
/dev/mmcblk1p1 7.4G 101M 7.4G 2% /&lt;default\_path&gt;/sdcard

### Format and mount NVMe card

To format and mount the new or existing NVMe cards using <cite>fdisk</cite>, do the following:

1. Create a partition table by running the following command.

fdisk /dev/nvme0n1
        Copy to clipboard

    Output:

Command (m for help): i
No partition is defined yet!
Command (m for help): n
Partition type
p   primary (0 primary, 0 extended, 4 free)
e   extended (container for logical partitions)
Select (default p):  (press enter)
Using default response p.
Partition number (1-4, default 1):  (press enter)
First sector (2048-1953525167, default 2048):  (press enter)
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-1953525167, default 1953525167):
Created a new partition 1 of type ‘Linux’ and of size 931.5 GiB.
Command (m for help): w
The partition table has been altered.
Syncing disks.
[root@lemans](mailto:root&#37;&#52;&#48;lemans):~#
2. Reboot the board.

> 
> 
> Note
> 
> 
> Locate the `mkfs.ext4` binary at `/usr/sbin/mkfs.ext4`.

3. Format the `/dev/nvme0n1p1` partition.

mkfs.ext4 /dev/nvme0n1p1
        Copy to clipboard

    Output:

mke2fs 1.46.5 (30-Dec-2021)
Discarding device blocks: done
Creating filesystem with 244190390 4k blocks and 61054976 inodes
Filesystem UUID: 94ca7f8e-eb27-45ce-84f6-67f0cf977ca8
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848
Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done
4. To mount NVMe partition1 to the media folder, run the following command.

mount /dev/nvme0n1p1 /media
        Copy to clipboard
5. Verify whether the `nvme0n1p1` partition is mounted.

> 
> 
> df -h
>         Copy to clipboard

    Output:

> 
> 
> …
> Filesystem      Size  Used  Avail  Use%  Mounted on
> /dev/nvme0n1p1  458G   28K  435G   1%    /var/rootdirs/media

### PVL memory part information

All Qualcomm SoC UFS components are validated for the preferred vendor list (PVL). Select the applicable part from the [Memory list](https://www.qualcomm.com/products/internet-of-things/industrial/building-enterprise/qcs6490/peripherals).

Last Published: Dec 30, 2024

[Previous Topic
Configure](https://docs.qualcomm.com/bundle/publicresource/80-70017-6/topics/configuration.md) [Next Topic
Debug](https://docs.qualcomm.com/bundle/publicresource/80-70017-6/topics/debug.md)