Questions tagged [lsblk]
The lsblk tag has no summary.
134 questions
0
votes
1
answer
68
views
Exclude non hotplug from lsblk output
I use the following command to show my hotplug devices:
lsblk --paths --output NAME,MODEL,TRAN,FSUSE%,UUID,HOTPLUG --exclude 7
To get the following rendering:
NAME MODEL ...
3
votes
2
answers
476
views
How can I use lsblk to display all devices except my root/main "sda" device where my root filesystem is "/"?
I use LUKS (so my system is encrypted) and LVM.
I don’t want sda displayed because that’s where my root filesystem lives, and it’s my root device. The solution should also work for systems without ...
1
vote
2
answers
92
views
The ambiguous principles that guide the lsblk utility in removing duplicates of displayed records
Linux Mint 20.3
lsblk -V
lsblk from util-linux 2.34
Let's find an explanation for the ambiguous behavior of the lsblk utility applied with the -E option.
Here is the output without applying the -E ...
2
votes
1
answer
98
views
lsblk can see all drives attached but udev only shows half of them. Conflicting indentifiers?
I'm trying to make a zfs pool on a terramaster D8 Hybrid DAS connected via USB with 4x HDD and 4x NVME drives using this guide. When i try to build the get the drive ids to build the zpool, not all of ...
2
votes
1
answer
131
views
fstab, mountpoint - what did I miss?
I can't figure out what I'm missing or done wrong.
lsblk dose not show the mount points(?)
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 1.8T 0 disk
└─sda1 8:1 ...
0
votes
1
answer
105
views
Extending rootfs on centos
so I can see in lsblk that I have a 250G disk, but when I run pvresize /dev/sda3 I am not able to see the free space to extend the volume group.
Do I need to modify the partition table in single user ...
0
votes
2
answers
270
views
Why the output of lsblk have almost the same lines?
lsblk -d -o NAME,SIZE,TYPE | grep disk
show me the such things
sda 894.3G disk
sdb 894.3G disk
sdc 3.7T disk
sdd 3.7T disk
nbd0 64G disk
Are the sda and sdc have sdb and sdd similarly ...
0
votes
0
answers
382
views
How to check how much space is available on block device disk (e.g not used on partition)
I have multiple block devices: e.g sda (sda1, sda2 & sda3).
sda3 is further divided into LVMs which all has a X amount of space on them. However, I want to be able to list how much space is ...
-1
votes
1
answer
267
views
What are these empty 0B SIZE read-write loop devices?
What are these empty (0B SIZE) read-write loop devices?
sudo lsblk --all
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 0B 0 loop
loop1 7:1 0 0B 0 loop
loop2 7:2 ...
0
votes
1
answer
135
views
Return the root partition name with lsblk or similar when the partition is encrypted
This is my lsblk output:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 465.8G 0 disk
├─nvme0n1p1 259:1 0 512M 0 part /efi
├─nvme0n1p2 259:2 0 420G 0 ...
1
vote
0
answers
1k
views
'lsblk' is not displaying the GPT partition label after formatting the disk
My lsblk is not showing gpt partition label for one disk partition, which was freshly formatted with
mkfs.ext4 -v -L MyLabel mydev
somehow the partition was not labeled properly afterwards. I didn't ...
0
votes
1
answer
2k
views
What is `nvme0n1p2` in `lsblk` command output? [duplicate]
In my Ubuntu 23.04 system, running lsblk gives the following output:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 4K 1 loop /snap/bare/5
loop1 7:1 0 55.6M ...
0
votes
2
answers
2k
views
What is the issue with lsblk command in some server display full details and it is not other
What is the issue with lsblk command in some servers displaying full details and it is not others?
Examples:
Server 1
~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda ...
3
votes
1
answer
1k
views
How does lsblk obtain sector size?
My disk is sda. There is the size file /sys/dev/block/8:0/size. Its unit is sectors. When I run strace lsblk I can see it reading this file.
But how does lsblk get the sector size to later show the ...
0
votes
2
answers
1k
views
How do I find out what is the hard disk for OS in Linux
in our bash scripts , we have many places in the code that need to capture only the disk that related to OS ( operation linux/RHEL system )
we are using Linux versions as 7.2/7.5/7.6/7.9 , and on most ...
0
votes
0
answers
201
views
Why are uuid and ptuuid different for different commands
I get the following results for the 3 commands blkid, lsblk and sfdisk on an Arch Linux system
$ lsblk --json -p -b -o+PTUUID,UUID /dev/sda1
{
"blockdevices": [
{
"...
1
vote
4
answers
1k
views
How can I get the lsblk-devices that are NOT in use
root@pve-virt-01:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 250G 0 disk
├─sda1 8:1 0 1007K 0 part
├─sda2 8:2 ...
5
votes
3
answers
645
views
bash + how to compare arg to one of the disks in linux machine
I can capture the disk devices of my Linux machine with the following command:
lsblk -lnb | numfmt --to=iec --field=4 | grep disk | awk '{print $1}'
sda
sdb
sdc
sdd
In my bash script I used the line ...
0
votes
0
answers
278
views
How does it possible two hardware RAIDs in lsblk but one - in lspci?
lspci output:
Slot: 02:00.0
Class: RAID bus controller
Vendor: LSI Logic / Symbios Logic
Device: MegaRAID SAS 2208 [Thunderbolt]
SVendor: Dell
SDevice: PERC H710P Mini (for ...
1
vote
0
answers
490
views
How to get path of hardware RAID array in lsblk?
I detect list of hardware arrays by next command:
lspci -vmm | sed -E -n '/RAID bus|SCSI controller/,/^ *$/p' | tr -d '\t'
Example:
Class:RAID bus controller
Vendor:Broadcom / LSI
Device:MegaRAID SAS ...
1
vote
0
answers
34
views
Size discrepancy between df -h output and lsblk output [duplicate]
When I run df -h and lsblk, on my Ubuntu 20.04.3 LTS Oracle Cloud instance, there is a discrepancy between sizes of my /dev/sda1 mount. I am not sure if this has to do with GiB vs GB or something else....
1
vote
2
answers
1k
views
'dd' command disk copy retains old size
I recently upgraded my home server and wanted to increase my cloud disk to 2TB from 600gb. After some research I found the dd command which can fully copy a disk, which in my case seemed like a good ...
-2
votes
1
answer
1k
views
linux + from lsblk partitions size are greater then disk size
I get the following details from RHEL 7.2 machine , sda DISK is using LVM
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 250G 0 disk
├─sda1 8:1 0 500M 0 part /boot
├─sda2 8:2 0 199.5G 0 part
│...
0
votes
0
answers
339
views
Drive not connecting after power outage
I have a raspberry pi with two external hard drives. the electricity went off today and after that i couldn't enter the rpi. what i ended up doing was to remove the flash card and enter it in another ...
5
votes
2
answers
9k
views
Can't see mounted drive under lsblk, blkid or mount
I have mounted an external hard drive via /etc/fstab with the following entry:
UUID=a8286fc9-5b08-41d9-8c4e-cb993a8976d1 /home/bu/safe-heaven-2/ ext4 defaults 0
I can read/write from this disk but I ...