2016年9月28日星期三

SME Linux 8 Backup terminated: pre-backup failed - status: 256

After workstation restore full system and all function and data normal but 
the workstation backup cannot run and have this message

Backup terminated: pre-backup failed - status: 256


The ldap may be down Please use the command below to fix.



sv d /service/ldap
rm -f /var/lib/ldap/__db.00{1,2,3,4,5,6} /var/lib/ldap/alock
rm -f /var/run/openldap/slapd.{pid,args}
sv u /service/ldap

Good luck!

2016年9月22日星期四

PresentationFontCache.exe uses 50%+ of the CPU

Delete all Font*.dat in C:\Windows\ServiceProfiles\LocalService\AppData\Local\  and reboot it.

Good Luck

2016年6月29日星期三

Read mutli session DVD Disc via linux



mount /dev/sr0 /media/dvd -o session=0

if you want to see the session try this command

cdrdao disk-info --device /dev/sr0

2016年5月28日星期六

how to change linux software raid md device name and lvm volume group name

     
 Sometimes you want to move a harddisk or a raid set to other linux machine. But you will find that the raid and lvm setting will have error. It prompt you that the md name and/or lvm name encounter problem due to same name.(normally it caused by the default installation.) You can change the md name and lvm name as below:


connect the old harddisk or raid set in a computer which is no other harddisk and  raid set.

--------------------------------------
change md name


start ubuntu live cd

apt-get install lvm2
if not yet installedin your ubuntu version

apt-get install mdadm
if not yet installedin your ubuntu version

Start with (assume your raid set is md127)

mdadm --detail /dev/md127

or if just only have incomplete raid set like one harddisk in raid 1.
(assume your harddisk partition is sda1)
mdadm --examine /dev/sda1

Version : 0.90

The first line or second line shows the metadata version used by this array. Now, stop the array:

mdadm --stop /dev/md127
mdadm --remove /dev/md127

And assemble it again using the new name. (metadata version is 1.0 or higher, use this:)

mdadm --assemble /dev/md3 /dev/sd[abcdefghijk]1 --update=name

For old metadata structure (most likely 0.90, as it allows for kernel auto-assembly), use this:

mdadm --assemble /dev/md3 --update=super-minor /dev/sd[abcdefghijk]1

-----------------------------------------
change vg name

boot linux rescue or ubuntu live cd/usb

in command prompt or terminal key in

lvm vgscan
lvm lvscan
lvm vgchange -a y
lvm pvscan
lvm lvscan

The last two commands should list your volume group(s) and logical volume(s). We use vgrename to change the name.

lvm vgrename VolGroup00 to-what-you-want-to-be
                   


2016年4月28日星期四

Linux, linux box (NAS), cannot be login by win98

use the steps below to fix it.


1.Add these three lines to the [globals] section of your smb.conf:

lanman auth = Yes
client lanman auth = Yes
client plaintext auth = Yes

2.Restart the Samba server

3.Re-input passwords for every Win9x user:
smbpasswd -a username

4.Have every Win9x user log out and then log in again.

If you want to know why then you can visit the link below:

http://www.troubleshooters.com/linux/win9x_samba.htm


2016年4月5日星期二

Reset all USB Device in Linux

You can try the script below:

reference from

http://billauer.co.il/blog/2013/02/usb-reset-ehci-uhci-linux/

#!/bin/bash

# USB drivers
rmmod xhci_pci
rmmod ehci_pci

# uncomment if you have firewire
#rmmod ohci_pci

modprobe xhci_pci
modprobe ehci_pci

# uncomment if you have firewire
#modprobe ohci_pci

------------------------------------------------------------------------------------

I used the one on SME Linux Server

#!/bin/bash

# Stop USB Drivers
rmmod uhci_hcd
rmmod ehci_hcd

# Start USB Drivers
modprobe xhci_hcd
modprobe ehci_hcd

2016年3月14日星期一

Centos Network Bonding (NIC Teaming Up)

yum install ethtool -y

-----------------------------------------------
Create a new bond NIC called bond0 (192.168.0.100 is the bonding IP)

gedit /etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0
ONBOOT=yes
DNS1=8.8.8.8
IPADDR=192.168.0.100
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
USERCTL=no
BOOTPROTO=none
NM_CONTROLLED=no

-----------------------------------------------
gedit /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
HWADDR=AA:A8:2A:20:05:C7
NM_CONTROLLED=no
ONBOOT=yes
USERCTL=no
MASTER=bond0
SLAVE=yes
BOOTPROTO=none


-----------------------------------------------
gedit /etc/sysconfig/network-scripts/ifcfg-eth1


DEVICE=eth1
HWADDR=AA:A8:2A:20:05:C8
NM_CONTROLLED=no
ONBOOT=yes
USERCTL=no
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

-----------------------------------------------
gedit /etc/sysconfig/network-scripts/ifcfg-eth2

DEVICE=eth2
HWADDR=AA:A8:2A:20:05:C9
NM_CONTROLLED=no
ONBOOT=yes
USERCTL=no
MASTER=bond0
SLAVE=yes
BOOTPROTO=none



-----------------------------------------------
gedit /etc/sysconfig/network-scripts/ifcfg-eth3

DEVICE=eth3
HWADDR=AA:A8:2A:20:05:CA
NM_CONTROLLED=no
ONBOOT=yes
USERCTL=no
MASTER=bond0
SLAVE=yes
BOOTPROTO=none


-----------------------------------------------
gedit /etc/modprobe.d/bonding.conf

alias bond0 bonding
options bond0 mode=1 miimon=100 downdelay=200 updelay=200
-----------------------------------------------



-----------------------------------------------
modprobe bonding

service network restart
-----------------------------------------------



--------------------------------------------------------------- Finished--------------------------------------

check the Bonding status use the command below:

cat /proc/net/bonding/bond0

-----------------------------------------------

2016年3月3日星期四

Open mdadm & lvm2 via Ubuntu live CD or USB

Start the Ubuntu CD or USB

open terminal

command as below


sudo apt-get install lvm2
sudo apt-get install mdadm
mdadm --assemble --scan

Then use DISK apps to access or mount the raid & LVM.

enjoy!

2016年1月23日星期六

force update windows time with batch file

Create the batch files in startup as below:

@ping time.windows.com -n 1 -w 36000 > nul
w32tm /config /manualpeerlist:"time.windows.com" /syncfromflags:manual /reliable:yes /update
W32tm /resync /force


-------------------------------------
It will try to check time.windows.com(or ntp you want) and your network is up and running then force to update the windows time with time.windows.com.

2016年1月18日星期一

Failed Raid 1 device & wants to readd again(assume the harddisk is status normal)

Raid Status but make sure both harddisk are normal and without bad sector.

[root@server ~]# cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 sda2[0] sdb2[2](F)
      156183808 blocks [2/1] [U_]

md1 : active raid1 sda1[0] sdb1[1]
      104320 blocks [2/2] [UU]

unused devices:

************************************************
if you want to fail the device by command, use this
[root@server ~]#  mdadm /dev/md2 --fail /dev/sdb2
************************************************

* User command to remove the failed device.

[root@server ~]#  mdadm /dev/md2 --remove /dev/sdb2


[root@server ~]# cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 sda2[0]
      156183808 blocks [2/1] [U_]

md1 : active raid1 sda1[0] sdb1[1]
      104320 blocks [2/2] [UU]

unused devices:

[root@server ~]# mdadm /dev/md2 --add /dev/sdb2
mdadm: hot added /dev/sdb2
[root@server ~]# cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 sdb2[2] sda2[0]
      156183808 blocks [2/1] [U_]
      [>....................]  recovery =  0.1% (185024/156183808) finish=28.0min speed=92512K/sec
md1 : active raid1 sda1[0] sdb1[1]
      104320 blocks [2/2] [UU]

unused devices: