Announcement

Collapse
No announcement yet.

How come RAMdisk not visible lsblk -all ?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How come RAMdisk not visible lsblk -all ?


    .
    How come?
    Code:
    df            # shows RAMdisk

    .
    How come RAMdisk not visible with 3 commands?
    Code:
    lsblk -all    # does not show RAMdisk, but  man lsblk  says list RAM disk devices.
    lsblk -I 1    # does not show RAMdisk -I, --include <list> show only devices with specified major numbers
    sudo fdisk -l # does not show RAMdisk

    .
    Code:
    man lsblk     # -a, --all  Also list empty devices and RAM disk devices.

    .
    Code:
    lsblk         # The command prints all block devices (except RAM disks) in a tree-like format by default.

    .
    Made 1 GB RAMdisk:
    Code:
    sudo mkdir /mnt/ramdisk
    sudo mount -t tmpfs -o rw,size=1G tmpfs /mnt/ramdisk

    Verify 1 above RAMdisk:
    Code:
    df -h |grep -i 'ram\|size'  # verify
     
    Filesystem      Size  Used Avail Use% Mounted on
    tmpfs           1.0G  625M  399M  62% /mnt/ramdisk

    Verify 2 above RAMdisk:
    Code:
    df -BG |grep --color=always -i 'sd\|nv\|blocks\|ram' # drive capacity in GB

    Verify 3 above RAMdisk:
    Code:
    mount | tail -n 1            # verify

    Verify 4 above RAMdisk:
    Code:
    time sudo dd if=/dev/zero of=/mnt/ramdisk/zero bs=64k count=10000
      655360000 bytes (655 MB, 625 MiB) copied, 0.119574 s, 5.5 GB/s

    using
    OS: Kubuntu 22.04.1 LTS x86_64
    neofetch --stdout | grep 'OS:'



    How come RAMdisk not visible lsblk -all ?



    --​

    #2
    I can't find a reference to this at the moment, but I seem to recall that util-linux (and therefore fdisk etc) stopped reporting ramdisk as block devices years ago, for whatever reason. So lsblk can't see them.

    Comment


      #3
      Originally posted by claydoh View Post
      I can't find a reference to this at the moment, but I seem to recall that util-linux (and therefore fdisk etc) stopped reporting ramdisk as block devices years ago, for whatever reason. So lsblk can't see them.

      Who is responsible to update
      man lsblk ?


      Code:
      lsblk --version
      lsblk from util-linux 2.37.2


      Code:
      man lsblk
      -a, --all
      Also list empty devices and RAM disk devices.

      Comment


        #4
        Ahhh I missed 22.10

        I don't know. I don't know what has changed in the the current version. Maybe you have found a bug? Or there are extra parameters to pass to view ramdisks that the documentation is not clear about.

        In any case, this is an Ubuntu or util-linux related issue, not specific to Plasma or Kubuntu itself. I don't yet see anyone one else with similar complaints.

        BUT:

        Originally posted by joseph22 View Post
        lsblk from util-linux 2.37.2

        If you are on 22.10, you should have utiil-linux 2.38-4ubuntu1
        If not, this may be the problem. 2.37 is Jammy's, and if you are on Kinetic, you might have something broken here.

        I know that the -a is *supposed* to show all, but this might be dependent on other support being built in to the kernel or something else, but I am not clear on this. My braine hurtz






        Last edited by claydoh; Dec 07, 2022, 01:03 PM.

        Comment


          #5
          .

          Does anyone else have the same problem?

          Code:
          df          # shows ramdisk
          lsblk -all  # does not show ramdisk

          installed 22.10 and updated it.


          Code:
          dpkg -l |grep 'util-linux' |awk '{print $3}'
          2.38-4ubuntu1

          Code:
          lsblk --version
          lsblk from util-linux 2.38

          Code:
          neofetch --stdout | grep 'OS:'
          OS: Kubuntu 22.10 x86_64


          installed 25GB ramdisk1 with 3 commands:

          Code:
          sudo mkdir     /mnt/ramdisk1
          sudo chmod 777 /mnt/ramdisk1
          sudo mount -t tmpfs -o rw,size=25G tmpfs /mnt/ramdisk1


          made 2 files 22GB and 1GB on ramdisk1
          Code:
          time sudo dd if=/dev/zero of=/mnt/ramdisk1/zero22G bs=1M count=22000
          time sudo dd if=/dev/zero of=/mnt/ramdisk1/zero01G bs=1M count=1000

          confirmed ramdisk1
          Code:
          df     |grep -i 'blocks\|ramdisk'
          Filesystem      1K-blocks      Used Available Use% Mounted on
          tmpfs            26214400  23552000   2662400  90% /mnt/ramdisk1


          confirmed ramdisk1 using GB
          Code:
          df -BG |grep --color=always -i 'sd\|nv\|blocks\|ram'
          
          Filesystem     1G-blocks  Used Available Use% Mounted on
          ...
          tmpfs                25G   23G        3G  90% /mnt/ramdisk1



          Code:
          lsblk -all
          does not show ramdisk.

          Code:
          NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
          loop0       7:0    0     4K  1 loop /snap/bare/5
          loop1       7:1    0  63.2M  1 loop /snap/core20/1623
          loop2       7:2    0 238.5M  1 loop /snap/firefox/1969
          loop3       7:3    0 346.3M  1 loop /snap/gnome-3-38-2004/119
          loop4       7:4    0  91.7M  1 loop /snap/gtk-common-themes/1535
          loop5       7:5    0    48M  1 loop /snap/snapd/17336
          loop6       7:6    0     0B  0 loop
          loop7       7:7    0     0B  0 loop
          sda         8:0    0 119.2G  0 disk
          sda1        8:1    0   512M  0 part
          sda2        8:2    0 118.7G  0 part /var/snap/firefox/common/host-hunspell
                                              /
          sdb         8:16   0   1.4T  0 disk
          sdb1        8:17   0   1.4T  0 part /media/x/s1397GB
          sdc         8:32   0   1.8T  0 disk
          sdd         8:48   1  28.9G  0 disk
          sdd1        8:49   1     4G  0 part
          sdd2        8:50   1   4.2M  0 part
          sdd3        8:51   1   300K  0 part
          sdd4        8:52   1  24.9G  0 part /media/x/writable
          sde         8:64   1  29.2G  0 disk
          sde1        8:65   1  29.2G  0 part /media/x/x_FAT_32
          nvme0n1   259:0    0 465.8G  0 disk
          nvme0n1p1 259:1    0   512M  0 part /boot/efi
          nvme0n1p2 259:2    0 465.3G  0 part


          Code:
          man lsblk
          -a, --all
          Disable all built-in filters and
          list all empty devices and
          RAM disk devices too.


          Does anyone else have the same problem?

          Code:
          df          # shows ramdisk
          lsblk -all  # does not show ramdisk

          --​

          Comment


            #6
            I guess that lsblk generally doesn't show tmpfs?
            Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
            Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

            get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
            install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

            Comment

            Working...
            X