- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- /etc/lvmtab vs. vgdisplay
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2002 12:09 PM
06-10-2002 12:09 PM
Does anyone know how reliable /etc/lvmtab file is? I couldn't find man page for that file. Sometimes, it is necessary for me to know whether a specific vg exists on the system. Currently, I use the following logic:
strings /etc/lvtmab |grep vgname
Maybe, it is better to use vgdisplay vgname and check for the return code?
Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2002 12:13 PM
06-10-2002 12:13 PM
SolutionIt is a very important file and you should always keep a backup of this file. Whenever you create or remove a volume group and add a disk to the VG then this file gets updated. Always do a vgcfgbackup of the volume group which you modify. By default vgcfgbackup is always done when you make some changes to a volume group.
You can always list the contents of /dev
ll /dev/vg* and that will give you the volumegroup that are set in your system. Then you can use the vgdisplay command to display the configuration of the volumegroup.
piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2002 12:13 PM
06-10-2002 12:13 PM
Re: /etc/lvmtab vs. vgdisplay
do a man on "vgscan". You can change the name and then run a vgscan and it will rebuild it:
cd /etc
mv lvmtab orig_lvmtab
vgscan
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2002 12:14 PM
06-10-2002 12:14 PM
Re: /etc/lvmtab vs. vgdisplay
The lvmtab is reliable in most cases, but it is possible to have an entry for a vg that is not activated. I would just do the following
# for i in /dev/vg*
> do
> vgdisplay (-v) $i
> done
Hope this helps
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2002 12:16 PM
06-10-2002 12:16 PM
Re: /etc/lvmtab vs. vgdisplay
vgdisplay -v | grep "VG Name" | sort | uniq
On a correctly running system you can rely on the information in lvmtab... however if I were to disconnect a bunch of disks that make up a VG, then they would still be in lvmtab (and vgdisplay would still report them)
HTH
Duncan
I am an HPE Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2002 12:16 PM
06-10-2002 12:16 PM
Re: /etc/lvmtab vs. vgdisplay
# man vgscan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2002 12:16 PM
06-10-2002 12:16 PM
Re: /etc/lvmtab vs. vgdisplay
You can also check the /etc/fstab to find out or bdf to find out whether the volumegroup is in use or not. Then you can use the vgdisplay to check which disks are included in the volumegroup.
Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2002 12:17 PM
06-10-2002 12:17 PM
Re: /etc/lvmtab vs. vgdisplay
my $0.02
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2002 12:22 PM
06-10-2002 12:22 PM
Re: /etc/lvmtab vs. vgdisplay
So, I would say 'strings /etc/lvmtab |grep vg' is a better way. This is the reason we want to append vg to every volume group name. 'strings lvmtab' may display junk characters sometimes but I have not seen them clobbering the volume group and disk entries.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2002 12:23 PM
06-10-2002 12:23 PM
Re: /etc/lvmtab vs. vgdisplay
ll /dev/vg*
Is that volume groups *don't* have to be in directories called /dev/vg
mkdir /dev/elephant
mknod /dev/elephant/group c 64 0x090000
vgcreate /dev/elephant /dev/dsk/c1t1d0
Would work.
Stick to vgdisplay and lvmtab
HTH
Duncan
I am an HPE Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2002 12:33 PM
06-10-2002 12:33 PM
Re: /etc/lvmtab vs. vgdisplay
/etc/lvmtab is the file which the systems looks at the time of starting to mount acticvate the volume groups and mount them ,this file is created when you doa vgscan too , and is genrally modified whever any vg operations are done.
vgdisplay uses lvmtab to display the inforamtion of volume group , lvmtabb is just used for this and when the vg's are mounted or activated this fiel is not used.
man vgscan
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2002 03:32 PM
06-10-2002 03:32 PM
Re: /etc/lvmtab vs. vgdisplay
vgdisplay -v | grep /dev
to get additional VG info.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2002 08:06 PM
06-10-2002 08:06 PM
Re: /etc/lvmtab vs. vgdisplay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2002 08:49 AM
06-11-2002 08:49 AM
Re: /etc/lvmtab vs. vgdisplay
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2002 09:13 AM
06-11-2002 09:13 AM