Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Mounting a M.2 disk in the new Argon M.2 case
#1
Hi,

I have bought a Argon M.2 case. That's the familiar Argon One case, but now with a "bottom half" that can house a M.2 disk.
The M.2 in the bottom has an USB3 port & comes with a connector to connect to the ower USB3 port on the Pi4.

So effectively it is a USB disk & I have tested it with a Win10 machine. This recognises it a such without problems & have formatted it on that as NTFS.

Also, as the bottom half makes the SD card effectively inaccessible without taking it apart, it's better to boot from a USB drive. That works.

The idea is that M.2 drive will hold music files and nothing else.


Code:
sudo fdisk -l

shows that the disk is there as dev/sda. So far, so good!

But I do not see it in the library. I can add it manually through the /etc/fstab, but I am not sure if that is the proper way to go about it in moOde.

Is there another way to get it mounted?

Regards.
Reply
#2
If it's a USB interface internally to the case then Moode should automount the filesystem however the NTFS filesystem on the disk might be your problem. Formatting with FAT32 or exFAT will probably work.

Personally I never think there's much sense in formatting a disk with a Windows filesystem if it's to reside on a Linux computer, it's better to format with a native filesystem such as ext4.
If you want to go down this route the most convenient way to see available disks and their filesystems is to use lsblk.
Run lsblk, assuming the partition you've created on /dev/sda shows up as /dev/sda1 you can format this partition as ext4 with...
Code:
sudo mkfs.ext4 /dev/sda1

To have the OS mount the ext4 filesystem at boot time the most reliable method would be to add an entry to the /etc/fstab file.
If the filesystem is indeed /dev/sda1 you'd be best mounting it to /mnt/SDCARD, anything under this path will be picked up by the library scanner.
In fstab this'd look like;
Code:
/dev/sda1    /mnt/SDCARD     ext4     defaults     0 0

You can edit fstab with a text editor such as nano..
Code:
sudo nano /etc/fstab
When finished in nano save is [Ctrl]+[o] and exit is [Ctrl]+[x]
Reboot and you should see /mnt/SDCARD as a mounted filesystem when running df -h.

I think Moode shares this path as a network/smb share (not used this myself) so you should be able to connect to it from your PC and transfer your music library to the M.2 disk's filesystem over the network.
If you don't see such as share on your network you can connect and transfer files using WinSCP, logging in with the same pi user you use with ssh.
Reply
#3
(09-15-2021, 08:09 PM)vinnn Wrote: There's not much sense in formatting the disk with a Windows filesystem, if it's to reside on a Linux computer format with a native filesystem such as ext4.
The most convenient way to see available disks and their filesystems is to use lsblk.
Run lsblk, assuming the partition you've created on /dev/sda shows up as /dev/sda1 you can format this partition as ext4 with...

Code:
sudo mkfs.ext4 /dev/sda1


To have the OS mount the filesystem at boot time the most common method is to add an entry to the /etc/fstab file.
Assuming the filesystem is /dev/sda1 you're probably best mounting it to /mnt/SDCARD.
In fstab this'd look like;

Code:
/dev/sda1    /mnt/SDCARD     ext4     defaults     0 0

You can edit fstab with a text editor such as nano..

Code:
sudo nano /etc/fstab

When finished in nano save is [Ctrl]+[o] and exit is [Ctrl]+[x]
Reboot and you should see /mnt/SDCARD as a mounted filesystem when running df -h.

Moode shares this path as a network share so you should be able to connect to it from your PC and transfer your music library to the M.2 disk's filesystem over the network.

Thanks Vinn,

I fully agree with you, on the question, why would you use NTFS in a Linux environment?? The reason I'm even considering it, is that I can than pick up the case & plug it in my PC as a USB disk. That is a bit easier, because I have multiple "disks" on my NAS that I need to access. Otherwise I would have to mount all these on the Pi in order to copy from there to the Pi.

Apart from that, it makes no sense whatsoever. Thanks for the pointers. I'm going to try it!

I have not found a way to write to EXT4 from Win10. I have a Linux VM on my PC and that has access to the USB ports. Don't know if a VM in Win could write to an EXT4 formatted drive. But going to try it anyway. Little hope, but one never knows.

Regards,

W.
Reply
#4
I would recommend VFAT (Fat32) instead of NTFS for cross-Windows/Linux use.

As @vinnn mentioned the USB disk should be auto-mounted after it's inserted. It should appear in the /media directory as a sub-directory named after its disk label.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
(09-15-2021, 08:47 PM)Woodroww Wrote: Thanks Vinn,

I fully agree with you, on the question, why would you use NTFS in a Linux environment?? The reason I'm even considering it, is that I can than pick up the case & plug it in my PC as a USB disk. That is a bit easier, because I have multiple "disks" on my NAS that I need to access. Otherwise I would have to mount all these on the Pi in order to copy from there to the Pi.

Apart from that, it makes no sense whatsoever. Thanks for the pointers. I'm going to try it!

I have not found a way to write to EXT4 from Win10. I have a Linux VM on my PC and that has access to the USB ports. Don't know if a VM in Win could write to an EXT4 formatted drive. But going to try it anyway. Little hope, but one never knows.

Regards,

W.

Well no you wouldn't create an ext4 filesystem on Windows, you'd just ssh into the Pi and do it there as shown with just a few short steps.
As Tim's confirmed though, the simplest option for you might be to format as FAT32 and Moode would do the rest automatically.
Reply
#6
Thanks Tim & vinn,

Tried both VFAT and EXT4, created through SSH on the Pi. Creating the partition went fine with a label (M2) and it shows up as /MEDIA/M2.
So it is mounted, but it does not show in the library. I took a fresh install for this and what shows in the Library is SDCARD (where the Stereo test file is), Default Playlist & Favorites.
But not the disk mounted as M2

So the question is, how to get access to it there?

Regards,

W.
Reply
#7
Menu, Update library
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#8
Wink 
(09-15-2021, 10:59 PM)Tim Curtis Wrote: Menu, Update library

If I had only read this an hour ago Blush  I thought about it long and hard, until I dawned on me that with MPD, it is not there until it has been indexed. And it will remain in the library, though the actual file might no longer be on the disk, until it has been re-indexed...

Thanks, Tim. It's there now. Learned a lesson.
Reply


Forum Jump: