Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [lsblk]

The tag has no usage guidance.

1
vote
1answer
24 views

lsblk lists a device, then says “not a device”

I'm seeing somewhat odd behaviour: % lsblk | grep sdb sdb 8:16 1 114.6G 0 disk └─sdb1 8:17 1 114.6G 0 part /run/media/...
2
votes
0answers
41 views

Strange difference of disk size

I have a Google Cloud Instance: When i check the disk space with two different command it show: df -H Filesystem Size Used Avail Use% Mounted on /dev/sda2 11G 3.1G 7.5G 30% / ...
0
votes
2answers
42 views

lsblk - what are the possible values for the column “state”

I am creating an overview site of my hard drives (HDD) I have installed in a machine. That website requests the HDDs including the state through a lsblk command. I want to indicate the status (state) ...
0
votes
1answer
24 views

show volume informations in tabular view

I'm trying to save on linux powershell core 6.1 information about the volumes in a variable. Best in the same or similar format as it is possible on windows. But i am unable to achiev this kind of ...
1
vote
1answer
40 views

What is the deal with this usb drive with a second block device?

I have a giveaway usb stick and when I plug it into my computer and run lsblk it shows two block devices, i.e. sdb and sdc. sdb of them contains almost all the free space ( ~15G) and the sdc one is ...
2
votes
0answers
107 views

Different mount points with df -Th and lsblk

I am wondering why the output of df -Th and lsblk commands showing different mount points for logical volume tmp. Server: RHEL v7.4 [root@mysystem ~]# df -h Filesystem Size ...
11
votes
4answers
2k views

Why does writing random data using dd result in disk partitions?

Prior to running the dd command, the command lsblk returned the output below: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 931.5G 0 disk The ...
0
votes
0answers
109 views

The availability of lsblk on RHEL 5

According to the following solution link https://access.redhat.com/solutions/2063833, there is no lsblk on RHEL 5. Could it be said that there is no solution for lsblk on RHEL 5?
0
votes
2answers
44 views

why we get values in variable that are different

when I want to get the size of sdb size on remote machine - master I get that: # ssh master "lsblk | grep \"^sdb\" | awk '{print \$4}' " 100G but when we want to set the size value in variable ...
0
votes
1answer
69 views

how to create parted disk

the linux ( OS ) installed on sda and machine also have additional disk - sdb sdb 8:16 0 20G 0 disk but we want to add two new partitions as sdb1 and sdb2 as the following: ...
-1
votes
2answers
70 views

Linux + how to capture the OS disk device [closed]

we want to capture the disk device that belong to the OS ( Linux ) since each linux machine have list of disks that are not the OS , we want to capture the disk that belong to the OS so by fdisk ...
0
votes
0answers
50 views

how to check that all other disks except the OS disks are not with partitions

I want to check that all other disks except the OS disks are not with partitions by bash script for example we can see that sdb is with two internal partitions - sdb1 and sdb2 NAME MAJ:...
-2
votes
2answers
47 views

how to find the size of the disk that OS is installed on

how to verify the disk size ( the disk that OS is installed on ) we have redhat 7.2 I will give example # disk_os_size=` lsblk | grep sda ` sda 8:0 0 150G 0 disk ├─sda1 ...
0
votes
0answers
24 views

lsblk output changes after while

I have systems which lots of different LUNs are attached them (OS CentOs 6). this command lsblk helps me alot to find out how LUNs are partitioned and are mounted to which filesystem and information ...
0
votes
2answers
54 views

Can't remove space from beginning of variable

I am trying to crate a folder with the label and uuid of a media device plugged in as its name, on another flash drive which I am using to log. I have the following code: LOGDEVICELABEL=...
1
vote
0answers
46 views

Cannot access mounted partition after using dd

I have used following command to create an image of mounted partition sda1: dd if=/dev/sda1 of=/dev/sdb1 'conv=noerror,sync' where sda1 is the one I want to "backup" and sdb1 is obviously target, ...
0
votes
0answers
55 views

findmnt, mountinfo show non-existent partitions

I noticed findmnt -n -o SOURCE --target MOUNT_POINT was returning lines containing block devices that didn't exist on my system: TARGET SOURCE FSTYPE OPTIONS /home/...
1
vote
2answers
56 views

Replacing same keyword with different strings per line

I'm using the following command to return a list of available disks and whether they're ssd or rotational (basically replacing 0 and 1 in lsblk's output with their actual meaning): lsblk -d -o name,...
0
votes
1answer
212 views

Programmatically identify block device of filesystem [closed]

The following code was tested on RedHat 7 using df verison 8.2 and lsblk version 2.23.2. This is important as the lsblk utility has signficantly more output options than the RedHat 6 version (2.17.2) ...
0
votes
3answers
356 views

Displaying physical block devices

I need to list all block devices installed in my system. There is a command named lsblk to show all block devices. [kni@hist ttyid:0 pią kwi 13 17:56:26 ~]$ lsblk NAME MAJ:MIN RM ...
2
votes
1answer
124 views

Unmount partition mounted at /home and move /home to partition mounted at /

I have two partitions on my Debian machine. One(first) is mounted at root / and the other(second) is mounted at /home(There are two users root and ako in /home/ directory). Now, I want to unmount ...
0
votes
1answer
1k views

lsblk + capture only the disks

I want to capture only the disks from lsblk as showing here fd0 also appears in spite its not really disk for use in this case we can just do lsblk | grep disk | grep -v fd0 but maybe we missed ...
2
votes
1answer
261 views

blkid + print only the disks that are with filesystem

regarding blkid command please help me to approve this assumption can we say that blkid will print all disk devices only if these disks are with filesystem ( by mkfs ) blkid /dev/sda1: UUID="...
2
votes
2answers
3k views

Can i list unmounted drives without fdisk or lsblk?

I have an Inteno dg200 Router running some Iopsys linux version (kernel 3.14 or so, I believe) I've had some trouble getting a fileshare running using the USB ports and my external harddrive. The ...
2
votes
2answers
353 views

lsblk + print only disks that with specific size

I want to print all disks that are equal or more then 18G how to fit the following syntax in order to print only the disks that are => 18G lsblk -l | awk '/disk/' fd0 2:0 1 4K 0 ...
4
votes
3answers
323 views

Do all disks devices in my HW machines start with - sd?

in my bash script I use the syntax lsblk | grep sd in order to capture all disk in my HW machines ( not include flash card or rom ) I just worry that some disk device name will be diff from sd , and ...
5
votes
4answers
274 views

How to capture all disks that don’t have a file system

I want to capture all disks that do not have a filesystem ( all disks that mkfs not runs on them ) I tried the below, but still gives the OS ( sda ). What is the best approach with lsblk or other ...
-4
votes
1answer
46 views

my pendrive display in terminal sdb 8:16 1 14.5gb o disk, con't disply GUI mode and con't read and write [closed]

I used the command lsblk and the system recognized my pendrive as /dev/sdb. The problem is that I can't read or write to it.
1
vote
0answers
4k views

Inaccessible drive with the message: unknown filesystem type '(null)'

Short story: A disk with partitions sdb1-sdb4 and filetype ext4 now shows up as sdb with no file type. While trying to mount sdb I get the messages: mount: /dev/sdb is write-protected, mounting read-...
-2
votes
1answer
241 views

how to print the disks from lsblk in GIGA [closed]

how to print the disks from lsblk in GIGA lsblk -io KNAME,TYPE,SIZE,MODEL dm-0 lvm 50G dm-1 lvm 16G dm-2 lvm 100G sdb disk 1.8T AVAGO sdc disk 1.8T AVAGO sdd disk 1.8T ...
2
votes
1answer
408 views

Why is usb-drive not visible with `lsblk` after having been ejected from Thunar?

If I put a USB-drive in, it will automount. I can see it with lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sdb 8:16 1 7,5G 0 disk └─sdb1 8:17 1 7,5G 0 part /media/user/usb-...
0
votes
1answer
399 views

reconfigure the fstab file with UUID

we have a lot of linux working machines all mount point are configured in the /etc/fstab as the following: /dev/sdc /grd/sdc ext4 defaults,noatime 0 0 /dev/sdd /grd/sdd ext4 defaults,noatime 0 0 /...
2
votes
2answers
2k views

Make lsblk list devices by-id

I'm constantly having the situation where I want to correlate the output of lsblk which prints devices in a tree with their name in the scheme of /dev/sdXY with the drives /dev/disk/by-id/ names.
1
vote
1answer
1k views

lsblk doesn't show anything about root file system

On openSUSE Leap 42.3, lsblk output is like below which doesn't show anything about / i.e. root. Now my question is what about root file system? > lsblk NAME MAJ:MIN RM SIZE RO TYPE ...