How to label a Linux Partition

There are normally two commands to set label for a Linux partition. Both of these commands are from e2fsprogs. Here are examples:

Using e2label to set the label.

# e2label /dev/cciss/c0d3p1 new-ssd

Using tune2fs to set Label.

# tune2fs -L new-ssd /dev/cciss/c0d3p1

Show current partition label
It’s same as above, both commands can do this.

# e2label /dev/cciss/c0d3p1
# tune2fs -l /dev/cciss/c0d3p1

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.