Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (11) AWS (5) numerology (5)
Showing posts with label delete. Show all posts
Showing posts with label delete. Show all posts

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

Wednesday, December 16, 2020

Can I delete files in /var/log/journal ?

Can I delete files in /var/log/journal ?


/var/log/journal/ are kept the log files created by the journal service (systemd). Yes, the files from /var/log/journal directory can be removed.


1. If /var/log/journal log file using more space like 3.5G etc.. 

We can verify it by running below command:

# journalctl --disk-usage


2. Note down the SystemMaxUse value, it could be hashed or having value like 3.5G

#cat /etc/systemd/journald.conf |grep -i SystemMaxUse


3. Before editing journald.conf file; take copy of it

#cp -rp /etc/systemd/journald.conf /etc/systemd/journald.conf_backup


4. Edit the file journald.conf using vi editor and change the value SystemMaxUse to 200 or 300MB

#cat /etc/systemd/journald.conf |grep -i SystemMaxUse

SystemMaxUse=300M


5. Restart the systemd-journald service to make the changes effective done in /etc/systemd/journald.conf

#systemctl restart systemd-journald


Or


If you do not want to restart the systemd-journald service then use below command :

#journalctl –vacuum-size=300M 



Thanks,

Kiraan B Jadhav