Monday, 24 December 2012
Filesystem full ticket
Execute below command which lists the top 20 files which occupy more space
Find -name "*" -xdev -ls |sort -nr +6 |head -20
This command lists top 20 files which consume ur disk space
Tuesday, 11 December 2012
Recovering a root disk and root mirror from backup tape
I assume here that you already have the below information as backup data.
Here are the steps to perfom.
- A listing of the partition table for the original root disk before you brought the disk under Volume control (ZFS, VXVM).
- Backup of complete root disk using any command like (UFSDUMP, cpio, etc)
- A new boot disk installed to replace the original failed boot disk if the original boot disk was physically damaged.
Here are the steps to perfom.
- boot cdrom -s
- Create the partitions which should be identical to the slice specifications of replaced disks (VTOC).
- mkfs -F ufs /dev/rdsk/c0t0d0s0 (create the filesystem)
- Mount/dev/dsk/c0t0d0s0 on a suitable mount point such as /a or /mnt (mount /dev/dsk/c0t0d0s0 /a)
- restore the backed up data (use ufsrestore if used ufsdump).
- then install the boot block using installboot command.
Can’t open boot device
Hi Guys,
This might be a common message when you are trying to boot server after any disk replacements (boot/mirror disks) or sometimes as part of regular interval sanity reboots.
If you can see the error as "Can’t open boot device" the possible reasons would be
Solution:
This might be a common message when you are trying to boot server after any disk replacements (boot/mirror disks) or sometimes as part of regular interval sanity reboots.
If you can see the error as "Can’t open boot device" the possible reasons would be
- The boot disk is not powered on. (In case of external boot device (LUNS from SAN)).
- The SCSI bus is not terminated. (can be interpreted as issues with BUS).
- Controller level failure of some sort.
- A disk is failing and locking the bus, preventing any disks from identifying themselves to the controller, and making the controller assume that there are no disks attached.
Solution:
- Try to boot from alternate disk and check install the bootblk on the failing disk.
- If the problem persists then check the H/W, S/W, Trans errors (Iostat -en) if count is exceeding more than 50+ in any column its time to get that disk replaced.
- If you are unable to boot from an alternate boot disk, there is still some type of hardware problem. Similarly, if switching the failed boot disk with an alternate boot disk fails to allow the system to boot, this also indicates hardware problems.
- Being on the console switch to system controller and check the errors and contact your vendor.
Monday, 10 December 2012
ZFS pre-requisites before kernel patching.
Hi Guys,
Here are the few steps you need to check before you initiate kernel patch upgrade.
#zfs list -o name,creation -t snapshot
This command gives the name and creation date if snapshot.
Sample Output
NAME CREATION
root@S1 Wed Apr 22 12:35 2009
root/ROOT@S1 Tue Apr 21 22:00 2009
root/ROOT/zfsroot@S1 Tue Apr 21 22:00 2009
root/ROOT/zfsroot/var@S1 Tue Apr 21 22:00 2009
#zfs list -H -t snapshot|cut -f1
This command will list only the snapshots.
Script for removing the snapshots
for i in `zfs list -H -t snapshot|cut -f1`
do
zfs destroy $i
done
Creating Snapshots
zfs snapshot -r root@S1
Rolling back the snapshots.
# zfs rollback -r root/ROOT@S1
# zfs rollback -r root/ROOT/zfsroot@S1
# zfs rollback -r root/ROOT/zfsroot/var@S1
Booting with Snapshot from OBP
OK> boot -Z root/ROOT/zfsroot@S1
To list all the reservations from the zpool.
# zfs get -r refreservation root
To disable the reservations from the zpool.
# zfs set refreservation=none root/ROOT/zfsroot
# zfs set refreservation=none root/ROOT/zfsroot/var
Here are the few steps you need to check before you initiate kernel patch upgrade.
#zfs list -o name,creation -t snapshot
This command gives the name and creation date if snapshot.
Sample Output
NAME CREATION
root@S1 Wed Apr 22 12:35 2009
root/ROOT@S1 Tue Apr 21 22:00 2009
root/ROOT/zfsroot@S1 Tue Apr 21 22:00 2009
root/ROOT/zfsroot/var@S1 Tue Apr 21 22:00 2009
#zfs list -H -t snapshot|cut -f1
This command will list only the snapshots.
Script for removing the snapshots
for i in `zfs list -H -t snapshot|cut -f1`
do
zfs destroy $i
done
Creating Snapshots
zfs snapshot -r root@S1
Rolling back the snapshots.
# zfs rollback -r root/ROOT@S1
# zfs rollback -r root/ROOT/zfsroot@S1
# zfs rollback -r root/ROOT/zfsroot/var@S1
Booting with Snapshot from OBP
OK> boot -Z root/ROOT/zfsroot@S1
To list all the reservations from the zpool.
# zfs get -r refreservation root
To disable the reservations from the zpool.
# zfs set refreservation=none root/ROOT/zfsroot
# zfs set refreservation=none root/ROOT/zfsroot/var
Subscribe to:
Posts (Atom)