For added fail-safe for our servers, besides having good backups, is having our boot discs mirrored. The following steps were done using Solaris 10 on a sparc machine (V490).
Assumptions:
HDD0 - c0t0d0 (Primary Disc)
HDD1 - c0t1d0
Partitions of HDD0:
/ - c0t0d0s0
swap - c0t0d0s1
backup - c0t0d0s2 (this represents the whole disc)
/var - c0t0d0s3
/opt - c0t0d0s4
unassigned - c0t0d0s7 (this would be used to store our metadbs)
1. Start by making HDD1's partition table the same as HDD0:
# prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2
2. Create atleast 2 (tough i prefer 3 which i will be using) state databases on each disc.
# metadb -afc 3 c0t0d0s7 c0t1d0s7
whereas:
-a = add state database
-f = force (this is needed for HDD0 which is mounted)
-c # = number of state databases in each slice
3. Initialize each disc.
HDD0
# metainit -f d10 1 1 c0t0d0s0
# metainit -f d11 1 1 c0t0d0s1
# metainit -f d13 1 1 c0t0d0s3
# metainit -f d14 1 1 c0t0d0s4
HDD1
# metainit -f d20 1 1 c0t1d0s0
# metainit -f d21 1 1 c0t1d0s1
# metainit -f d23 1 1 c0t1d0s3
# metainit -f d24 1 1 c0t1d0s4
4. Initialize the mirrors.
# metainit d0 -m d10
# metainit d1 -m d11
# metainit d3 -m d13
# metainit d4 -m d14
5. Metaroot and editing of /etc/vfstab to boot to our mirror.
# cat /etc/vfstab (to check vfstab before metaroot)
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s1 - - swap - no -
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -
/dev/dsk/c0t0d0s3 /dev/rdsk/c0t0d0s3 /var ufs 1 no -
/dev/dsk/c0t0d0s4 /dev/rdsk/c0t0d0s4 /opt ufs 1 no -
/devices - /devices devfs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
swap - /tmp tmpfs - yes -
# metaroot d0 (only use this for the root slice)
# cat /etc/vfstab (to check vfstab after metaroot)
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s1 - - swap - no -
/dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no -
/dev/dsk/c0t0d0s3 /dev/rdsk/c0t0d0s3 /var ufs 1 no -
/dev/dsk/c0t0d0s4 /dev/rdsk/c0t0d0s4 /opt ufs 1 no -
/devices - /devices devfs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
swap - /tmp tmpfs - yes -
# vi /etc/vfstab (to edit the vfstab to boot to our mirror)
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/md/dsk/d1 - - swap - no -
/dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no -
/dev/md/dsk/d3 /dev/md/rdsk/d3 /var ufs 1 no -
/dev/md/dsk/d4 /dev/md/rdsk/d4 /opt ufs 1 no -
/devices - /devices devfs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
swap - /tmp tmpfs - yes -
6. Reboot the system
# lockfs -fa
# shutdown -y -g0 -i6
7. Attach the submirrors to the mirror.
# metattach d0 d20
# metattach d1 d21
# metattach d3 d23
# metattach d4 d24
* to monitor the progress of the syncing process
# while true; do metastat | grep %; sleep 3; clear; done
8. Change the core dump directory
# dumpadm (before changing)
Dump content: kernel pages
Dump device: /dev/dsk/c0t0d0s1 (swap)
Savecore directory: /var/crash/e3500
Savecore enabled: yes
# dumpadm -d swap
Dump content: kernel pages
Dump device: /dev/md/dsk/d1 (swap)
Savecore directory: /var/crash/e250
Savecore enabled: yes
9. Update the boot-device parameter to boot to either HDD0 or HDD1
Check the physical device path of both disc
# ls -l /dev/dsk/c0t?d0s0
lrwxrwxrwx 1 root root 41 Jun 5 16:49 /dev/dsk/c0t0d0s0 -> ../../devices/pci@1f,4000/scsi@3/sd@0,0:a
lrwxrwxrwx 1 root root 41 Jun 5 16:49 /dev/dsk/c0t1d0s0 -> ../../devices/pci@1f,4000/scsi@3/sd@1,0:a
Change the major name (in this case "sd") to disk for the boot-device.
Setting the boot-device can be done on the Solaris or the Open Boot (ok) prompt.
Solaris
# eeprom "nvramrc=devalias mirror /pci@1f,4000/scsi@3/disk@1,0:a"
# eeprom "use-nvramrc?=true"
# eeprom boot-device
boot-device=disk net
# eeprom "boot-device=disk mirror net"
Open Boot (ok) prompt
ok nvalias mirror /pci@1f,4000/scsi@3/disk@1,0:a
ok printenv boot-device
boot-device disk net
ok setenv boot-device disk mirror net
10. Lastly, because of the behavior of SVM (the rule half +1 stae database, so we could boot into the OS) we need to add a parameter on /etc/system
# echo "set md:mirrored_root_flag=1" >> /etc/system
You could also opt to add some tuning parameters that could speedup the process of syncing between drives. This sets the size of the buffer used for resynchronizing RAID 1 volumes (mirrors) as the number of 512-byte blocks in the buffer. Setting larger values can increase resynchronization speed.
# echo "set md_mirror:md_resync_bufsz=1024" >> /etc/system (You could change the default value 1024 from 128 to 2048.)
Thursday, October 30, 2008
Wednesday, October 29, 2008
Creating ISO File in Solaris
As I have stated on how to mount ISO files in Solaris, here is a follow up on how to create an ISO file under Solaris.
# mkisofs -l -L -r -o /some/folder/your-image.iso /the/directory/you/want/to/image/
whereas the parameters used are as follows:
-l Allow full 31 character filenames
-L This option will get POSIX.1-2001 semantics with mkisofs-2.02.(but you may use -allow-leading-dots)
-r This is like the -R option, but file ownership and modes are set to more useful values. The uid and gid are set to zero, because they are usually only useful on the author's system, and not useful to the client
-o filename is the name of the file to which the iso9660 filesystem image should be written.
Its been a while since I have written an article. Hope to have more time to write more articles.
# mkisofs -l -L -r -o /some/folder/your-image.iso /the/directory/you/want/to/image/
whereas the parameters used are as follows:
-l Allow full 31 character filenames
-L This option will get POSIX.1-2001 semantics with mkisofs-2.02.(but you may use -allow-leading-dots)
-r This is like the -R option, but file ownership and modes are set to more useful values. The uid and gid are set to zero, because they are usually only useful on the author's system, and not useful to the client
-o filename is the name of the file to which the iso9660 filesystem image should be written.
Its been a while since I have written an article. Hope to have more time to write more articles.
Thursday, April 24, 2008
Windows XP SP3 is coming to town...
The eagerly anticipated Service Pack for Windows XP is just around the corner. Here are some details regarding the pack:
Download Here - Windows Update Site
Download Here - Checked Build From Microsoft
Download Here - MajorGeeks Site
Download Here - SoftPedia Site
Windows XP Service Pack 3 (SP3) includes all previously released updates for the operating system. This update also includes a small number of new functionalities, which do not significantly change customers experience with the operating system.
Supported Operating Systems: Windows XP; Windows XP Home Edition ; Windows XP Home Edition N; Windows XP Media Center Edition; Windows XP Professional Edition ; Windows XP Professional N; Windows XP Service Pack 1; Windows XP Service Pack 2; Windows XP Starter Edition; Windows XP Tablet PC Edition.
Download Here - Windows Update Site
Download Here - Checked Build From Microsoft
Download Here - MajorGeeks Site
Download Here - SoftPedia Site
Friday, April 11, 2008
Mounting ISO File in Solaris
If you need to view the contents of the ISO file under Solaris, the lofiadm command could be of a help.
Mounting ISO files
# lofiadm -a /path/xxx.iso
/dev/lofi/0 [note: this will be given by the lofiadm]
# mount -F hsfs -o ro /dev/lofi/0 /mnt
Unmount ISO files
# umount /mnt
# lofiadm -d /path/xxx.iso
Mounting ISO files
# lofiadm -a /path/xxx.iso
/dev/lofi/0 [note: this will be given by the lofiadm]
# mount -F hsfs -o ro /dev/lofi/0 /mnt
Unmount ISO files
# umount /mnt
# lofiadm -d /path/xxx.iso
Tuesday, April 8, 2008
I lost my DVD/CD-ROM in Vista
I opened Windows Explorer and saw that my DVD drive was lost. Where could have vista hide my DVD. Then I checked Device Drivers and saw a yellow exclamation point beside my DVD drive. I tried to uninstall the driver and checked for newer drivers through the net but none have help. Very stubborn Vista it is. Then began my long day of searching for answer and alas, I came across to a site giving some shed of light to my dismay. It instructed to delete some registry values that is pertaining to the CD-ROM. Below is the registry value that you could use, Just copy the blocked text and paste it to your notepad and save it with a .reg extension.
To make things easy, I have uploaded the reg file. Go grab them and just double click it..
Download .reg File
Download Rar File
note: if you have downloaded the rar file, you need to extract it first, try WinRAR.
Windows Registry Editor Version 5.00
;Fixes issues with cdrom drives not working properly
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E965-E325-11CE-BFC1-08002BE10318}]
"UpperFilters"=-
"LowerFilters"=-
To make things easy, I have uploaded the reg file. Go grab them and just double click it..
Download .reg File
Download Rar File
note: if you have downloaded the rar file, you need to extract it first, try WinRAR.
The Lighter Side of Vista...
Yes Microsoft Windows Vista is the most appealing Windows ever. But it also uses more resources as it loads a lot of stuff like Media Center, Movie Maker and a like. Personally, I don't use them, so why keep them. Here come vLite to strip down Microsoft's latest Operating System.
The current beta version of vLite lets you slipstream Service Pack 1 whereas we all know that Microsoft removed this feature (as they said slipstream feature would be available for SP2).
Here are the main features of vLite:
The current beta version of vLite lets you slipstream Service Pack 1 whereas we all know that Microsoft removed this feature (as they said slipstream feature would be available for SP2).
Here are the main features of vLite:
- hotfix, language pack and driver integration
- component removal
- unattended setup
- tweaks
- split/merge Vista installation CDs
- create ISO and burn bootable CD/DVD
Subscribe to:
Posts (Atom)