Anda di halaman 1dari 29

VERITAS File System (VxFS) Year 2000 Compliance Test Plan

1 Purpose This document details the test plan for Year 2000 compliant releases and all subsequent releases of the VERITAS File System (VxFS) as of June 30, 1998.

2 Overview Since VxFS 3.X has been released on both HP and Sun, this document encompasses both the HP-UX and Solaris platforms. Table 1 describes the exact versions of VxFS to be tested across the various versions of these operating systems. VERITAS asserts that these are the only versions of existing VxFS products that are Year 2000 compliant. All future releases of VxFS products will also be certified by VERITAS as Year 2000 compliant. The table uses "Y2K" to denote which versions of VxFS operate on which versions of HP-UX and Solaris in addition to which versions of VxFS are Year 2000 compliant.

Table 1: VxFS Release Version Coverage Platform HP-UX VxFS 3.0 3.1 3.2.5 3.2.6 3.3 3.3.1 10.20 Y2K 1 Y2K 2 Y2K 3 Y2K Y2K Y2K Y2K Y2K Y2K Y2K Y2K 11.0 Solaris 2.5.1 2.6

1 2

Additional Y2K testing was done by HP. VxFS 3.1 was released on HP-UX 10.20 as a component of VERITAS Storage Edition 1.0. Due to the non-compliant version of Elan License Manager used when it was released, this release of VxFS 3.1 cannot be considered fully Year 2000 compliant. The Y2K compliant version of VxFS 3.1 is available as part of the VERITAS Storage Edition 1.0.1. VxFS 3.1 was released as JFS on HP-UX 11.0 by HP. A subset of Y2K tests was run by VERITAS. Additional Y2K testing was done by HP.

VxFS follows the standard UNIX model of expressing time as the number of seconds since 00:00:00 (i.e. 12:00 AM) January 1st, 1970 (EST). This model does not have any special representational problems at or around the Year 2000, although problems may surface in the Year 2038, a problem which is beyond the scope of this document. Note: The VxFS utility fsdb expresses dates stored internally to VxFS as the number of seconds and microseconds since 12:00 AM January 1, 1970 (EST). To make the dates in the tests described in this document easier to interpret, fsdb has been modified to convert these dates to the format of the date just mentioned. This change will be made for the versions of VxFS given in Table 1. In all cases, VxFS uses explicit, unambiguous date representation. VxFS performs date validation and verification and prevents non-compliant dates from being entered via user interfaces.

2.1 Standard Library Functions The code was audited to find places where dates are expressed using month, day, and year to look for potential problems. Such code can be found by searching for the standard library functions used to retrieve times or dates, or to transform time between the two methods of representation. These functions are:
ctime(), asctime(), localtime(), gmtime(), tzset(), tzsetwall() strftime(), cftime(), ascftime() strptime() getdate() mktime() gettimeofday(), settimeofday() ftime() gethrtime(), gethrvtime() wcsftime() time() times()

2.2 VxFS Commands Auditing of the code shows that the following commands are the only utilities in VxFS that use these functions to manipulate or store dates and/or time: fsck fsclone fsdb fstyp

labelit mkfs vxdump vxquota vxrepquota vxrestore Of these, the following VxFS utilities only use of standard time/date library functions is to print out the date using a printf-type function. These utilities will not be explicitly tested. fsclone fsdb fstyp quot vxquot vxrestore The remaining VxFS utilities will be tested due to the use of the following standard library functions: ff - time() fsadm - time() fsck - gettimeofday(), time() labelit - cftime(), ctime() mkfs - gettimeofday() vxdump - ctime(), localtime(), time() vxquota - gettimeofday() vxrepquota - gettimeofday() Additionally, the following utilities will be tested due to the fact that a date or number of days could be specified in its argument list: ff ( -adays, -cdays, -mdays) fsadm ( -adays) vxdump ( -Tdate) vxedquota ( -t) The following VxFS utilities will not be explicitly tested since they do not interact with any of the standard time/date library functions: df extendfs fscat getext mount ncheck newfs quotacheck setext volcopy vxlicense

vxquotaon vxquotaoff vxtunefs vxupgrade vxzip

2.3 VxFS Kernel The fields that VxFS uses to store dates internally will be tested. These fields are:
di_atime (on-disk inode access time) di_ctime (on-disk inode status change time) di_mtime (on-disk inode modification/creation time) fs_ctime (file system creation time) fs_time (file system last write time) fsh_time (fset last modification time) fsh_ctime (fset creation time -- N/A Disk Layout 1 and 2) fsh_mtime (fset rw mount time -- N/A Disk Layout 1 and 2) olt_time (last olt modification time -- N/A Disk Layout 1) qr_btime (time remaining over block slimit -- N/A Disk Layout qr_itime (time remaining over inode slimit -- N/A Disk Layout

1) 1)

These times and dates are stored as the number of seconds and microseconds since UTC - 00:00:00 on January 1, 1970. Hence they are not really dates at all but quantities. In application they are added to UTC to produce the accurate date and time relative to UTC (and possibly the local time zone). VERITAS will only test this basic principle to demonstrate that internally VxFS does not contain any Year 2000 related problems.

2.4 Packaging & Installation Installation and deinstallation across the key dates will be done on each platform. On Solaris, this will be done using pkgadd, pkgrm, and pkginfo. On HP, the SD-UX utilities will be used. This will be done to verify that the installation and deinstallation processes for VxFS point products and VxFS as a component of an Edition Suite operate correctly and successfully before, on and after the Year 2000.

2.5 Licensing Older versions of VxFS use the Elan License Manager (ELM) version 2.1 to handle licensing of features from the VxFS Advanced Feature Set. Elan (now Rainbow Technologies) has reported that this version of ELM is not Year 2000 compliant. Rainbow has produced a new version of ELM, Rainbow Sentinel LM 5.0.6, which is Year 2000 compliant. This new licensing software will be integrated with the versions of VxFS in this document, where applicable. The licensing tests (done in fsadm.sh) will be performed with this new version. Note: Rainbow Sentinel LM 5.0.6 will not allow any license keys to be generated which have an expiration date past the year 2016. A future license manager software release will be provided to

VERITAS

before

2016

which

will

extend

this

restriction

out

to

some

further

date.

3 Implementation 3.1 Test Dates VERITAS will conduct all of the tests described within this document with the time set to before, during, and after the following Key Date and Key Date Changes: Dec 31, 1998 to Jan 01, 1999 Sep 09, 1999 to Sep 10, 1999 Dec 31, 1999 to Jan 01, 2000 Feb 28, 2000 to Feb 29, 2000 Feb 29, 2000 to Mar 01, 2000 Dec 31, 2000 to Jan 01, 2001 Dec 31, 2008 to Jan 01, 2009 Dec 31, 2037 to Jan 01, 2038 Note: HP-UX does not allow any dates to be set beyond Dec 31, 2037. Because of this, the final Key Date Change (12/31/37 to 1/1/38) will not be tested on HP-UX.

3.2 Automated Tests A new set of fsqa test scripts will be added to the fsqa test suite. The scripts and a description of each are given below: fsqa/common/tests/y2k fsqa/common/tests/y2k/Makefile fsqa/common/tests/y2k/run.sh fsqa/common/tests/y2k/mkfs.sh fsqa/common/tests/y2k/kernel.sh fsqa/common/tests/y2k/ff.sh fsqa/common/tests/y2k/fsadm.sh fsqa/common/tests/y2k/fsck.sh fsqa/common/tests/y2k/labelit.sh fsqa/common/tests/y2k/vxdump.sh fsqa/common/tests/y2k/vxquota.sh # Y2K top level test directory # Y2K top level test makefile # Y2K top level run script # Y2K mkfs tests # Y2K kernel time modification tests # Y2K ff tests # Y2K fsadm tests # Y2K fsck tests # Y2K labelit tests # Y2K vxdump tests # Y2K vxquota/vxrepquota tests

The following test script descriptions assume the following setup: 3 logical volumes or disk slices with corresponding mount points. /dev/rdsk/c0t1d0s4, /mnt0 /dev/rdsk/c0t1d0s5, /mnt1 /dev/rdsk/c0t1d0s6, /mnt2

Note: This document will use disk slices in the examples, but the tests will also be run with both VxVM on Solaris and LVM on HP-UX. The desired version of VxFS installed complete with the Advanced Feature Set Note: On HP-UX, JFS lite (VxFS) and JFS Advanced (VxFS Advanced) offer disjoint features, which will be tested. Note: VxFS 3.0 on HP-UX 10.20 was released by HP as JFS. Only a subset of these tests was run by VERITAS. Additional testing was done by HP. Note: VxFS 3.1 on HP-UX 11.0 was released by HP as JFS. Only a subset of these tests was run by VERITAS. Additional testing was done by HP. The VxFS fsqa test suite installed and built on the system to be tested. Note: The fsqa test suite has no impact on the functionality of VxFS. Each test script will be repeated for all applicable VxFS disk layouts. The supported VxFS disk layout versions per platform are described in Table 2.

Table 2: Supported VxFS Disk Layout Versions Platform HP-UX VxFS 3.1 3.2.X 3.3.X 2, 3, 4 10.20 2, 3 1, 2, 4 1, 2, 4 1, 2, 4 1, 2, 4 11.0 2.5.1 Solaris 2.6

Additionally, it should be noted that each of the test scripts will repeat the tests outlined for each of the key dates given in the list of Test Dates. Anytime the phrase "Key Date Change" is used, it is referring to a change across these dates. Anytime the phrase "Key Date" is used, it is referring to the first date in the date pairs listed (ie: the "Key Date" in "Dec 31, 1999 to Jan 01, 2000" would be "Dec 31, 1999"). The UNIX user command date mmddhhmmccyy is used to set the date in all cases where a date or time change is specified.

3.2.1 mkfs.sh When initializing an inode, mkfs will modify the access time ( di_atime ), creation/modification time

( di_mtime), and status change time ( di_ctime) for the on-disk inode structure in the super block. This applies to inodes 2 (root) and 3 (lost+found) and other structural files not visible in the file system namespace. Additionally, mkfs will set the file system modification time ( fs_time ), file system creation time (fs_ctime), file set header modification time (fsh_time), and OLT modification time (olt_time) to the current time/date in various on-disk file system data structures. These tests will mainly check that mkfs succeeds before, during, and after the Key Date Changes.

Test 1: Make a file system before Key Date Change 1. Set date to Key Date. 2. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 3. Check the di_mtime, di_atime, and di_ctime for inode 2 (root) using echo "8192B.2i" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time See that all three time fields are the same. 4. Check the di_mtime, di_atime, and di_ctime for inode 3 (lost+found) using echo "8192B.3i" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time See that all three time fields are the same. 5. Check the fs_ctime and fs_time using echo "8192B.p S" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time Check that these two fields are identical and set to the creation time and date of the file system. 6. Check the fsh_time, fsh_ctime, and fsh_mtime using echo "999fset" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time Check that these three fields are identical and set to the creation time and date of the file system. Note: fsh_ctime and fsh_mtime do not exist in Version 1 and 2 disk layouts. 7. Grab the offset for the OLT using olt=`echo "8192B.p S" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep oltext | awk '{print $2}'` Note: This field does not exist in Version 1 disk layout. 8. Check the olt_time using echo "8192B.${olt}b.p oltext" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time Check that this field is set to the creation time of the file system. 9. Finally, mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0

Test 2: Make a file system after Key Date Change 1. 2. 3. 4. Set date to Key Date. Key Date Change. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Check the di_mtime, di_atime, and di_ctime for inode 2 (root) using echo "8192B.2i" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time See that all three time fields are the same. 5. Check the di_mtime, di_atime, and di_ctime for inode 3 (lost+found) using echo "8192B.3i" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time See that all three time fields are the same. 6. Check the fs_ctime and fs_time using echo "8192B.p S" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time

Check that these two fields are identical and set to the creation time and date of the file system. 7. Check the fsh_time, fsh_ctime, and fsh_mtime using echo "999fset" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time Check that these three fields are identical and set to the creation time and date of the file system. Note: fsh_ctime and fsh_mtime do not exist in Version 1 and 2 disk layouts. 8. Grab the offset for the OLT using olt=`echo "8192B.p S" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep oltext | awk '{print $2}'` Note: This field does not exist in Version 1 disk layout. 9. Check the olt_time using echo "8192B.${olt}b.p oltext" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time Check that this field is set to the creation time of the file system. 10. Finally, mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0

Test 3: Make a file system during Key Date Change 1. Set date to Key Date. 2. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 during Key Date Change. 3. Check the di_mtime, di_atime, and di_ctime for inode 2 (root) using echo "8192B.2i" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time See that all three time fields are the same. 4. Check the di_mtime, di_atime, and di_ctime for inode 3 (lost+found) using echo "8192B.3i" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time See that all three time fields are the same. 5. Check the fs_ctime and fs_time using echo "8192B.p S" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time Check that these two fields are identical and set to the creation time and date of the file system. 6. Check the fsh_time, fsh_ctime, and fsh_mtime using echo "999fset" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time Check that these three fields are identical and set to the creation time and date of the file system. Note: fsh_ctime and fsh_mtime do not exist in Version 1 and 2 disk layouts. 7. Grab the offset for the OLT using olt=`echo "8192B.p S" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep oltext | awk '{print $2}'` Note: This field does not exist in Version 1 disk layout. 8. Check the olt_time using echo "8192B.${olt}b.p oltext" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time Check that this field is set to the creation time of the file system. 9. Finally, mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0

3.2.2 kernel.sh To track whether VxFS is correctly representing dates internally, perform various miscellaneous tests. These tests should cover the internal VxFS fields listed in the VxFS Kernel section. Note that the fset creation time ( fsh_ctime ), fset last modification time ( fsh_time ), fset read/write mount time ( fsh_mtime), and OLT last modification time ( olt_time) tests will be covered in the mkfs testing. The testing for fsh_mtime will also be covered in the fsck testing with clones.

Test 1: Test for di_mtime, di_atime, and di_ctime 1. 2. 3. 4. 5. 6. 7. 8. Set date to 10 days before Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Create a file using touch /mnt0/foo, which sets the di_atime, di_ctime, and di_mtime to the current time. Get the inode number for "foo" using inum=`ls -li /mnt0 | grep foo | awk '{print $1}'` Set date to Key Date. Key Date Change. Check the file modification/creation time (di_mtime) field for "foo" using echo "8192B.${inum}i" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep mtime Note the time for 'mtime'. To change "foo"'s modification time (di_mtime), use echo "foofoofoo" /mnt0/foo Recheck the file modification/creation time (di_mtime) field for "foo" using echo "8192B.${inum}i" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep mtime Note the time for 'mtime'. See that it has changed from before. Check the file access (di_atime) field for "foo" using echo "8192B.${inum}i" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep atime Note the time for 'atime'. To change "foo"'s access time (di_atime), use cat /mnt0/foo Recheck the file access time (di_atime) field for "foo" using echo "8192B.${inum}i" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep atime Note the time for 'atime'. See that it has changed from before. Check the file status change (di_ctime) field for "foo" using echo "8192B.${inum}i" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep ctime Note the time for 'ctime'. To change "foo"'s status change time (di_ctime), use chmod 777 /mnt0/foo Recheck the file status change (di_ctime) field for "foo" using echo "8192B.${inum}i" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep ctime Note the time for 'ctime'. See that it has changed from before. Reexamine the output of ls to check that the times/dates are represented correctly, using ls -l /mnt0 | grep foo

9. 10.

11.

12. 13.

14.

15. 16.

17.

Test 2: Test for fs_ctime and fs_time before Key Date Change 1. Set date to Key Date. 2. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 3. Check the file system modification time (fs_time) and file system creation time (fs_ctime) using echo "8192B.p S" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time Check that these two fields are identical and set to the creation time and date of the file system. 4. Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 5. Create a file using touch /mnt0/foo 6. Flush the change to disk using sync; sync; sync This will update the file system modification time (fs_time). 7. Check the file system modification time (fs_time) using

echo "8192B.p S" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time Check that the fs_time field was updated and is different from fs_ctime.

Test 3: Test for fs_ctime and fs_time after Key Date Change 1. 2. 3. 4. Set date to Key Date. Key Date Change. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Check the file system modification time (fs_time) and file system creation time (fs_ctime) using echo "8192B.p S" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time Check that these two fields are identical and set to the creation time and date of the file system. Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Create a file using touch /mnt0/foo Flush the change to disk using sync; sync; sync This will update the file system modification time (fs_time). Check the file system modification time (fs_time) using echo "8192B.p S" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time Check that the fs_time field was updated and is different from fs_ctime.

5. 6. 7. 8.

Test 4: Test for fs_ctime and fs_time during Key Date Change 1. Set date to Key Date. 2. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 3. Check the file system modification time (fs_time) and file system creation time (fs_ctime) using echo "8192B.p S" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time Check that these two fields are identical and set to the creation time and date of the file system. 4. Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 5. Create a file using touch /mnt0/foo during Key Date Change. 6. Flush the change to disk using sync; sync; sync This will update the file system modification time (fs_time). 7. Check the file system modification time (fs_time) using echo "8192B.p S" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time Check that the fs_time field was updated and is different from fs_ctime.

Test 5: Test for qr_btime and qr_itime before Key Date Change Set date to Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs -oquota /dev/dsk/c0t1d0s4 /mnt0 Create a testuser using useradd -u10000 -s/bin/ksh testuser Make the new file system belong to the user by doing chown testuser /mnt0 /mnt0/* Set the quota time limits using vxedquota -t. Set the block quota time limit to be 5 days and the file quota time limit to 4 days. 7. Get the inode number for the on-disk quota record using ino=`echo "999fset" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep fsh_uquotino | cut -d"fsh_uquotino " -f2` 1. 2. 3. 4. 5. 6.

8. Check the on-disk block quota time limit (qr_btime) and on-disk file quota time limit (qr_itime) using echo "1fset.${ino}i.a0.p Q" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 Look to see that btime is 5 days (432000 seconds) and itime is 4 days (345600 seconds).

Test 6: Test for qr_btime and qr_itime after Key Date Change Set date to Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs -oquota /dev/dsk/c0t1d0s4 /mnt0 Create a testuser using useradd -u10000 -s/bin/ksh testuser Make the new file system belong to the user by doing chown testuser /mnt0 /mnt0/* Key Date Change. Set the quota time limits using vxedquota -t. Set the block quota time limit to be 5 days and the file quota time limit to 4 days. 8. Get the inode number for the on-disk quota record using ino=`echo "999fset" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep fsh_uquotino | cut -d"fsh_uquotino " -f2` 9. Check the on-disk block quota time limit (qr_btime) and on-disk file quota time limit (qr_itime) using echo "1fset.${ino}i.a0.p Q" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 Look to see that btime is 5 days (432000 seconds) and itime is 4 days (345600 seconds). 1. 2. 3. 4. 5. 6. 7.

Test 7: Test for qr_btime and qr_itime during Key Date Change Set date to Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs -oquota /dev/dsk/c0t1d0s4 /mnt0 Create a testuser using useradd -u10000 -s/bin/ksh testuser Make the new file system belong to the user by doing chown testuser /mnt0 /mnt0/* Set the quota time limits using vxedquota -t. Set the block quota time limit to be 5 days and the file quota time limit to 4 days. 7. Get the inode number for the on-disk quota record using ino=`echo "999fset" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep fsh_uquotino | cut -d"fsh_uquotino " -f2` 8. Key Date Change. 9. Check the on-disk block quota time limit (qr_btime) and on-disk file quota time limit (qr_itime) using echo "1fset.${ino}i.a0.p Q" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 Look to see that btime is 5 days (432000 seconds) and itime is 4 days (345600 seconds). 1. 2. 3. 4. 5. 6.

3.2.3 ff.sh Test the options for the number of days since file access (-adays), file creation or modification (-mdays), and file status change (-cdays), to ensure that ff lists the correct file names and inode information for a VxFS file system.

Test 1: Run ff before and after Key Date Change while varying number of days for file modification Set date to several weeks before the Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 cd /mnt0 Create a number of files using touch a b c d. Unmount and then remount /mnt0. Set date to Key Date. Modify some of the files to change the mtime using echo "XYZZY" a b Create a couple of new files to change the mtime using touch e f Unmount and then remount /mnt0. Run ff -Fvxfs -mdays /dev/rdsk/c0t1d0s4, varying days. Check to see that the output shows only the files modified and created within days days. 12. Key Date Change. 13. Run ff -Fvxfs -mdays /dev/rdsk/c0t1d0s4, varying days. Check to see that the output shows only the files modified and created within days days. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11.

Test 2: Run ff before and after Key Date Change while varying number of days for file access 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Set date to several weeks before the Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 cd /mnt0 Create a number of files using touch a b c d. Add some data to a file using echo "Stuff" a Unmount and then remount /mnt0. Set date to Key Date. Access some of the files to change atime using more a Unmount and then remount /mnt0. Run ff -Fvxfs -adays /dev/rdsk/c0t1d0s4, varying days. Check to see that the output shows only the files accessed within days. 12. Key Date Change. 13. Run ff -Fvxfs -adays /dev/rdsk/c0t1d0s4, varying days. Check to see that the output shows only the files accessed within days.

Test 3: Run ff before and after Key Date Change while varying number of days for file status change 1. 2. 3. 4. 5. 6. 7. Set date to several weeks before the Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 cd /mnt0 Create a number of files using touch a b c d. Add some data to a file using echo "Stuff" a Unmount and then remount /mnt0.

8. 9. 10. 11.

Set date to Key Date. Change the file status to change the ctime using chmod 777 b c Unmount and then remount /mnt0. Run ff -Fvxfs -cdays /dev/rdsk/c0t1d0s4, varying days. Check to see that the output shows only the files with changed status. 12. Key Date Change. 13. Run ff -Fvxfs -cdays /dev/rdsk/c0t1d0s4, varying days. Check to see that the output shows only the files with changed status.

3.2.4 fsadm.sh The purpose of this test script is twofold. The fsadm -adays option, which changes the default number of days for files to be considered aged, must be tested. The other reason to test fsadm is to demonstrate that some features from the Advanced Feature Set (Online Adv JFS on HP, for example) operate successfully with respect to any Year 2000 issues. To accomplish this, fsadm file extent reorganization will be tested.

Test 1: extent reorg after Key Date Change 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. Set date to several weeks before the Key Date. Create a small file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 2048 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 cd /mnt0 Create 1000 1K files using touch and setext -r 1 -fchgsize filename Remove every other (alternate) file to create a fragmented file system. Get an extent fragmentation report using fsadm -E /mnt0 Set date to Key Date. Key Date Change. Run fsadm -e /mnt0 to perform extent reorganization. Get a second extent fragmentation report using fsadm -E /mnt0 Compare the two reports to see that some extent reorganization was done.

Test 2: extent reorg during Key Date Change 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Set date to several weeks before the Key Date. Create a small file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 2048 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 cd /mnt0 Create 1000 1K files using touch and setext -r 1 -fchgsize filename Remove every other (alternate) file to create a fragmented file system. Get an extent fragmentation report using fsadm -E /mnt0 Set date to Key Date. Run fsadm -e /mnt0 during Key Date Change to perform extent reorganization. Get a second extent fragmentation report using fsadm -E /mnt0 Compare the two reports to see that some extent reorganization was done.

Test 3: extent reorg before Key Date Change 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. Set date to several weeks before the Key Date. Create a small file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 2048 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 cd /mnt0 Create 1000 1K files using touch and setext -r 1 -fchgsize filename Remove every other (alternate) file to create a fragmented file system. Get an extent fragmentation report using fsadm -E /mnt0 Run fsadm -e /mnt0 to perform extent reorganization. Set date to Key Date. Key Date Change Get a second extent fragmentation report using fsadm -E /mnt0 Compare the two reports to see that some extent reorganization was done.

agedfiles tests: extent reorg while varying number of days for reorg of files while crossing Key Date Change 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. Set date to Key Date. Create a small file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 2048 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 cd /mnt0 Create 1000 1K files using touch and setext -r 1 -fchgsize filename Remove every seventh file to create a fragmented file system. Key Date Change. Run fsadm -e -adays /mnt0 to perform an extent reorganization. Remove every seventh file to create a fragmented file system again. Change the value of days. Run fsadm -e -adays /mnt0 to perform an extent reorganization. Repeat 8.-10. four more times. Check that the file system was reorg'd.

3.2.5 fsck.sh During fsck if the on-disk inode for the log is rebuilt then the time() function is called to reset and di_mtime to the current time.

di_atime, di_ctime,

Additionally, if the file system is marked DIRTY and we are about to do a full fsck, the fsh_mtime for the clone(s) are updated to notify clone users that the clone may be bad.

Test 1: Do a full fsck before Key Date Change 1. Set date to before Key Date. 2. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4

3. Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 4. Get the inode number for the log using ino=`echo "olt" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep olt_logino | cut -d[ -f2 | awk '{print $1}'` 5. Check the di_mtime, di_atime, and di_ctime fields for the log using echo "1fset.${ino}i" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time Note the time for all three. 6. Change the link count of the log to cause fsck to rebuild the inode using echo "1fset.${ino}i.ln=7" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 7. Set date to Key Date. 8. Run a full fsck using fsck -Fvxfs -ofull -y /dev/rdsk/c0t1d0s4 9. To check that it ran successfully, mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 10. Check the di_mtime, di_atime, and di_ctime fields for the log using echo "1fset.${ino}i" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time See that all three fields have been updated.

Test 2: Do a full fsck during Key Date Change 1. 2. 3. 4. Set date to Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Get the inode number for the log using ino=`echo "olt" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep olt_logino | cut -d[ -f2 | awk '{print $1}'` Check the di_mtime, di_atime, and di_ctime fields for the log using echo "1fset.${ino}i" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time Note the time for all three. Change the link count of the log to cause fsck to rebuild the inode using echo "1fset.${ino}i.ln=7" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 Run a full fsck using fsck -Fvxfs -ofull -y /dev/rdsk/c0t1d0s4 during Key Date Change. To check that it ran successfully, mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Check the di_mtime, di_atime, and di_ctime fields for the log using echo "1fset.${ino}i" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time See that all three fields have been updated.

5.

6. 7. 8. 9.

Test 3: Do a full fsck after Key Date Change 1. 2. 3. 4. Set date to Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Get the inode number for the log using ino=`echo "olt" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep olt_logino | cut -d[ -f2 | awk '{print $1}'` 5. Check the di_mtime, di_atime, and di_ctime fields for the log using echo "1fset.${ino}i" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time

Note the time for all three. 6. Change the link count of the log to cause fsck to rebuild the inode using echo "1fset.${ino}i.ln=7 | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 7. Key Date Change. 8. Run a full fsck using fsck -Fvxfs -ofull -y /dev/rdsk/c0t1d0s4 9. To check that it ran successfully, mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 10. Check the di_mtime, di_atime, and di_ctime fields for the log using echo "1fset.${ino}i" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time See that all three fields have been updated.

Test 4: Do a full fsck with clones to check the clone last modification time change ( fsh_mtime) before Key Date Change 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. Set date to Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Create a directory using mkdir /mnt0/foo Create a file system clone using fsclone -r create clone1 /mnt0 Create a file using touch /mnt0/foo/bar Now unmount the file system using umount /mnt0 Mark the file system dirty using echo "8192B.+333B.+0B=0xc0" | fsdb /dev/rdsk/c0t1d0s4 Get the inode number for the directory "/foo" using ino=`ff -Fvxfs /dev/rdsk/c0t1d0s4 2&1 | grep foo | awk '{print $2}'` Set the mode field in the inode representing the directory "/foo" to an invalid mode value using echo "8192B.${ino}i.md=0888" | fsdb /dev/rdsk/c0t1d0s4 Save the current fsh_mtime in the clone fset using echo "1000 fset" | fsdb /dev/rdsk/c0t1d0s4 | grep fsh_mtime Run fsck to clean the fs and update the clone mtime, using fsck -Fvxfs -ofull -y /dev/rdsk/c0t1d0s4 Extract the new fsh_mtime for the clone fset using echo "1000 fset" | fsdb /dev/rdsk/c0t1d0s4 | grep fsh_mtime See that it has been updated.

Test 5: Do a full fsck with clones to check the clone last modification time change ( fsh_mtime) during Key Date Change 1. 2. 3. 4. 5. Set date to Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Create a directory using mkdir /mnt0/foo Create a file system clone using fsclone -r create clone1 /mnt0 6. Create a file using touch /mnt0/foo/bar 7. Now unmount the file system using umount /mnt0

8. Mark the file system dirty using echo "8192B.+333B.+0B=0xc0" | fsdb /dev/rdsk/c0t1d0s4 9. Get the inode number for the directory "/foo" using ino=`ff -Fvxfs /dev/rdsk/c0t1d0s4 2&1 | grep foo | awk '{print $2}'` 10. Set the mode field in the inode representing the directory "/foo" to an invalid mode value using echo "8192B.${ino}i.md=0888" | fsdb /dev/rdsk/c0t1d0s4 11. Save the current fsh_mtime in the clone fset using echo "1000 fset" | fsdb /dev/rdsk/c0t1d0s4 | grep fsh_mtime 12. Run fsck during the Key Date Change to clean the fs and update the clone mtime, using fsck -Fvxfs -ofull -y /dev/rdsk/c0t1d0s4 13. Extract the new fsh_mtime for the clone fset using echo "1000 fset" | fsdb /dev/rdsk/c0t1d0s4 | grep fsh_mtime See that it has been updated.

Test 6: Do a full fsck with clones to check the clone last modification time change (fsh_mtime) after Key Date Change 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. Set date to Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Create a directory using mkdir /mnt0/foo Create a file system clone using fsclone -r create clone1 /mnt0 Create a file using touch /mnt0/foo/bar Now unmount the file system using umount /mnt0 Mark the file system dirty using echo "8192B.+333B.+0B=0xc0" | fsdb /dev/rdsk/c0t1d0s4 Get the inode number for the directory "/foo" using ino=`ff -Fvxfs /dev/rdsk/c0t1d0s4 2&1 | grep foo | awk '{print $2}'` Set the mode field in the inode representing the directory "/foo" to an invalid mode value using echo "8192B.${ino}i.md=0888" | fsdb /dev/rdsk/c0t1d0s4 Save the current fsh_mtime in the clone fset using echo "1000 fset" | fsdb /dev/rdsk/c0t1d0s4 | grep fsh_mtime Key Date Change. Run fsck to clean the fs and update the clone mtime, using fsck -Fvxfs -ofull -y /dev/rdsk/c0t1d0s4 Extract the new fsh_mtime for the clone fset using echo "1000 fset" | fsdb /dev/rdsk/c0t1d0s4 | grep fsh_mtime See that it has been updated.

3.2.6 labelit.sh Test labelit to ensure that that when it writes the label to an unmounted VxFS file system, it displays the correct value for fs_time, which it grabs from the super block. When labeling a tape device, labelit also grabs the v_time from the tape header. This occurs if labelit is being used in conjunction with volcopy. This will not be tested.

Note: Support for the labelit utility was dropped as of VxFS 3.3. Since labelit is not shipped with VxFS 3.3.X, it was not tested for these versions.

Test 1: Perform basic functionality before Key Date Change 1. Set date to Key Date. 2. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 3. Check fs_time using echo "8192B.p S" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time 4. Label the unmounted file system using labelit -Fvxfs /dev/rdsk/c0t1d0s4 /mnt0 vxtest Note the "Date last modified". 5. Check that this time is equal to the fs_time.

Test 2: Perform basic functionality during Key Date Change 1. Set date to Key Date. 2. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 3. Check fs_time using echo "8192B.p S" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time 4. Label the unmounted file system using labelit -Fvxfs /dev/rdsk/c0t1d0s4 /mnt0 vxtest during Key Date Change. Note the "Date last modified". 5. Check that this time is equal to the fs_time.

Test 3: Perform basic functionality after Key Date Change 1. Set date to after the Key Date. 2. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 3. Check fs_time using echo "8192B.p S" | fsdb -Fvxfs /dev/rdsk/c0t1d0s4 | grep time 4. Label the unmounted file system using labelit -Fvxfs /dev/rdsk/c0t1d0s4 /mnt0 vxtest Note the "Date last modified". 5. Check that this time is equal to the fs_time.

3.2.7 vxdump.sh Test vxdump, which reads and writes the dates stored in the /etc/dumpdates file for VxFS file systems, for both full and incremental dumps, and data consistency. To accomplish this, vxdump will be used extensively before, during and after the Key Dates. Also, vxdump -Tdate will be tested to ensure that all of the Key Dates are interpreted and represented correctly. Date validation and verification will be checked to ensure that non-compliant dates are

prevented from being entered. For the purposes of vxdump a non-compliant date will be defined as a two-digit date (ie: 99, 01, etc.). Note: Because of bug unrelated to Y2K, when vxdump -Tdate gets a 2-digit year in its date argument it ignores the entire -Tdate argument and continues processing as if it had never been entered. The desired behavior would be to have vxdump exit with an error message. This bug has been fixed in VxFS 3.0, 3.1, 3.2.5, and 3.3 to exhibit the desired behavior. This is not a Year 2000 bug but an improvement in the expected behavior. Note: Because of a bug unrelated to Y2K, when vxdump -T date was used, vxrestore would fail to restore from these dumps. vxrestore has been fixed to allow restores from dumps that were created using the -Tdate option. Additionally, since the -Tdate option implies an incremental dump, vxdump has been fixed to disallow the -Tdate option with zero-level (full) dumps. Both of these fixes have been made in VxFS 3.0, 3.1, 3.2.5, and 3.3. This is not a Year 2000 bug. For the vxdump tests, we first set up a depot for dump files and other miscellaneous info:

1. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s6 2. Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s6 /mnt2

Test 1: full, incremental dumps and restores before and after Key Date Change 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. Set date to Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Copy some files to /mnt0 (eg: cp /bin/t* /mnt0) Do a full dump using vxdump 0uf /mnt2/y2k.1 /mnt0 Add a file to /mnt0 via touch /mnt0/foo Add some data to "foo" using echo "XYZZY" /mnt0/foo Do an incremental dump using vxdump 1uf /mnt2/y2k.2 /mnt0 Key Date Change Add a file to /mnt0 via touch /mnt0/bar Add some data to "bar" using echo "More Stuff" /mnt0/bar Do an incremental dump using vxdump 2uf /mnt2/y2k.3 /mnt0 Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s5 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s5 /mnt1 cd /mnt1 Do a full restore using vxrestore rf /mnt2/y2k.1 Do an incremental restore using vxrestore rf /mnt2/y2k.2 Check for the file "foo". Check for data consistency by using diff /mnt0/foo /mnt1/foo Do an incremental restore using vxrestore rf /mnt2/y2k.3 Check for the file "bar". Check for data consistency by using diff /mnt0/bar /mnt1/bar Compare the contents of the restored file system with the original file system using dircmp -d /mnt0 /mnt1

Test 2: full, incremental dumps and restores after Key Date Change 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. Set date to Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Copy some files to /mnt0 (eg: cp /bin/t* /mnt0) Key Date Change Do a full dump using vxdump 0uf /mnt2/y2k.1 /mnt0 Add a file to /mnt0 via touch /mnt0/foo Add some data to "foo" using echo "XYZZY" /mnt0/foo Do an incremental dump using vxdump 1uf /mnt2/y2k.2 /mnt0 Add a file to /mnt0 via touch /mnt0/bar Add some data to "bar" using echo "More Stuff" /mnt0/bar Do an incremental dump using vxdump 2uf /mnt2/y2k.3 /mnt0 Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s5 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s5 /mnt1 cd /mnt1 Do a full restore using vxrestore rf /mnt2/y2k.1 Do an incremental restore using vxrestore rf /mnt2/y2k.2 Check for file "foo". Check for data consistency by using diff /mnt0/foo /mnt1/foo Do an incremental restore using vxrestore rf /mnt2/y2k.3 Check for file "bar". Check for data consistency by using diff /mnt0/bar /mnt1/bar Compare the contents of the restored file system with the original file system using dircmp -d /mnt0 /mnt1

Test 3: full, incremental dumps, full restore before Key Date Change, incremental restores after 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. Set date to Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Copy some files to /mnt0 (eg: cp /bin/t* /mnt0) Do a full dump using vxdump 0uf /mnt2/y2k.1 /mnt0 Add a file to /mnt0 via touch /mnt0/foo Add some data to "foo" using echo "XYZZY" /mnt0/foo Do an incremental dump using vxdump 1uf /mnt2/y2k.2 /mnt0 Add a file to /mnt0 via touch /mnt0/bar Add some data to "bar" using echo "More Stuff" /mnt0/bar Do an incremental dump using vxdump 2uf /mnt2/y2k.3 /mnt0 Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s5 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s5 /mnt1 cd /mnt1 Do a full restore using vxrestore rf /mnt2/y2k.1 Key Date Change Do an incremental restore using vxrestore rf /mnt2/y2k.2 Check for file "foo". Check for data consistency by using diff /mnt0/foo /mnt1/foo

20. 21. 22. 23.

Do an incremental restore using vxrestore rf /mnt2/y2k.3 Check for file "bar". Check for data consistency by using diff /mnt0/bar /mnt1/bar Compare the contents of the restored file system with the original file system using dircmp -d /mnt0 /mnt1

Test 4: full dump across Key Date Change 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. Set date to Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Copy a lot of files to /mnt0 (eg: cp /bin/* /mnt0) Do a full dump using vxdump 0uf /mnt2/y2k.1 /mnt0 during Key Date Change Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s5 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s5 /mnt1 cd /mnt1 Do a full restore using vxrestore rf /mnt2/y2k.1 Compare the contents of the restored file system with the original file system using dircmp -d /mnt0 /mnt1

Test 5: incremental dump across Key Date Change 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. Set date to Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Copy a lot of files to /mnt0 (eg: cp /bin/* /mnt0) Do a full dump using vxdump 0uf /mnt2/y2k.1 /mnt0 Add a file to /mnt0 via touch /mnt0/foo Add some data to "foo" using echo "XYZZY" /mnt0/foo Do an incremental dump using vxdump 1uf /mnt2/y2k.2 /mnt0 during Key Date Change Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s5 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s5 /mnt1 cd /mnt1 Do a full restore using vxrestore rf /mnt2/y2k.1 Do an incremental restore using vxrestore rf /mnt2/y2k.2 Check for file "foo". Check for data consistency by using diff /mnt0/foo /mnt1/foo Compare the contents of the restored file system with the original file system using dircmp -d /mnt0 /mnt1

Test 6: full restore across Key Date Change 1. 2. 3. 4. Set date to Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Copy a lot of files to /mnt0 (eg: cp /bin/* /mnt0)

5. 6. 7. 8. 9. 10.

Do a full dump using vxdump 0uf /mnt2/y2k.1 /mnt0 Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s5 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s5 /mnt1 cd /mnt1 Do a full restore using vxrestore rf /mnt2/y2k.1 during Key Date Change Compare the contents of the restored file system with the original file system using dircmp -d /mnt0 /mnt1

Test 7: incremental restore across Key Date Change 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. Set date to Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Copy a lot of files to /mnt0 (eg: cp /bin/* /mnt0) Do a full dump using vxdump 0uf /mnt2/y2k.1 /mnt0 Add a file to /mnt0 via touch /mnt0/foo Add some data to "foo" using echo "XYZZY" /mnt0/foo Do an incremental dump using vxdump 1uf /mnt2/y2k.2 /mnt0 Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s5 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s5 /mnt1 cd /mnt1 Do a full restore using vxrestore rf /mnt2/y2k.1 Do an incremental restore using vxrestore rf /mnt2/y2k.2 during Key Date Change Check for file "foo". Check for data consistency by using diff /mnt0/foo /mnt1/foo Compare the contents of the restored file system with the original file system using dircmp -d /mnt0 /mnt1

Test 8: Take a full dump before and after the Key Date Change, then restore both and compare them 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. Set date to before Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Copy some files to /mnt0 (eg: cp /bin/t* /mnt0) Do a full dump using vxdump 0uf /mnt2/y2k.1 /mnt0 Key Date Change. Touch all of the files using touch /mnt0/* Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s5 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s5 /mnt1 mkdir /mnt1/1 cd /mnt1/1 Do a full restore using vxrestore rf /mnt2/y2k.1 Do another full dump using vxdump 0uf /mnt2/y2k.2 /mnt0 mkdir /mnt1/2 cd /mnt1/2 Do another full restore using vxrestore rf /mnt2/y2k.2 Compare the contents of both restored file systems using dircmp -d /mnt1/1 /mnt1/2

Test 9: full dump -Tdate before Key Date Change 1. 2. 3. 4. 5. 6. Set date to Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Copy some files to /mnt0 (eg: cp /bin/s* /mnt0) Do a full dump -T using vxdump 0Tf "date" /mnt2/y2k.1 /mnt0 Check that this failed since -Tdate is incompatible with full dumps.

Test 10: full dump -Tdate after Key Date Change 1. 2. 3. 4. 5. 6. 7. Set date to Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Copy some files to /mnt0 (eg: cp /bin/s* /mnt0) Key Date Change. Do a full dump -T using vxdump 0Tf "date" /mnt2/y2k.1 /mnt0 Check that this failed since -Tdate is incompatible with full dumps.

Test 11: full dump -Tdate during Key Date Change 1. 2. 3. 4. 5. Set date to Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Copy some files to /mnt0 (eg: cp /bin/s* /mnt0) Do a full dump -T during Key Date Change, using vxdump 0Tf "date" /mnt2/y2k.1 /mnt0 6. Check that this failed since -Tdate is incompatible with full dumps.

Test 12: Perform an incremental dump 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12.

-T date before Key Date Change,

date < Key Date

Set date to Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Copy some files to /mnt0 (eg: cp /bin/s* /mnt0) Do a full dump using vxdump 0uf /mnt2/y2k.1 /mnt0 Add a file using touch /mnt0/foo Add some data to "foo" using echo "XYZZY" /mnt0/foo Do an incremental dump -T, using vxdump 1Tf "date" /mnt2/y2k.2 /mnt0 Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s5 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s5 /mnt1 cd /mnt1 Do a full restore using vxrestore rf /mnt2/y2k.1

13. Do an incremental restore using vxrestore rf /mnt2/y2k.2 14. Check for data consistency by using diff /mnt0/foo /mnt1/foo

Test 13: Repeat previous test with date > Key Date. Since date > the time that file "foo" was written, it was not dumped and should not exist in the restored file system.

Test 14: Perform an incremental dump 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14.

-T date during Key Date Change,

date < Key Date

Set date to Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Copy some files to /mnt0 (eg: cp /bin/s* /mnt0) Do a full dump using vxdump 0uf /mnt2/y2k.1 /mnt0 Add a file using touch /mnt0/foo Add some data to "foo" using echo "XYZZY" /mnt0/foo Do an incremental dump -T during Key Date Change, using vxdump 1Tf "date" /mnt2/y2k.2 /mnt0 Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s5 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s5 /mnt1 cd /mnt1 Do a full restore using vxrestore rf /mnt2/y2k.1 Do an incremental restore using vxrestore rf /mnt2/y2k.2 Check for data consistency by using diff /mnt0/foo /mnt1/foo

Test 15: Repeat previous test with date > Key Date. Since date > the time that file "foo" was written, it was not dumped and should not exist in the restored file system.

Test 16: Perform an incremental dump 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14.

-T date after Key Date Change,

date < Key Date

Set date to after Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Copy some files to /mnt0 (eg: cp /bin/s* /mnt0) Do a full dump using vxdump 0uf /mnt2/y2k.1 /mnt0 Add a file using touch /mnt0/foo Add some data to "foo" using echo "XYZZY" /mnt0/foo Do an incremental dump -T, using vxdump 1Tf "date" /mnt2/y2k.2 /mnt0 Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s5 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s5 /mnt1 cd /mnt1 Do a full restore using vxrestore rf /mnt2/y2k.1 Do an incremental restore using vxrestore rf /mnt2/y2k.2 Check for data consistency by using diff /mnt0/foo /mnt1/foo Since date > the time that file "foo" was written, it was not dumped and should not exist in the

restored file system.

Test 17: Repeat previous test with date > Key Date. Since date > the time that file "foo" was written, it was not dumped and should not exist in the restored file system.

Test 18: Try entering an ambiguous date with the -Tdate option while doing an incremental dump before the Key Date Change. Enter a 2-digit year for an ambiguous date. Set date to Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Copy some files to /mnt0 (eg: cp /bin/s* /mnt0) Do a full dump using vxdump 0uf /mnt2/y2k.1 /mnt0 Add a file using touch /mnt0/foo Add some data to "foo" using echo "XYZZY" /mnt0/foo Do an incremental dump -T, using vxdump 1Tf "date" /mnt2/y2k.2 /mnt0 9. Check that the dump failed. 1. 2. 3. 4. 5. 6. 7. 8.

Test 19: Try entering an ambiguous date with the -Tdate option while doing an incremental dump during the Key Date Change. Enter a 2-digit year for an ambiguous date. Set date to before Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Copy some files to /mnt0 (eg: cp /bin/s* /mnt0) Do a full dump using vxdump 0uf /mnt2/y2k.1 /mnt0 Add a file using touch /mnt0/foo Add some data to "foo" using echo "XYZZY" /mnt0/foo Do an incremental dump -T during Key Date Change, using vxdump 1Tf "date" /mnt2/y2k.2 /mnt0 9. Check that the dump failed. 1. 2. 3. 4. 5. 6. 7. 8.

Test 20: Try entering an ambiguous date with the -Tdate option while doing an incremental dump after the Key Date Change. Enter a 2-digit year for an ambiguous date. 1. 2. 3. 4. 5. 6. 7. 8. 9. Set date to before Key Date. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs /dev/dsk/c0t1d0s4 /mnt0 Copy some files to /mnt0 (eg: cp /bin/s* /mnt0) Do a full dump using vxdump 0uf /mnt2/y2k.1 /mnt0 Add a file using touch /mnt0/foo Add some data to "foo" using echo "XYZZY" /mnt0/foo Key Date Change. Do an incremental dump -T using

vxdump 1Tf "date" /mnt2/y2k.2 /mnt0 10. Check that the dump failed.

3.2.8 vxquota.sh When a user has exceeded their disk or file quota (soft limit), vxquota prints out a message giving the user X amount of time from the current time to remove files or lower their disk usage. For vxrepquota , the number of days left is displayed for a particular VxFS file system.

Using the vxedquota command, it is possible to modify user quota time limits in an editor environment. Note: On HP-UX VxFS uses the generic quota commands. These are repquota , edquota , quota , quotaon, and quotaoff. Note: The examples below were from tests run on Solaris. The output of the HP-UX quota commands may differ.

Test 1: Exceed the inode soft and hard quota limits, testing vxquota , vxedquota , and vxrepquota 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. Set date to three days before the Key Date. Make the time 12:00 hours. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs -oquota /dev/dsk/c0t1d0s4 /mnt0 Create a testuser using useradd -u10000 -s/bin/ksh testuser Make the new file system belong to the user by doing chown testuser /mnt0 Create the quota file for this testuser via vxedquota testuser. Set the inode soft and hard quota limits to be 4 and 8. Set the quota time limits using vxedquota -t. Set the file quota time limit to 4 days. Turn on quotas using vxquotaon Check the inode quota limits using vxquota testuser. So far testuser has not exceeded any quotas. cd /mnt0 Exceed the inode soft quota limit by creating 5 files on /mnt0. su - testuser -c "touch /mnt0/a /mnt0/b /mnt0/c /mnt0/d /mnt0/e" Check the inode soft quota time limits using vxquota -v testuser. Output should look like

# vxquota -v testuser Disk quotas for testuser (uid 10000): Filesystem usage quota limit timeleft /mnt0 17 50 100

files 7

quota 4

limit 8

timeleft 4.0 days

13. Check the inode soft quota time limits using vxrepquota /mnt0. Output should look like
# vxrepquota /mnt1 User testuser -+ used 17 Block limits soft hard 50 100 timeleft used 7 File limits soft hard 4 8 timeleft 4.0 days

14. Attempt to exceed the inode hard quota limit by creating 2 more files on /mnt0. su - testuser -c "touch /mnt0/f /mnt0/g" The creation of file "g" should fail with the error message:
msgcnt XX vxfs: mesg 045: vx_bsdiquotaupdate - /mnt0 file system user 10000 inode limit reached touch: /mnt0/g cannot create

15. Set date to Key Date. This will advance the date by 3 days. Make the time 12:00 hours. 16. Check the inode soft quota time limits using vxquota testuser. Output should look like
# vxquota testuser Over file quota on /mnt0, remove 3 files within 1.0 days

17. Check the inode soft quota time limits using vxquota -v testuser. Output should look like
# vxquota -v testuser Disk quotas for testuser (uid 10000): Filesystem usage quota limit timeleft /mnt0 17 50 100

files 7

quota 4

limit 8

timeleft 1.0 days

18. Check the inode soft quota time limits using vxrepquota /mnt. Output should look like
# vxrepquota /mnt1 User testuser -+ used 17 Block limits soft hard 50 100 timeleft used 7 File limits soft hard 4 8 timeleft 1.0 days

19. Key Date Change. Make the time 13:00 hours. 20. Check the inode soft quota time limits using vxquota testuser. See that the timelimit is now EXPIRED. 21. Check the inode soft quota time limits using vxquota -v testuser. See that the timelimit is now EXPIRED. 22. Check the inode soft quota time limits using vxrepquota /mnt0. See that the timelimit is now EXPIRED for testuser.

Test 2: Exceed the block soft and hard quota limit, testing vxquota , vxedquota , and vxrepquota 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Set date to three days before the Key Date. Make the time 12:00 hours. Create a file system using mkfs -Fvxfs /dev/rdsk/c0t1d0s4 Mount the file system using mount -Fvxfs -oquota /dev/dsk/c0t1d0s4 /mnt0 Create a testuser using useradd -u10000 -s/bin/ksh testuser Make the new file system belong to the user by doing chown testuser /mnt0 Create the quota file for this testuser via vxedquota testuser. Set the block soft and hard quota limits to be 50 and 100. Set the quota time limits using vxedquota -t. Set the block quota time limit to be 4 days. Turn on quotas using vxquotaon Check the block quota limits using vxquota testuser. So far testuser has not exceeded any quotas. cd /mnt0 Exceed the block soft quota limit by creating 1 60K file on /mnt0.

su - testuser -c "dd if=/dev/zero of=/mnt0/a bs=1k count=60" 12. Check the block soft quota time limits using vxquota -v testuser. Output should look like
# vxquota -v testuser Disk quotas for testuser (uid 10000): Filesystem usage quota limit timeleft /mnt1 77 50 100 4.0 days

files 4

quota 5

limit 10

timeleft

13. Check the block soft quota time limits using vxrepquota /mnt0. Output should look like
# vxrepquota /mnt1 User testuser +used 77 Block limits soft hard 50 100 timeleft 4.0 days used 4 File limits soft hard 5 10 timeleft

14. Attempt to exceed the block hard quota limit by growing file "a" to 110K. su - testuser -c "dd if=/dev/zero of=/mnt0/a bs=1k count=110" The file size should get limited to 99K and the dd should produce the following error message:
msgcnt XX vxfs: mesg 044: vx_bsdquotaupdate - warning: /mnt0 file system user 10000 disk quota exceeded write: Disc quota exceeded

15. Set date to Key Date. This will advance the date by 3 days. Make the time 12:00 hours. 16. Check the block soft quota time limits using vxquota testuser. Output should look like
Over disk quota on /mnt1, remove 49K within 1.0 days

17. Check the block soft quota time limits using vxquota -v testuser. Output should look like
# vxquota -v testuser Disk quotas for testuser (uid 10000): Filesystem usage quota limit timeleft /mnt1 99 50 100 1.0 days

files 4

quota 5

limit 10

timeleft

18. Check the block soft quota time limits using vxrepquota /mnt. Output should look like
# vxrepquota /mnt1 User testuser +used 99 Block limits soft hard 50 100 timeleft 1.0 days used 4 File limits soft hard 5 10 timeleft

19. Key Date Change. Make the time 13:00 hours. 20. Check the soft quota time limits using vxquota testuser. See that the timelimit is now EXPIRED. 21. Check the soft quota time limits using vxquota -v testuser. See that the timelimit is now EXPIRED. 22. Check the soft quota time limits using vxrepquota /mnt0. See that the timelimit is now EXPIRED for testuser.

3.3 Powered Down Tests Where applicable many of the tests will be run with the machine powered down and then powered up at the time of the Key Date Change. This will only be done for the following Key Dates:

Dec 31, 1999 to Jan 01, 1999 Feb 28, 2000 to Feb 29, 2000 Feb 29, 2000 to Mar 01, 2000

3.4 Installation Tests Installing and de-installing VxFS across the key dates using pkgadd and pkgrm on Solaris and the SD-UX utilities on HP will demonstrate that the installation process is not affected by dates before, on, or after the Year 2000. These tests will be done by hand. Note: The installation tests will not be run on VxFS 3.0 (JFS) for HP-UX 10.20 or VxFS 3.1 (JFS) for HP-UX 11.0, since those releases of the file system were source releases to HP only, and therefore were never installable packages.

4 Conclusion The results from running these tests have shown that the versions of VxFS given in Table 1 (excluding JFS) do not have any bugs related to Year 2000 issues in all cases where the listed standard library time-related functions are used and where times and/or dates are stored or input as data.
This document was issued on February 22nd, 1999 and replaces all prior versions. Dates after 2038 are outside the scope of this document.

Anda mungkin juga menyukai