- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to find the date on which pvcreate command...
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
08-17-2008 09:05 PM
08-17-2008 09:05 PM
How to find the date on which pvcreate command ran
Is there is any way to check when the disk was pvcreated and added to the Volume group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2008 10:15 PM
08-17-2008 10:15 PM
Re: How to find the date on which pvcreate command ran
try to find it in /var/adm/syslog/syslog.log
Reagrds
Atul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2008 10:20 PM
08-17-2008 10:20 PM
Re: How to find the date on which pvcreate command ran
run following
ls -lu /usr/sbin/pvcreate /sbin/pvcreate
regds...DK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2008 10:28 PM
08-17-2008 10:28 PM
Re: How to find the date on which pvcreate command ran
You will not get the date when the pvcreated in syslog but on which date u have added the disk to vg that information you will get.search vgextend in syslog.log.
Reagards
Atul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2008 10:37 PM
08-17-2008 10:37 PM
Re: How to find the date on which pvcreate command ran
You will get the idea from /etc/lvmtab bcoz when you will ran the pvcreate and entend the VG then /lvmtab will update.
Regards
Atul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2008 11:00 PM
08-17-2008 11:00 PM
Re: How to find the date on which pvcreate command ran
Whenever you make any changes to a volume group like extending or reducing, a file gets created under /etc/lvmconf. The file will be vgname.conf. So supposing you extended vg02, /etc/lvmconf will have a file called vg02.conf created after you extend the VG. Also, the older file which was created during the previous extension or creation of the VG will be renamed vg02.conf.old. Comparing vg02.conf against v02.conf.old will tell you when a disk was added to VG02. You can use "strings" to read both these files.
Regards,
Vihang.
When everything else fails, read the instructions !!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2008 05:35 AM
08-18-2008 05:35 AM
Re: How to find the date on which pvcreate command ran
# xd -An -j8200 -N16 -tu /dev/dsk/cXtYdZ|perl -lane 'print scalar localtime $F[1];exit'
...will return the 'pvcreate' timestamp.
Simply specify the correct '/dev/dsk/cXtYdZ' in the above.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2008 06:46 AM
08-18-2008 06:46 AM
Re: How to find the date on which pvcreate command ran
grep vgextend /var/adm/syslog/syslog.log
Thanks
SKR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2008 05:52 AM
08-19-2008 05:52 AM
Re: How to find the date on which pvcreate command ran
# echo "0d8200?UY" | adb /dev/dsk/c0t6d0
2008: 2014063___ 2006 Mar 14 10:52:40
You can see it - it was
2006 Mar 14 10:52:40
BTW:
JRF's command will return the timestamp in seconds since 01/01/1970 in the third position.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2008 06:39 AM
08-19-2008 06:39 AM
Re: How to find the date on which pvcreate command ran
> Torsten: JRF's command will return the timestamp in seconds since 01/01/1970 in the third position.
No, you are incorrect. My Perl snippet will return a date based on the Unix epoch (01/01/1970) but the format will be:
# xd -An -j8200 -N16 -tu /dev/dsk/c2t6d0|perl -lane 'print scalar localtime $F[1];exit'
Mon Mar 3 13:48:12 2008
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2008 06:46 AM
08-19-2008 06:46 AM
Re: How to find the date on which pvcreate command ran
;-)
My intention was to highlight the difference between the commands (without the perl extension), because the pure result looks like this:
# xd -j8200 -N16 -tu /dev/rdsk/c0t6d0
0000000 2014063___ 1142329960 2014063___ 1142329961
0000010
The first timestamp is the pvcreation time, the second the vgcreation time.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2008 07:12 AM
08-19-2008 07:12 AM
Re: How to find the date on which pvcreate command ran
> Torsten: My intention was to highlight the difference between the commands (without the perl extension)...
No problem, but note too that I used a different set of switches with 'xd'. Comparing the two on one server of mine:
# xd -An -j8200 -N16 -tu /dev/dsk/c2t6d0
1644472381 1204570092 1644472381 1204570092
# xd -j8200 -N16 -tu /dev/rdsk/c2t6d0
0000000 1644472381 1204570092 1644472381 1204570092
0000010
Hence, for me, the decimal epoch seconds for the PVID is the second (zero-relative) field, or a value of 1204570092.
Thus:
# perl -le 'print scalar localtime(1204570092)'
Mon Mar 3 13:48:12 2008
# echo "0d1204570092=Y"|adb
2008 Mar 3 13:48:12
...so, all is good :-)
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 04:34 AM
08-21-2008 04:34 AM
Re: How to find the date on which pvcreate command ran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 04:48 AM
08-21-2008 04:48 AM
Re: How to find the date on which pvcreate command ran
You perl gem..
hehe