Power & Source of Big Ideas

Can't get LVM to work.

Moderators: chensy, FATechsupport

I think I need to upgrade the kernel.

Got the NanoPi NEO-LTS 512M one with the UNO Dock V2.0 for NanoPi NEO and NanoHat OLED for NanoPi NEO/NEO2/NEO Plus2 and a NanoHat PCM5102A for audio.

I got two SSD's on it but 1TB and want them to look like a 2TB. I did this command:

Code: Select all

root@NEO-doc2:~# lvdisplay
  /dev/mapper/control: open failed: No such device
  Failure to communicate with kernel device-mapper driver.
  Check that device-mapper is available in the kernel.
  Incompatible libdevmapper (unknown version) and kernel driver (unknown version).
  --- Logical volume ---
  LV Path                /dev/2-1TB-as-2TB/2TB-SSD
  LV Name                2TB-SSD
  VG Name                2-1TB-as-2TB
  LV UUID                xzqKJC-L4Ux-2bZu-CbMo-Fpi0-DVfA-i0N9uo
  LV Write Access        read/write
  LV Creation host, time NanoPi-NEO, 2021-06-01 06:35:10 -0400
  LV Status              NOT available
  LV Size                1.82 TiB
  Current LE             476917
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto

root@NEO-doc2:~# mount /dev/2-1TB-as-2TB/2TB-SSD /media/2TB-SSD/                mount: special device /dev/2-1TB-as-2TB/2TB-SSD does not exist
root@NEO-doc2:~#


So do I need to upgrade the kernel to get it to work? If so how?

Thank you.

-Raymond Day
The link just show how to install the NanoHat OLED for NanoPi NEO/NEO2/NEO Plus2 and that is working good.

It sees the 2 drives as one big LVM but I can not mount it.

root@NEO-doc2:~# mount /dev/2-1TB-as-2TB/2TB-SSD /media/2TB-SSD/
mount: special device /dev/2-1TB-as-2TB/2TB-SSD does not exist
root@NEO-doc2:~#

I did a do-release-upgrade but it ends with this:

Code: Select all

Not enough free disk space

The upgrade has aborted. The upgrade needs a total of 49.5 M free
space on disk '/boot'. Please free at least an additional 15.2 M of
disk space on '/boot'. You can remove old kernels using 'sudo apt
autoremove' and you could also set COMPRESS=xz in
/etc/initramfs-tools/initramfs.conf to reduce the size of your
initramfs
.

I put the SD card in Gparted on another PC and made the boot bigger and it still boots but looks like it did not see the bigger size. The /boot is in fat16.partiton.

-Raymond Day
Been trying to resize the /boot fat16 partition. It says it's 16.4kB but the system only see it as 7.2M. I used Gparted on anther system to resize it. But when I boot it don't use that size.

Here is some text from the command line.

Code: Select all

root@NEO-doc2:~# parted /boot
Warning: Unable to open /boot read-write (Is a directory).  /boot has been
opened read-only.
Warning: Unable to open /boot read-write (Is a directory).  /boot has been
opened read-only.
GNU Parted 3.2
Using /boot
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Error: /boot: unrecognised disk label
Model:  (file)
Disk /boot: 16.4kB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
(parted) quit
root@NEO-doc2:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            238M     0  238M   0% /dev
tmpfs            50M  5.0M   45M  11% /run
/dev/mmcblk0p2  104G  2.6G  101G   3% /
tmpfs           249M     0  249M   0% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           249M     0  249M   0% /sys/fs/cgroup
/dev/mmcblk0p1   40M  7.2M   33M  18% /boot
tmpfs            50M     0   50M   0% /run/user/0
tmpfs            50M     0   50M   0% /run/user/1000
root@NEO-doc2:~#


Guess there is some file telling it was size it is and have to edit that but not sure.

I can't upgrade it because this /boot partition is to small.

-Raymond Day
Wow got it upgraded from:

Ubuntu Linux 16.04.7 to
Ubuntu Linux 18.04.5

I had to umount /dev/mmcblk0p1 the /boot partition.

Took about 4 hours or more and it rebooted fast and I did the mount of the LVM and I still get the same error!

It looks like this:

Code: Select all

login as: root
root@neo-doc2's password:
 _____     _                _ _       _____ _     _____ ____
|  ___| __(_) ___ _ __   __| | |_   _| ____| |   | ____/ ___|
| |_ | '__| |/ _ \ '_ \ / _` | | | | |  _| | |   |  _|| |
|  _|| |  | |  __/ | | | (_| | | |_| | |___| |___| |__| |___
|_|  |_|  |_|\___|_| |_|\__,_|_|\__, |_____|_____|_____\____|
                                |___/

Welcome to Ubuntu 18.04.5 LTS 4.11.2
System load:   0.59             Up time:       8 min            Local users:   2
Memory usage:  26 % of 497Mb    IP:            192.168.86.36
CPU temp:      31°C
Usage of /:    3% of 104G

 * Documentation: http://wiki.friendlyarm.com/Ubuntu
 * Forum: http://www.friendlyarm.com/Forum/

Last login: Tue Jun  8 18:09:44 2021 from 192.168.86.95
root@NEO-doc2:~# mount /dev/2-1TB-as-2TB/2TB-SSD /media/2TB-SSD/
mount: /media/2TB-SSD: special device /dev/2-1TB-as-2TB/2TB-SSD does not exist.
root@NEO-doc2:~#


Don't get why the command still don't mount the LVM just says does not exist. Best guess is I have to edit some boot file that it could not touch because I unmounted it and that was the only way to upgrade it.

-Raymond Day
Raymond Day wrote:
The link just show how to install the NanoHat OLED for NanoPi NEO/NEO2/NEO Plus2 and that is working good.


This is the only hw specific function that might not work, but it works. Everything else is classes better, LVM must work. If not, rebuilding is easy.

Who is online

In total there are 6 users online :: 0 registered, 0 hidden and 6 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 6 guests