Textual description of firstImageUrl

Examples of CLI detecting filesystem on unmounted Block Device

Examples of CLI detecting filesystem on unmounted Block Device
Examples of CLI detecting filesystem on unmounted Block Device

Below are the examples of Linux command line (CLI) that can be used to detect or identify filesystem on unmounted block devices.

root@vbox1:~# fdisk -l /dev/sdb
Disk /dev/sdb: 20 GiB, 21474836480 bytes, 41943040 sectors
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: dos
Disk identifier: 0x00000000

Device                                Boot Start      End  Sectors Size Id Type
/dev/sdb1 *    16065 41929649 41913585  20G 83 Linux

root@vbox1:~# blkid /dev/sda
/dev/sda: PTUUID="75d4a897" PTTYPE="dos"
root@vbox1:~# blkid /dev/sda1
/dev/sda1: UUID="4146cccc-7d36-4a23-af4c-972161e75220" TYPE="ext2" PARTUUID="75d4a897-01"

root@vbox1:~# file -s /dev/sda1
/dev/sda1: Linux rev 1.0 ext2 filesystem data (mounted or unclean), UUID=4146cccc-7d36-4a23-af4c-972161e75220 (large files)

root@vbox1:~# lsblk -f
NAME                            FSTYPE      LABEL UUID                                   MOUNTPOINT
├─sda1                          ext2              4146cccc-7d36-4a23-af4c-972161e75220   /boot
└─sda5                          LVM2_member       QlTPdH-REeF-ljiz-lx2l-gF60-YQRj-MKeITR
  ├─vbox1--vg-root    ext4              76d0a16c-4b6c-4567-a1cb-cb1aa45ab28c   /
  └─vbox1--vg-swap_1  swap              2f357d2f-172a-41fc-9a26-32b1cc1b17cd   [SWAP]

# echo Hope it helps!
Hope it helps!

Don't be left Behind!
Sign up for daily updates delivered directly to your inbox.
Mandar Pise Opinions expressed by techsutram contributors are their own. More details

Mandar is a seasoned software professional & Fintech, Cloud, IoT, and Blockchain enthusiast. He writes to benefit others from his experiences. His overall goal is to help people learn about Fintech, Cloud, IoT, AI and Blockchain, and the effects they will have economically and socially in the future.

No comments:

Post a Comment

    Your valuable comments are welcome. (Moderated)