Questions tagged [lsblk]
124 questions
3
votes
1 answer
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 total disk size in bytes?
Because I cannot see…

zomega
- 972
2
votes
1 answer
lsblk doesn't show size on some partitions
(Ubuntu 20.04)
lsblk -f shows:
NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
---
nvme0n1
├─nvme0n1p1 ntfs…

Albert
- 699
0
votes
2 answers
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 physical devices?
Either they're "physical" and…

palmasd1
- 115
- 1
- 9
0
votes
1 answer
lsblk incorrect readonly
Hi I'm trying to detect ro filesystem mainly for root partition
This is portable system using usb as OS disk
The state is readonly, I cannot write anything
touch /tmp
touch: setting times of '/tmp': Read-only file system
lsblk output
lsblk…

wpsd
- 101
0
votes
3 answers
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 8:0 0 745.2G 0 disk
├─sda1 8:1…

Maan
- 21
0
votes
1 answer
How to output only dev names and types in lsblk?
I intend to get a list of all partitions with their corresponding types but arranged in the proper tree order.
This is what I get with lsblk -o NAME,TYPE -i
sda disk
|-sda1 part
|-sda2 part
|-sda3 part
|…

Jones G
- 115
0
votes
1 answer
lsblk -o serial only 8 characters
I like doing lsblk -o type,name,label,partlabel,size,model,serial,wwn,uuid
for the serial option it reports only 8 characters.
I just had two samsung ssd's, one with serial S3TANY0K123456 and another with S3TANY0K654321 and lsblk reports just…

ron
- 6,575
0
votes
2 answers
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) on the website by a traffic light system but the…

realShadow
- 23