Raspberry Pi 5 as network storage, music server, and player - PART 4c

4c. INSTALLATION - FORMAT & MOUNT NVME DRIVE

At this point we need to access the pCP operating system via SSH, and for this we need to know the Pi's IP address -

from your desktop computer you can go to your router's administration page in a web browser - and there you can determine the rPi's IP address. Mine was 192.168.1.18

We will log into the Pi using an SSH client application - older versions of Windows don't have this capability built-in, so you need to install PuTTY

On Windows 10/11 you can run SSH from the Command Prompt or Power Shell, on macOS from Terminal. In all cases, run this command to log in -

ssh tc@192.168.1.18  (substitute your Pi's IP address. "tc" is the username for pCP)

Accept the security warning. Enter the password you created earlier.

You should see the piCorePlayer welcome text.  If not, something has gone wrong, so exit the SSH session and try again.

Now we need to know what drives the pCP recognises, so run this command -

sudo fdisk -l

You should see "/dev/mmcblk0" - that's your microSD card and "/dev/nvme0n1" (or similar) that's your NVME drive.  If you can't see the NVME drive it means your NVME adapter is not Raspberry Pi-compliant, and you will need to manually enable the PCIe interface.  Instructions are here -

https://forums.lyrion.org/forum/user-forums/linux-unix/1761501-enable-nvme-hat-on-picoreplayer#post1761541

Now we need to partition and format the NVME drive

sudo fdisk /dev/nvme0n1

n

p

1

<Enter key>

<Enter key>

w

By default the partition type is Linux.

Now we need to format the drive, and we will use the EXT4 format -

sudo mkfs.ext4 /dev/nvme0n1p1

Volume label (optional)

sudo tune2fs -L NVME_1 /dev/nvme0n1p1

Now run this command to reboot -

pcp rb

Now we can now go back to the pCP web interface - http://pcp.local

Go to the "Drives" tab, and under "Pick from the following detected USB disk to mount"

you should now see your NVME drive.

Tick "Enabled", give it a mountpoint - by Linux convention it should be /mnt/nvme0n1p1

but you can use something more simple, such as /mnt/nvme1 if you prefer.

Click "Set USB Mount"

Click "Set Write Permissions"


Now we need to SSH into the Pi for a second time, to create the directories that will hold our music library, and also be shared via Samba on our local network.  So go to Command Prompt / Power Shell / Terminal again, and run this command -

sudo mkdir /mnt/nvme0n1p1/pCP_SHARE

You can choose whatever directory name you prefer, but I chose "pCP_SHARE" since that will become the Samba share name, and I want it to be meaningful when seen from Windows File Explorer.  For example, a network name "SHARE" would give no indication of what network device is involved.

Bear in mind you can use this as a general purpose network share, and copy any/all files onto it across your network.  To that end, I like to have a sub-directory specifically for my music files - so:

sudo mkdir /mnt/nvme0n1p1/pCP_SHARE/pCP_MUSIC

You can now exit the SSH session with this command -

exit

NEXT - 4d. INSTALLATION - CREATE NETWORK SHARE

Comments

Popular posts from this blog

Raspberry Pi 5 as network storage, music server, and player

Raspberry Pi 5 as network storage, music server, and player - PART 2

Raspberry Pi 5 as network storage, music server, and player - PART 3