lsblk 不显示某些分区的大小

lsblk 不显示某些分区的大小

(乌班图20.04)

lsblk -f显示:

NAME        FSTYPE     LABEL             UUID                                 FSAVAIL FSUSE% MOUNTPOINT
---
nvme0n1                                                                                      
├─nvme0n1p1 ntfs       Recovery          A6F8B146F8B11611                                    
├─nvme0n1p2 vfat                         B6B1-83C2                              62,5M    34% /boot/efi
├─nvme0n1p3                                                                                  
├─nvme0n1p4 ntfs                         EA9CC7CA9CC7900D                       77,9G    60% /media/az/EA9CC7CA9CC7900D
├─nvme0n1p5 ntfs                         8EFE5BB7FE5B9675                                    
├─nvme0n1p6 ext4                         30c2e908-17b9-47a2-b68a-5a0df3f62f8e  513,5G    23% /
└─nvme0n1p7 swap                         7c366bb0-c008-4285-8a67-1acae6e25d2d                [SWAP]

它不显示其中一些分区的大小,例如nvme0n1p1nvme0n1p3nvme0n1p5nvme0n1p7。也许是因为它无法提取该信息。

但获取分区的绝对大小应该始终有效。

所以我尝试了lsblk --output NAME,FSTYPE,LABEL,UUID,FSSIZE,FSAVAIL,FSUSE%,MOUNTPOINT

NAME        FSTYPE     LABEL             UUID                                 FSSIZE FSAVAIL FSUSE% MOUNTPOINT
...
nvme0n1                                                                                             
├─nvme0n1p1 ntfs       Recovery          A6F8B146F8B11611                                           
├─nvme0n1p2 vfat                         B6B1-83C2                               95M   62,5M    34% /boot/efi
├─nvme0n1p3                                                                                         
├─nvme0n1p4 ntfs                         EA9CC7CA9CC7900D                     194,3G   77,9G    60% /media/az/EA9CC7CA9CC7900D
├─nvme0n1p5 ntfs                         8EFE5BB7FE5B9675                                           
├─nvme0n1p6 ext4                         30c2e908-17b9-47a2-b68a-5a0df3f62f8e   714G  513,5G    23% /
└─nvme0n1p7 swap                         7c366bb0-c008-4285-8a67-1acae6e25d2d                       [SWAP]

但它仍然没有表明这一点。为什么?我怎样才能lsblk显示这些信息?

sudo fdisk -l /dev/nvme0n1对比得到信息:

Disk /dev/nvme0n1: 931,53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: Samsung SSD 970 EVO Plus 1TB            
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 4B824D75-DA39-42FF-815F-87DF7ADB2401

Device              Start        End    Sectors   Size Type
/dev/nvme0n1p1       2048     923647     921600   450M Windows recovery environment
/dev/nvme0n1p2     923648    1126399     202752    99M EFI System
/dev/nvme0n1p3    1126400    1159167      32768    16M Microsoft reserved
/dev/nvme0n1p4    1159168  408538890  407379723 194,3G Microsoft basic data
/dev/nvme0n1p5  408539136  409597951    1058816   517M Windows recovery environment
/dev/nvme0n1p6  409597952 1933035519 1523437568 726,4G Linux filesystem
/dev/nvme0n1p7 1933035520 1948659711   15624192   7,5G Linux swap

(顺便说一句,相关问题,因为我正在寻找一个很好的工具来打印有关我所有磁盘的信息:这里,这里

答案1

我刚刚发现:FSSIZE是错误的标志。我需要的只是SIZE相反。

lsblk --output NAME,FSTYPE,LABEL,UUID,SIZE,FSAVAIL,FSUSE%,MOUNTPOINT给出:

NAME        FSTYPE     LABEL             UUID                                   SIZE FSAVAIL FSUSE% MOUNTPOINT
...
nvme0n1                                                                       931,5G                
├─nvme0n1p1 ntfs       Recovery          A6F8B146F8B11611                       450M                
├─nvme0n1p2 vfat                         B6B1-83C2                               99M   62,5M    34% /boot/efi
├─nvme0n1p3                                                                      16M                
├─nvme0n1p4 ntfs                         EA9CC7CA9CC7900D                     194,3G   77,9G    60% /media/az/EA9CC7CA9CC7900D
├─nvme0n1p5 ntfs                         8EFE5BB7FE5B9675                       517M                
├─nvme0n1p6 ext4                         30c2e908-17b9-47a2-b68a-5a0df3f62f8e 726,4G  513,5G    23% /
└─nvme0n1p7 swap                         7c366bb0-c008-4285-8a67-1acae6e25d2d   7,5G                [SWAP]

相关内容