How do I mount an SSD?

Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu

Which version of system do you use? Khadas official images, self built images, or others?

Khadas image

Please describe your issue below:

Hello all, I added an NVMe to my VIM4. I got the Khadas extender for SSD. I powered up the VIM4 no issues whatsoever. I looked into the /mnt/ and /media/ folders but they are both clean.

How do I mount the NVMe?

Thanks for your help.

Is it a brand-new SSD (unformatted)? If so, you’ll need to partition it first using the linux fdisk command (or others), and then format the partition using ext4… I just went through this yesterday with an SSD that arrived in the mail. Also, what is the brand/model of SSD you’re using? There are issues at this time with many/most SSD’s which are outlined in another thread. I bought a Kingston A2000 SSD and so far so good. It’s I believe the only one that others reported as working ok. I’ve got a Crucial P5 that is not working and I’ve set it aside for the time being.

would you be able to tell me how to do this step by step? I am a noob and learning to do this over SSH. I can’t use the Ubuntu GUI because the VIM4 is a headless media server that I am trying to build for my home.

Hello @gilmotta

It may a known issue of PCIe NVme SSD, please keep eyes on this topic.

You’re going to need some things to be installed more than likely… I’ll give you the cliff-notes version:

  • Install nvme-cli if you haven’t already. (sudo apt-get install nvme-cli)
  • Find the name of the SSD device in your case — “sudo nvme list”. It’s probably named /dev/nvme0n1.
  • use the Linux “fdisk” command (or equivalent) to partition the drive. I’ll let you google that — there are TONS of webpages describing its use. Basically you want to create a partition (or more?) — I create an extra swap partition here in addition to my “data” drive taking up most of my 500Gb SSD. My partition looks like the snippet further down.
  • Once you partition the drive and write the partition table using the “w” command within fdisk, it’s probably a good idea to reboot to let the Kernel be sure it’s all good with the new table — might be optional but I did it.
  • Time to format the drive as ext4 — using the partition name for the drive (e.g. in my case it’s named “/dev/nvme0n1p1”. You can google how to format an ext4 file system. It’s pretty easy and takes only a moment.
  • Update your /etc/fstab to have the new mount points. Mine is shown below as a reference — yours will probably be similar.

You should reboot after doing all this to make sure everything gets mounted properly on boot.

One huge caveat at this point — which is what the post above speaks of. Many many SSD’s right now do not behave well with the VIM4. It’s believed there’s some bug(s) in the kernel code that is keeping most SSDs from working properly without I/O errors. There’s a separate thread here discussing that. As far as we know only the Kingston A2000 appears to work without issue for whatever reason.

Below is what my partition table looks like as dumped by “sudo fdisk -l”:

Device         Boot     Start        End   Sectors  Size Id Type
/dev/nvme0n1p1           2048  950000000 949997953  453G 83 Linux
/dev/nvme0n1p2      950001664 1000215215  50213552 23.9G 82 Linux swap / Solaris

Below is my /etc/fstab at this point — working without issue from my limited testing since I did this yesterday — I only added the last two lines. If you aren’t adding any swap space you can omit the swap line below and obviously the partition above too:

$ more /etc/fstab
# <file system>                              <mount point>   <type>  <options>                                                           
  <dump>  <pass>
tmpfs                                          /tmp            tmpfs   defaults,nosuid                                                   
       0   0
UUID=7664d268-7efa-49fe-8961-efd1a4e36ffe      /               ext4    defaults,noatime,nodiratime,commit=600,errors=remount-ro,x-gvfs-hi
de     0   1
UUID=d6e475fd-f7be-4110-b1bf-aea24f8f3f24      /boot           ext4    defaults,noatime,nodiratime,commit=600,errors=remount-ro,x-gvfs-hi
de     0   1
/dev/nvme0n1p2                                 swap            swap    defaults                                                          
       0   0
/dev/nvme0n1p1                                 /media/data     ext4    defaults,errors=remount-ro                                        
       0   0 

I hope this helps … please keep an eye out for the other thread regarding NVME I/O errors.

4 Likes

This is the other thread being referred to: https://forum.khadas.com/t/khadas-wip-vim4-nvme-io-errors/16572

If you followed the information that @ps23Rick provided and are having problems, you may want to have a look at that.

Привет! Поставил SSD xpg sx8200 pro Khadas vim 4 не включается вообще!
Без диска включается и работает исправно, когда соединяю диск, khadas отключается.
Посоветуйте пожалуйста

What is the wattage of the power supply you have?

12 вольт 3 ампер у меня лабораторный блок питания

I presume the drive works in other devices?

У меня нет других устройств где я мог бы проверить этот диск


Мой диск не поддерживает khadas vim 4
Я подключил на прямую без платы расширения компьютер запустился но не стал работать с моим диском.

Интересно, какие диски поддерживает khadas vim 3?