Re: determining lv from mount point

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Montgomery, Kendal L <kendal.montgomery@qwest.com> wrote:

> The df command will already do that.  For instance, on my machine, if I do:
> 
> [klmontg@klmontg klmontg]$ df /opt
> Filesystem           1K-blocks      Used Available Use% Mounted on
> /dev/vg01/opt          4194172   1610880   2583292  39% /opt
> 
> It gives me the filesystem, etc.

Unfortunately, this doesn't help when trying to distinguish between
regular and lvm filesystems.  On my system, / and /boot are on regular
partitions.

bash-2.05b$ df /boot
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1                99134     13828     80187  15% /boot
bash-2.05b$ df /usr
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/Volume00/LV_usr   4031680   2151280   1675600  57% /usr

I'd like to distinguish between these two without hardcoding knowledge
of device or volume names into my script.  One thing I have considered
is doing an ls -l on the device name and checking for the lvm major.
Of course, then I would have to hardcode the lvm major into my script.
I just figured someone must have a better way to do this.

thanks,
galen


_______________________________________________
linux-lvm mailing list
linux-lvm@sistina.com
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux