09-20-2010 08:25 PM
How can I find the initial size of a filesystem i.e. when it was created. Is there any fsdb or fstyp option for it
Solved! Go to Solution.
09-21-2010 09:02 AM
For example, on one system, below.
The first entry will probably be mkfs, unless you had an older file system that was upgraded. Correspondingly, if you have an older file system there may be no mkfs entry to get this.
I'm not a histlog expert, but the type corresponds to the activity type. The timestamp on the next line seems straightforward. The 3rd line shows the file system disklayout version (7), the size of the intent log (in file system blocks), the file system size at creation time (almost certainly in file system blocks) and the number of 'devices' aka volumes (since VxFS can comprise multiple volumes). To convert from file system blocks, you need to get the block size (i.e., via mkfs -m) and multiply.
As a sanity check, you can look at the resize operations. Each resize entry lists the old size in file sytsem blocks (oblks) and the new size in file system blocks (nblks).
root@test01</>$ echo "histlog" | fsdb -F vxfs /dev/vx/dsk/datadg/exportvset
type 10000 "mkfs"
time 1190939301 821803 (Fri Sep 28 08:28:21 2007 GMT-8)
version 7 logsize 65536 fssize 253403070464 fsndevs 1
type 10007 "resize"
time 1247176021 840885
kernel VxFS 5.0_REV-s_5_0x86A12_sol SunOS 5.10
oblks 247463936 nblks 247463935
devid 0
09-20-2010 10:13 PM
Did you see " mkfs -m <raw_device>" ?
From man pages of mkfs
-m Return the command line which was used to create the
file system. The file system must already exist. This
option provides a means of determining the command
used in constructing the file system.
Not sure of an equivalent fsdb option..
Gaurav
09-20-2010 10:52 PM
Hi,
try this:
echo "histlog" | fsdb -F vxfs /dev/vx/dsk/<dg>/<vol>
09-20-2010 11:26 PM
I am getting old :) ...
09-21-2010 01:41 AM
You can try:
fstyp -v /dev/vx/dsk/<dg>/<vol>
lookout for "ctime" ( creation time ) that means when the filesystem was created.
# fstyp -v /dev/vx/dsk/testdg/testvol
vxfs
magic a501fcf5 version 7 ctime Mon 27 Apr 2009 06:42:05 AM IST
-----output truncated-----
You will observe lot of other details pertaining to file system including file system size in blocks etc...
Regards.
Dev
09-21-2010 06:01 AM
mkfs pm gives me how i can recreate the filesystem based on the currect configuration. What i am looking for is the history on the file system, for example f/s was initially created as say 2 Gb, then expanded by 100 GB and then another 200 GB
09-21-2010 08:17 AM
One more further question, apologize if it is a basic one. Do you know to read the output or is something Symantec can only, for example my output shows
type 10000 "mkfs"
time 1131980899 126952
09-21-2010 09:02 AM
For example, on one system, below.
The first entry will probably be mkfs, unless you had an older file system that was upgraded. Correspondingly, if you have an older file system there may be no mkfs entry to get this.
I'm not a histlog expert, but the type corresponds to the activity type. The timestamp on the next line seems straightforward. The 3rd line shows the file system disklayout version (7), the size of the intent log (in file system blocks), the file system size at creation time (almost certainly in file system blocks) and the number of 'devices' aka volumes (since VxFS can comprise multiple volumes). To convert from file system blocks, you need to get the block size (i.e., via mkfs -m) and multiply.
As a sanity check, you can look at the resize operations. Each resize entry lists the old size in file sytsem blocks (oblks) and the new size in file system blocks (nblks).
root@test01</>$ echo "histlog" | fsdb -F vxfs /dev/vx/dsk/datadg/exportvset
type 10000 "mkfs"
time 1190939301 821803 (Fri Sep 28 08:28:21 2007 GMT-8)
version 7 logsize 65536 fssize 253403070464 fsndevs 1
type 10007 "resize"
time 1247176021 840885
kernel VxFS 5.0_REV-s_5_0x86A12_sol SunOS 5.10
oblks 247463936 nblks 247463935
devid 0
09-21-2010 10:06 AM
you can decode that time via
# echo "0t1131980899=Y" | adb
Gaurav