Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

It is currently Wed Aug 23, 2017 9:00 am

Discussions on RAM, DRAM, shared memory, NAS, SAN, RAID, backups, SCSI, IDE, UFS, UFS2, JFS, JFS2, EXT2, EXT3

Author Message
Post  Post subject: Linux: Show UUID of filesystem  |  Posted: Fri Feb 28, 2014 6:35 pm

Joined: Tue Aug 04, 2009 9:16 am
Posts: 245


Linux: Show UUID of filesystem

Use "blkid" utility to read filesystem UUIDs.

Mqn blkid:
BLKID(8) System Administration BLKID(8)

blkid - locate/print block device attributes

blkid -L label | -U uuid

blkid [-dghlv] [-c file] [-w file] [-o format]
[-s tag] [-t NAME=value] [device ...]

blkid -p [-O offset] [-S size] [-o format] [-s tag]
[-n list] [-u list] device ...

blkid -i [-o format] [-s tag] device ...

The blkid program is the command-line interface to working with the libblkid(3) library. It can determine the type of content (e.g. filesystem or swap) that a block
device holds, and also attributes (tokens, NAME=value pairs) from the content metadata (e.g. LABEL or UUID fields).

blkid has two main forms of operation: either searching for a device with a specific NAME=value pair, or displaying NAME=value pairs for one or more specified

The size and offset arguments may be followed by binary (2^N) suffixes KiB, MiB, GiB, TiB, PiB and EiB (the "iB" is optional, e.g. "K" has the same meaning as "KiB")
or decimal (10^N) suffixes KB, MB, GB, PB and EB.

-c cachefile
Read from cachefile instead of reading from the default cache file /etc/ If you want to start with a clean cache (i.e. don't report devices previ‐
ously scanned but not necessarily available at this time), specify /dev/null.

-d Don't encode non-printing characters. The non-printing characters are encoded by ^ and M- notation by default. Note that -o udev output format uses a diffrent
encoding and this encoding cannot be disabled.

-g Perform a garbage collection pass on the blkid cache to remove devices which no longer exist.

-h Display a usage message and exit.

-i Display I/O Limits (aka I/O topology) information. The 'export' output format is automatically enabled. This option can be used together with the -p option.

-l Look up only one device that matches the search parameter specified with -t.

-k List all known filesystems and RAIDs and exit.

-t option. If there are multiple devices that match the specified search parameter, then the device with the highest priority is returned, and/or the first
device found at a given priority. Device types in order of decreasing priority are Device Mapper, EVMS, LVM, MD, and finally regular block devices. If this
option is not specified, blkid will print all of the devices that match the search parameter.

-L label
Look up the device that uses this label (equal to: -l -o device -t LABEL=<label>). This lookup method is able to reliably use /dev/disk/by-label udev symâ€

root@debian:~# blkid /dev/sda1                               
/dev/sda1: UUID="f637d6fb-8c42-4d60-97d9-e7c16b441957" TYPE="ext4"

Display posts from previous:  Sort by  
E-mail friendPrint view

Topics related to - "Linux: Show UUID of filesystem"
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. FreeBSD 9 : Remount an already mounted filesystem without unmounting it




Wed Feb 05, 2014 12:16 pm

mandrei99 View the latest post

There are no new unread posts for this topic. FreeBSD: fsck: Could not determine filesystem type




Sat Feb 15, 2014 4:39 pm

mandrei99 View the latest post

There are no new unread posts for this topic. Mdadm - Linux software RAID




Tue Jun 05, 2012 5:31 am

bealee08 View the latest post

There are no new unread posts for this topic. Linux LVM: Create LV(Logical Volume) using all available space in the volume group




Wed Jan 29, 2014 6:57 am

mandrei99 View the latest post


Who is online
Users browsing this forum: No registered users and 0 guests
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list

Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]