• sales

    +86-0755-88291180

PCIe TO M.2 (B) Tutorial

Product Introduction

PCIe TO M.2 (A) is a PCI-E to M.2 adapter card used for upgrading hard drives SSD solid-state drive cards, and supports CM4

Characteristic

  • Supports NVMe protocol M.2 interface hard disk protocol, high-speed read and write, high work efficiency
  • Only supports CM4 expansion board
  • Support Raspberry Pi Compute Module 4
  • Compatible with M.2 hard drives of different sizes
  • On board work indicator light, the LED stays on when powered on and flashes during reading and writing, indicating the clear working status at a glance

Instructions for use

Tutorial on mounting a hard drive to CM4

Format Hard Disk

  • Insert the hard drive into the corresponding position of the PCI-E to M.2 adapter card and secure it with the screws in the screw pack.
  • After powering on and starting, perform lspci to check the PCIE device
  • Execute sudo mkfs. ext4/dev/nvme0n1p1 to format the device (mkfs. Then press tab to see many different suffix names, which are the format you want to format)
  • Wait for a moment, when done appears, it means that the formatting has been completed.
    

Mount

    Create mounting directory
    sudo mkdir toshiba
    Mount device
    sudo mount /dev/nvme0n1p1 ./toshiba
    Check disk status
    df -h
    

Mount hard drive

    • Create a new directory as the disk mount point
    sudo mkdir /home/pi/toshiba
    
    • Execute the following command to mount the hard drive
    sudo mount /dev/nvme0n1p1  /home/pi/toshiba
    

    Execute again

    df -h
    

    You can see the hard drive we inserted and related information, indicating that the hard drive has been successfully mounted

    • For different hard drives, their names may vary. Here, nvme0n1p1 is displayed. Please refer to the hard drive you inserted.

literacy test

    • Enter the directory of the mounted disk

      cd /home/pi/toshiba
      
      • free memory
      sudo sh -c "sync && echo 3 > /proc/sys/vm/drop_caches"
      
      • Copy Raspberry Pi Memory Content to Hard Drive (Read)
      sudo dd if=/dev/zero of=./test_write count=2000 bs=1024k


    • Copy hard drive content to Raspberry Pi memory (write)
    •  sudo dd if=./test_write of=/dev/null count=2000 bs=1024k
      • Note: Raspberry pie is more affected by different cards and different environmental testing effects