LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   How to tell what disk and partition a label points to (http://www.linuxquestions.org/questions/linux-server-73/how-to-tell-what-disk-and-partition-a-label-points-to-709370/)

thllgo 03-05-2009 09:34 AM

How to tell what disk and partition a label points to
 
How do I tell what disk and partition a label points to.

I'm new to using labels, I've always used device names such as /dev/sdb3 or /dev/sda1. I have inherited a new system that uses labels extensively. I have looked at e2label and tune2fs but can't seem to find out how to determine where a label points to.

This new machine has several mounts such as /DATA1 mounting to /DATA1 but have no idea which partition on which disk this is.

Thank you for any help.

healyma 03-05-2009 09:51 AM

Hi,
Are the contents of /dev/disk any use

Mark

thllgo 03-05-2009 10:07 AM

Not really. /dev/disk tells me what devices I have such as /dev/sda9 but it does not relate that device to a label

biggerbug 03-05-2009 10:45 AM

Hi,

You can see to which device a label links to, using this command:
ls -l /dev/disk/by-label/
This directory stores labels of partitions, if any, which are actually links to the real devices (sda1, etc).

cheers.

thllgo 03-05-2009 12:03 PM

You are correct. I was looking in the wrong dir. I was looking in /dev/disk/by-path. DUH. :scratch:

Thank you


All times are GMT -5. The time now is 02:34 AM.