Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (11) AWS (5) numerology (5)

Friday, June 21, 2024

How to mirror root disks in Solaris 11

 How to mirror root disks in Solaris 11


Mirroring root disks is used for redundancy purpose i.e. incase of failure of 1 disk the data will be accessible from other disks. If we want to mirror the root disk in rpool then we need to follow below process.

In this example we are mirroring root disk which are locally present on server. We can mirror the disks which are coming from external storage. 


1.       To know the disks attached to the server.

#echo |format






1.       Check rpool status. Here it is showing only 1 disk is present in rpool.

#zpool status rpool






1.       Attach one more disk of same size to rpool.

#zpool attach -f rpool <disk1> <New disk_disk2>




1.       Resilvering will start on new disk and till that time you will see the particular pool in Degraded state.

 

What is resilvering: Resilvering operation is moving data from the good copies to the new device.







1.       Once resilvering done the pool will have status ONLINE and you will be see 2 disks in mirrored.






Thanks,

Kiren Jadhav

Unable to do root login even after entering correct root password in solaris 11


Unable to ssh root user even after entering correct root password in solaris 11


After doing OS installation on physical server or ldom/zones, we try to login using root user but sometimes it fails even though we use correct root password. And if we try to login via console using same password then we will be able to login.

This means there is nothing to do with password, something need to be changed in sshd configuration file. Here is the solution:

1.       Note down PermitRootLogin value in /etc/ssh/sshd_config file



1.       Take backup of /etc/ssh/sshd_config file.

#cp -rp /etc/ssh/sshd_config /etc/ssh/sshd_config_15mar2024

 

2.       Edit sshd_config file using vi editor and change PermitRootLogin and PasswordAuthentication value to yes

1




Restart ssh service



Thanks,

Kiren Jadhav

Thursday, June 20, 2024

How to delete/unconfigure ldoms in solaris 11

 How to delete/unconfigure ldoms in solaris 11:

1.       In this example, we are having primary domain and 1 logical domain.

List all the LDOMs which are running on primary domain.

ldm ls

 

2.       Stop all LDOMs which are running.

2.1 to stop all running ldoms; it will bring LDOMs in bound mode

ldm stop-domain -a   

2.2   unbound all the LDOMs

ldm unbind-domain -a

2.3   remove all ldoms and its resources from primary domain

ldm remove-domain -a


3.       List all services:

To list all services which are given from service domain.

ldm list-services


4.       Remove all 3 services:

4.1 Remove vds service

ldm remove-vds primary-vds0

If we directly remove vds service then it will get failed as we can see primary-vds0 disk has been added to LDOM testdb, so remove it first.

 

Below command it will remove forcefully virtual disk service added to any LDOM

ldm remove-vcc primary-vcc0

4.2 Remove vsw0 service.

ldm remove-vsw primary-vsw0

              4.3 Remove vcc0 service.

ldm remove-vcc primary-vcc0

 

5.       Check all sp-config file and try to restart primary domain using factory-default spconfig file.

 

ldm ls-spconfig
ldm set-config factory-default

 

6.       Now restart/shutdown server so it will take booting config as factory-default.

shutdown -y -i6 -g0


Thanks,

Kiren Jadhav

How to reduce coredump size in Solaris 11

How to reduce coredump size in Solaris 11.

Suppose rpool is full and we don’t have any scope for further housekeeping then we can try to reduce the size of coredump to free up some space in rpool.

If we reduce the size of coredump directly it will give us error and ask to do it forcefully but doing it forcefully may cause data loss.


Below are the steps to do reduce coredump size.

#dumpadm     >>> to get info on current dump device and savecore directory

# zfs get volsize rpool/dump       >>> To get vol size of dump device

#zfs create -V 10G rpool/dump1       >>> creating new dump volume of size 10G (suppose previous dumpsize is 20G)

# dumpadm -d /dev/zvol/dsk/rpool/dump1          >>> set the dump device to new volume

#dumpadm             >>> We can see new dump device

#zfs list |grep -i dump                >>> We can see 2 dump devices here

#zfs destroy rpool/dump                       >>> destroy old dump device


Thanks,

Kiren Jadhav