Adding M.2 SSD to Orange Pi 5 Plus

Orange Pi
Reading Time: 3 minutes



Below article introduced how to start usiing Orange Pi 5 Plus with Ubuntu installed.



This article how to setup M.2 SSD.

I bought this SSD.
Orange Pi 5 Plus supports up to PCIe Gen3 so be careful not to select Gen4.

【楽天市場】SPD製SSD 2TB M.2 2280 PCIe Gen3x4 NVMe R: 3400MB/s W: 3000MB/s 3D NAND TLC SP300-2TNV3【5年保証・翌日配達送料無料】:SPD楽天市場店
SSD 2TB M.2。SPD製SSD 2TB M.2 2280 PCIe Gen3x4 NVMe R: 3400MB/s W: 3000MB/s 3D NAND TLC SP300-2TNV3【5年保証・翌日配達送料無料】



I need screw so I bought this as well.

Litorange M.2ネジキット NVMeネジm.2 SSD取り付けキット…
_



They arrived a few days later.



There is almost no free space between SSD and case.
It may be good to use this kind of case like this article.



I checked tempareture by smartmontools.
53 degree seems bit higher but threshold value is 90 degree so it’s OK.
– Room tempareture: 33 degree

$ sudo smartctl -a /dev/nvme0 | grep Temp
Warning  Comp. Temp. Threshold:     90 Celsius
Critical Comp. Temp. Threshold:     95 Celsius
Temperature:                        42 Celsius
Warning  Comp. Temperature Time:    0
Critical Comp. Temperature Time:    0
Temperature Sensor 1:               42 Celsius
Temperature Sensor 2:               53 Celsius



This SSD is recognzed as /dev/nvme0n1.

$ ls /dev/nvme*
/dev/nvme0  /dev/nvme0n1



I created partition by fdisk/mkfs.ext4.

$ sudo fdisk /nvme0n1

Welcome to fdisk (util-linux 2.37.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xc5f98d9f.

Command (m for help): p
Disk /dev/nvme0n1: 1.86 TiB, 2048408248320 bytes, 4000797360 sectors
Disk model: SPD SP300-2TNV3                         
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc5f98d9f

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 
First sector (2048-4000797359, default 2048): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-4000797359, default 4000797359): 

Created a new partition 1 of type 'Linux' and of size 1.9 TiB.

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

$ sudo mkfs.ext4 /dev/nvme0n1p1 
mke2fs 1.46.5 (30-Dec-2021)
Discarding device blocks: done                            
Creating filesystem with 500099414 4k blocks and 125026304 inodes
Filesystem UUID: 778898e3-0688-4c90-88b1-a8e8c9e24129
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



I successfully created partition.

$ sudo mount /dev/nvme0n1p1 /mnt/

$ mount | grep nvme
/dev/nvme0n1p1 on /mnt type ext4 (rw,relatime)

$ df -h | grep nvme
/dev/nvme0n1p1  1.9T   28K  1.8T   1% /mnt



I added this onto /etc/fstab to automatically recognize after system boot.

# Check UUID
$ ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 15 Jun 20 22:37 1d503487-9341-4440-a0a9-2677d1a862f1 -> ../../mmcblk0p2
lrwxrwxrwx 1 root root 15 Jun 20 22:37 46D0-DBDB -> ../../mmcblk0p1
lrwxrwxrwx 1 root root 15 Jun 21 12:05 778898e3-0688-4c90-88b1-a8e8c9e24129 -> ../../nvme0n1p1

# Adding UUID
$ sudo vim /etc/fstab
(omit)
/dev/disk/by-uuid/778898e3-0688-4c90-88b1-a8e8c9e24129 /media ext4 defaults 0 0

(reboot)

# To assure if this is mounted
$ mount | grep nvme
/dev/nvme0n1p1 on /media type ext4 (rw,relatime)



That’s it.
Very easy, isn’t it?

Conclusion

How was it?

Now 1TB/2TB SSD isn’t expensive than before so we can choose this kind of large volume SSD!

Comments

Copied title and URL