2019年4月5日 星期五

Linux Mint 19.1 Tessa / LDAP


sudo apt install libnss-ldapd libpam-ldapd


sudo vi /etc/nslcd.conf

#Create home directory on login
sudo pam-auth-update


#/etc/lightdm/lightdm.conf.d/99-multiseat.conf
 [Seat:*]
greeter-hide-users=false
greeter-show-manual-login=true
allow-guest=false

2018年1月20日 星期六

Windows 10 無法登入SAMBA

AllowInsecureGuestAuth

AllowInsecureGuestAuth specifies whether the SMB client will allow insecure guest logons to an SMB server.
Insecure guest logons are used by file servers to allow unauthenticated access to shared folders. While uncommon in an enterprise environment, insecure guest logons are frequently used by consumer Network Attached Storage (NAS) appliances acting as file servers. Windows file servers require authentication and do not use insecure guest logons by default.
Important
Since insecure guest logons are unauthenticated, important security features such as SMB Signing and SMB Encryption are disabled. As a result, clients that allow insecure guest logons are vulnerable to a variety of man-in-the-middle attacks that can result in data loss, data corruption, and exposure to malware. Additionally, any data written to a file server using an insecure guest logon is potentially accessible to anyone on the network. Microsoft recommends disabling insecure guest logons and configuring file servers to require authenticated access.

Values

Value Description
0 SMB client rejects insecure guest logons.
This is the default, and recommended, value.
1 SMB client allows insecure guest logons.

2017年11月29日 星期三

Using jupyter notebook via ssh

Using jupyter notebook via ssh:

  1. SSH to remote server / workstation (140.112.xxx.xxx) :
  2.    You should choose a port other than 1234

    Linux:
    ssh 140.112.xxx.xxx -L 1234:localhost:1234
    PuTTY on Windows 



    Then run jupyter notebook on remote machine (replace keras with your virtualenv):
    . keras/bin/activate
    pip install jupyter
    jupyter notebook --no-browser --port=1234

  3. On local computer::

  4. Copy/paste this URL into your browser when you connect for the first time, to login with a token:
http://localhost:1234?token=xxxxxxxxxx

2016年12月11日 星期日

Authenticating Ubuntu 16.04/Mint 18 Sarah client against Samba

For some scenarios, it may be usefull to set up the Linux login to work with Zentyal's Users and Groups (Samba4).
The two main reasons to configure this are:
  • Being able to log in with any domain user into any host machine, without granting root privileges.
  • Automatically acquiring the main Kerberos ticket (TGT), which can be then used to transparently access other services in the domain without prompting for user credentials.
Zentyal 5.0 and Ubuntu 16.04 will be used for this example.
Your Linux client should be able to access Zentyal through the LAN network, Zentyal has to be your default DNS server.

For this example, you will have an example Users domain provisioned, a domain administrator and an example user
Domain provisioned.png
Install the required packages on the linux client:
sudo apt-get install sssd heimdal-clients msktutil libnss-sss libpam-sss
You can leave the default Kerberos realm blank, it will be configured later.
As the superuser, edit the file /etc/krb5.conf and write the following lines, deleting the rest of the file:
[libdefaults]
        default_realm = ZENTYAL-DOMAIN.LAN
        rdns = no
        dns_lookup_kdc = true
        dns_lookup_realm = false

Pay attention to the indentation, there is a for the parameters inside the block.
Replace the default_realm parameter with your domain, all capital letters. Pay attention to the capitalization for all the commands in this document, it is significant.
Open the LDAP port in Zentyal's firewall, section Internal networks to Zentyal
As the superuser, edit the file /etc/hosts to configure the FQDN of this host:
127.0.0.1       localhost
127.0.1.1       lubuntu.zentyal-domain.lan  lubuntu
As the regular user, get the Kerberos ticket of the domain admin:
user@lubuntu:~$ kinit Administrator
Administrator@ZENTYAL-DOMAIN.LAN's Password: 
user@lubuntu:~$ klist
Credentials cache: FILE:/tmp/krb5cc_1001
        Principal: Administrator@ZENTYAL-DOMAIN.LAN

  Issued                Expires               Principal
Jul 17 22:30:04 2014  Jul 18 08:29:53 2014  krbtgt/ZENTYAL-DOMAIN.LAN@ZENTYAL-DOMAIN.LAN
You will now generate the Kerberos principals for this host, replace the host names for the client and the server, and again, pay attention to the capitalization:
user@lubuntu:~$ msktutil -N -c -b 'CN=COMPUTERS' -s HOST/lubuntu.zentyal-domain.lan -k test.keytab --computer-name LUBUNTU --upn LUBUNTU$ --server zentyal.zentyal-domain.lan --user-creds-only --verbose

user@lubuntu:~$ msktutil -N -c -b 'CN=COMPUTERS' -s HOST/lubuntu -k test.keytab --computer-name LUBUNTU --upn LUBUNTU$ --server zentyal.zentyal-domain.lan --user-creds-only --verbose
Now, you should be able to see your host name on Zentyal's LDAP tree:
Computer registered.png
destroy the Kerberos ticket
user@lubuntu:~$ kdestroy
Copy the keytab file to /etc/sssd:
user@lubuntu:~$ sudo cp test.keytab /etc/sssd/
as a superuser, create the file /etc/sssd/sssd.conf with the content:
[sssd]

services = nss, pam
config_file_version = 2
domains = zentyal-domain.lan


[nss]

entry_negative_timeout = 0
debug_level = 5


[pam]

debug_level = 5


[domain/zentyal-domain.lan]

debug_level = 10
enumerate = false
id_provider = ad
auth_provider = ad
chpass_provider = ad
access_provider = ad
dyndns_update = false
ad_hostname = zentyal.zentyal-domain.lan
ad_server = zentyal.zentyal-domain.lan


ad_domain = zentyal-domain.lan
ldap_schema = ad
ldap_id_mapping = true
fallback_homedir = /home/%u
default_shell = /bin/bash
ldap_sasl_mech = gssapi
ldap_sasl_authid = LUBUNTU$
krb5_keytab = /etc/sssd/test.keytab

ldap_krb5_init_creds = true
 
ad_gpo_access_control = disabled
 
replace domain and host names where necessary, the parameter krb5_keytab should point to the keytab you created and copied.
Set the correct permissions for the sssd.conf file:
root@lubuntu:/etc/sssd# sudo chmod 0600 sssd.conf 
And restart the SSSD service
root@lubuntu:/etc/sssd# sudo service sssd restart
stop: Unknown instance: 
sssd start/running, process 1671
Now, as a superuser, edit the file /etc/pam.d/common-session and below the line
session required        pam_unix.so
Add the line
session required pam_mkhomedir.so skel=/etc/skel umask=0077
Now, you should be able to login as any domain user:
Domain user.png
PAM will automatically create the home directory for this user if needed, and the user will be granted the TGT Kerberos ticket directly after login in:
Kerberos granted.png

2016年5月15日 星期日

sum_primes.py using dispy

                           Node |  CPUs |    Jobs |    Sec/Job | Node Time Sec
------------------------------------------------------------------------------
 192.168.11.172 (M3A790GXH)     |     4 |     108 |      0.823 |        88.868
 192.168.11.180 (KVM)           |     4 |     105 |      0.848 |        89.074
 192.168.11.150 (WorkStation370 |     1 |      13 |      1.719 |        22.346
 192.168.11.166 (orangepione)   |     4 |      20 |      5.237 |       104.740
 192.168.11.187 (pypy)          |     4 |     524 |      0.151 |        78.983
 192.168.11.139 (P5QL)          |     4 |     132 |      0.670 |        88.469
 192.168.11.184 (i386)          |     4 |      88 |      1.027 |        90.334
 192.168.11.185 (bananapipro)   |     2 |      10 |      5.991 |        59.906

Total job time: 622.720 sec, wall time: 30.349 sec, speedup: 20.518

2015年4月16日 星期四

Authenticating Linux client against Samba

For some scenarios, it may be usefull to set up the Linux login to work with Zentyal's Users and Groups (Samba4).
The two main reasons to configure this are:
  • Being able to log in with any domain user into any host machine, without granting root privileges.
  • Automatically acquiring the main Kerberos ticket (TGT), which can be then used to transparently access other services in the domain without prompting for user credentials.
Zentyal 3.5 and Ubuntu 14.04 will be used for this example.
Your Linux client should be able to access Zentyal through the LAN network, Zentyal has to be your default DNS server.

For this example, you will have an example Users domain provisioned, a domain administrator and an example user
Domain provisioned.png
Install the required packages on the linux client:
sudo apt-get install sssd heimdal-clients msktutil libpam-sss libnss-sss
You can leave the default Kerberos realm blank, it will be configured later.
As the superuser, edit the file /etc/krb5.conf and write the following lines, deleting the rest of the file:
[libdefaults]
        default_realm = ZENTYAL-DOMAIN.LAN
        rdns = no
        dns_lookup_kdc = true
        dns_lookup_realm = false

Pay attention to the indentation, there is a for the parameters inside the block.
Replace the default_realm parameter with your domain, all capital letters. Pay attention to the capitalization for all the commands in this document, it is significant.
Open the LDAP port in Zentyal's firewall, section Internal networks to Zentyal
As the superuser, edit the file /etc/hosts to configure the FQDN of this host:
127.0.0.1       localhost
127.0.1.1       lubuntu.zentyal-domain.lan  lubuntu
As the regular user, get the Kerberos ticket of the domain admin:
user@lubuntu:~$ kinit Administrator
Administrator@ZENTYAL-DOMAIN.LAN's Password: 
user@lubuntu:~$ klist
Credentials cache: FILE:/tmp/krb5cc_1001
        Principal: Administrator@ZENTYAL-DOMAIN.LAN

  Issued                Expires               Principal
Jul 17 22:30:04 2014  Jul 18 08:29:53 2014  krbtgt/ZENTYAL-DOMAIN.LAN@ZENTYAL-DOMAIN.LAN
You will now generate the Kerberos principals for this host, replace the host names for the client and the server, and again, pay attention to the capitalization:
user@lubuntu:~$ msktutil -N -c -b 'CN=COMPUTERS' -s HOST/lubuntu.zentyal-domain.lan -k test.keytab --computer-name LUBUNTU --upn LUBUNTU$ --server zentyal.zentyal-domain.lan --user-creds-only --verbose

user@lubuntu:~$ msktutil -N -c -b 'CN=COMPUTERS' -s HOST/lubuntu -k test.keytab --computer-name LUBUNTU --upn LUBUNTU$ --server zentyal.zentyal-domain.lan --user-creds-only --verbose
Now, you should be able to see your host name on Zentyal's LDAP tree:
Computer registered.png
destroy the Kerberos ticket
user@lubuntu:~$ kdestroy
Copy the keytab file to /etc/sssd:
user@lubuntu:~$ sudo cp test.keytab /etc/sssd/
as a superuser, create the file /etc/sssd/sssd.conf with the content:
[sssd]

services = nss, pam
config_file_version = 2
domains = zentyal-domain.lan


[nss]

entry_negative_timeout = 0
debug_level = 5


[pam]

debug_level = 5


[domain/zentyal-domain.lan]

debug_level = 10
enumerate = false
id_provider = ad
auth_provider = ad
chpass_provider = ad
access_provider = ad
dyndns_update = false
ad_hostname = zentyal.zentyal-domain.lan
ad_server = zentyal.zentyal-domain.lan


ad_domain = zentyal-domain.lan
ldap_schema = ad
ldap_id_mapping = true
fallback_homedir = /home/%u
default_shell = /bin/bash
ldap_sasl_mech = gssapi
ldap_sasl_authid = LUBUNTU$
krb5_keytab = /etc/sssd/test.keytab

ldap_krb5_init_creds = true

replace domain and host names where necessary, the parameter krb5_keytab should point to the keytab you created and copied.
Set the correct permissions for the sssd.conf file:
root@lubuntu:/etc/sssd# sudo chmod 0600 sssd.conf 
And restart the SSSD service
root@lubuntu:/etc/sssd# sudo service sssd restart
stop: Unknown instance: 
sssd start/running, process 1671
Now, as a superuser, edit the file /etc/pam.d/common-session and below the line
session required        pam_unix.so
Add the line
session required pam_mkhomedir.so skel=/etc/skel umask=0077
Now, you should be able to login as any domain user:
Domain user.png
PAM will automatically create the home directory for this user if needed, and the user will be granted the TGT Kerberos ticket directly after login in:
Kerberos granted.png

2014年11月2日 星期日

IPv6 with PPPoE on Ubuntu

/etc/sysctl.conf
net.ipv6.conf.all.forwarding=1
net.ipv6.conf.ppp0.accept_ra=2

/etc/ppp/peers/dsl-provider (or anything like this)
ipv6 ,
/etc/ppp/ipv6-up.d/radvd (or anything you like)
/etc/init.d/wide-dhcpv6-client restart
/etc/init.d/radvd restart
/etc/wide-dhcpv6/dhcp6c.conf
interface ppp0 {
    send ia-pd 0;
};

id-assoc pd 0 {
    prefix-interface eth0 {
        sla-len 0;
        sla-id 1;
    };
};
/etc/radvd.conf
interface eth0
{
    AdvSendAdvert on;
    prefix ::/64
    {
        AdvOnLink on;
        AdvAutonomous on;
        AdvRouterAddr on;
    };
};




2014年9月1日 星期一

install MFC-J625DW driver on Ubuntu 14.04

#get Driver Install Tool on  brother support site, and unzip it
gunzip linux-brprinter-installer-2.0.0-1.gz

# run the installer
sudo sh linux-brprinter-installer-2.0.0-1
 
# when prompt "Will you specify the Device URI?", enter "Y "
# record the nodename like "lpd://BRW9CD21EACxxxx/BINARY_P1"
# but choose "(A): Auto. (dnssd://Brother%20MFC-J625DW._ipp._tcp.local/)"
# just press enter when it says "enter IP address ->"
# config sane using nodename
brsaneconfig4 -a name=MFC-J625DW model=MFC-J625DW nodename=BRW9CD21EACxxxx

2014年6月27日 星期五

sample tinc-up script to send only forwarded packets to VPN

#!/bin/bash

#match /etc/iproute2/rt_tables
TABLE=$INTERFACE
MARK=0x1

ifconfig $INTERFACE 192.168.11.254 netmask 255.255.0.0

echo 1 >/proc/sys/net/ipv4/conf/eth0/proxy_arp
echo 1 >/proc/sys/net/ipv4/conf/$INTERFACE/proxy_arp
echo 1 >/proc/sys/net/ipv4/ip_forward

#To accept asymmetrically routed (outgoing routes and incoming routes are different) packets
echo 2 > /proc/sys/net/ipv4/conf/$INTERFACE/rp_filter

ip route add default dev $INTERFACE table $TABLE
ip rule add fwmark $MARK table $TABLE

iptables -A PREROUTING -t mangle -d 172.16.11.0/24 -j ACCEPT
iptables -A PREROUTING -t mangle -d 192.168.11.0/24 -j ACCEPT
iptables -A PREROUTING -t mangle -j MARK --set-mark $MARK

2014年5月25日 星期日

qvdpautest 0.5.1

  • Intel(R) Celeron(R) CPU G1610 @ 2.60GHz
    NVIDIA GPU GeForce GT 630 (GK208) at PCI:1:0:0 (GPU-0)
    • VDPAU API version : 1
      VDPAU implementation : NVIDIA VDPAU Driver Shared Library  331.67  Fri Apr  4 11:46:48 PDT 2014

      SURFACE GET BITS: 992.328 M/s
      SURFACE PUT BITS: 1367.12 M/s

      MPEG DECODING (1920x1080): 187 frames/s
      MPEG DECODING (1280x720): 413 frames/s
      H264 DECODING (1920x1080): 128 frames/s
      H264 DECODING (1280x720): 267 frames/s
      VC1 DECODING (1440x1080): 83 frames/s
      MPEG4 DECODING (1920x1080): 131 frames/s

      MIXER WEAVE (1920x1080): 648 frames/s
      MIXER BOB (1920x1080): 1141 fields/s
      MIXER TEMPORAL (1920x1080): 353 fields/s
      MIXER TEMPORAL + IVTC (1920x1080): 279 fields/s
      MIXER TEMPORAL + SKIP_CHROMA (1920x1080): 452 fields/s
      MIXER TEMPORAL_SPATIAL (1920x1080): 223 fields/s
      MIXER TEMPORAL_SPATIAL + IVTC (1920x1080): 189 fields/s
      MIXER TEMPORAL_SPATIAL + SKIP_CHROMA (1920x1080): 258 fields/s
      MIXER TEMPORAL_SPATIAL (720x576 video to 1920x1080 display): 672 fields/s
      MIXER TEMPORAL_SPATIAL + HQSCALING (720x576 video to 1920x1080 display): 531 fields/s

      MULTITHREADED MPEG DECODING (1920x1080): 153 frames/s
      MULTITHREADED MIXER TEMPORAL (1920x1080): 249 fields/s
       
  • 1
  • 2
  • 3


2014年5月15日 星期四

IOzone 3.405

Phoronix Test Suite v4.8.3
System Information

Hardware:
Processor: AMD FX-8120 Eight-Core @ 3.10GHz (8 Cores), Motherboard: ASUS M5A99FX PRO R2.0, Chipset: AMD RD890 bridge, Memory: 16384MB, Disk: 250GB Western Digital WD2500AAJS-7 + 200GB Seagate ST3200827AS + 200GB Western Digital WD2000JD-00H + 4001GB Western Digital WD40PURX-64G + 4001GB Western Digital WD40EFRX-68W + 2 x 3001GB Seagate ST3000DM001-1CH1 + 3001GB Seagate ST3000DM001-9YN1 + 160GB Seagate ST9160821AS + 2 x 500GB Seagate ST3500418AS + 750GB Western Digital WD7500AALX-0 + 3001GB Western Digital WD30EURS-63S + 250GB Seagate ST3250310AS + 160GB Hitachi HDS72161 + 320GB Seagate ST3320620NS, Graphics: AMD Radeon HD 5000/6000/7350/8350 512MB, Audio: Realtek ALC892, Monitor: TV-2003, Network: Intel 82546EB Gigabit

Software:
OS: Ubuntu 14.04, Kernel: 3.13.0-24-generic (x86_64), Display Server: X Server 1.15.1, Display Driver: radeon 7.3.0, Compiler: GCC 4.8, File-System: btrfs, Screen Resolution: 1280x1024

  • 3外 - Silicon Image, Inc. SiI 3531 [SATALink/SATARaid] Serial ATA Controller (rev 01)
    • IOzone 3.405:
          pts/iozone-1.8.0 [Record Size: 4Kb - File Size: 8GB - Disk Test: Read Performance]
          Test 1 of 2
          Estimated Trial Run Count:    3
          Estimated Test Run-Time:      3 Minutes
          Estimated Time To Completion: 5 Minutes
              Started Run 1 @ 17:45:29
              Started Run 2 @ 17:46:29
              Started Run 3 @ 17:47:34  [Std. Dev: 1.36%]

          Test Results:
              2336.94921875
              2377.630859375
              2400.916015625

          Average: 2371.83 MB/s


      IOzone 3.405:
          pts/iozone-1.8.0 [Record Size: 4Kb - File Size: 8GB - Disk Test: Write Performance]
          Test 2 of 2
          Estimated Trial Run Count:    3
          Estimated Time To Completion: 3 Minutes
              Started Run 1 @ 17:48:39
              Started Run 2 @ 17:49:32
              Started Run 3 @ 17:50:24  [Std. Dev: 1.78%]

          Test Results:
              343.2763671875
              345.51953125
              334.0791015625

          Average: 340.96 MB/s
            

2014年5月8日 星期四

AIO-Stress 4+10(CyberSLIM S810-U3S)

AIO-Stress 0.21:
    pts/aio-stress-1.1.1
    Disk Test Configuration

Phoronix Test Suite v4.8.3
System Information

Hardware:
Processor: AMD FX-8120 Eight-Core @ 3.10GHz (8 Cores), Motherboard: ASUS M5A99FX PRO R2.0, Chipset: AMD RD890 bridge, Memory: 16384MB, Disk: 2 x 500GB Seagate ST3500418AS + 3001GB Western Digital WD30EURS-63S + 750GB Western Digital WD7500AALX-0 + 320GB Seagate ST3320620NS + 250GB Western Digital WD2500AAJS-7 + 200GB Seagate ST3200827AS + 250GB Seagate ST3250310AS + 200GB Western Digital WD2000JD-00H + 160GB Hitachi HDS72161 + 4001GB Western Digital WD40PURX-64G + 4001GB Western Digital WD40EFRX-68W + 3001GB Seagate ST3000DM001-1CH1 + 3001GB Seagate ST3000DM001-9YN1 + 60GB OCZ AGILITY3, Graphics: ASUS NVIDIA GeForce GT 520 2048MB, Audio: Realtek ALC892, Monitor: TV-2003, Network: Intel 82546EB Gigabit

Software:
OS: Ubuntu 14.04, Kernel: 3.13.0-24-generic (x86_64), Desktop: Unity 7.2.0, Display Server: X Server 1.15.1, Display Driver: nouveau 1.0.10, Compiler: GCC 4.8, File-System: btrfs, Screen Resolution: 1280x1024

  • Silicon Image, Inc. SiI 3124 PCI-X Serial ATA Controller (rev 01)
    •     Estimated Time To Completion: 4 Minutes
              Started Run 1 @ 19:45:59
              Started Run 2 @ 19:46:44
              Started Run 3 @ 19:47:22  [Std. Dev: 13.65%]
              Started Run 4 @ 19:48:06  [Std. Dev: 25.82%]
              Started Run 5 @ 19:48:38  [Std. Dev: 23.33%]
              Started Run 6 @ 19:49:22  [Std. Dev: 24.80%]

          Test Results:
              67.26
              88.51
              77.78
              120.07
              79.18
              121.01

          Average: 92.30 MB/s
       
  • Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
    •     Estimated Time To Completion: 4 Minutes
              Started Run 1 @ 00:30:10
              Started Run 2 @ 00:30:51
              Started Run 3 @ 00:31:16  [Std. Dev: 37.72%]
              Started Run 4 @ 00:31:40  [Std. Dev: 48.19%]
              Started Run 5 @ 00:32:24  [Std. Dev: 41.40%]
              Started Run 6 @ 00:32:49  [Std. Dev: 40.43%]

          Test Results:
              75.66
              129.92
              169.65
              55.53
              140.96
              83.64

          Average: 109.23 MB/s
       
  • Silicon Image, Inc. SiI 3531 [SATALink/SATARaid] Serial ATA Controller (rev 01)
    •     Estimated Time To Completion: 4 Minutes
              Started Run 1 @ 06:53:18
              Started Run 2 @ 06:54:01
              Started Run 3 @ 06:54:25  [Std. Dev: 38.74%]
              Started Run 4 @ 06:54:51  [Std. Dev: 49.75%]
              Started Run 5 @ 06:55:33  [Std. Dev: 42.55%]
              Started Run 6 @ 06:55:57  [Std. Dev: 39.78%]

          Test Results:
              71.95
              142.43
              166.68
              54.39
              141
              95.99

          Average: 112.07 MB/s
  • 4

2014年4月26日 星期六

多層硬碟外接盒之使用心得

外接盒:

大衛肯尼CyberSLIM S810-U3S 10層3.5吋硬碟外接盒
 

聯立EX-50

一起接上電腦,裡面放12顆大小不一之HDD。跑btrfs的RAID-5。


AIO-Stress 0.21:
    pts/aio-stress-1.1.1
    Disk Test Configuration

Phoronix Test Suite v4.8.3
System Information

Hardware:
Processor: Intel Core 2 Quad Q8400 @ 2.67GHz (4 Cores), Motherboard: ASUS P5QL-EM, Chipset: Intel 4 DRAM + ICH10, Memory: 6144MB, Disk: 3001GB Seagate ST3000DM001-1CH1 + 4001GB Western Digital WD40EFRX-68W + 4001GB Western Digital WD40PURX-64G + 3001GB Seagate ST3000DM001-9YN1 + 3001GB Western Digital WD30EURS-63S + 200GB Western Digital WD2000JD-00H + 250GB Western Digital WD2500AAJS-7 + 160GB Hitachi HDS72161 + 250GB Seagate ST3250310AS + 500GB Seagate ST3500418AS + 320GB Seagate ST3320620NS + 250GB Hitachi HDT722525DLA380 + 60GB OCZ AGILITY3, Graphics: Intel 4 IGP, Audio: Realtek ALC1200, Network: Realtek RTL8111/8168/8411

Software:
OS: Ubuntu 14.04, Kernel: 3.13.0-24-generic (x86_64), Display Server: X Server 1.15.1, Display Driver: intel 2.99.910, Compiler: GCC 4.8, File-System: btrfs, Screen Resolution: 1280x1024

btrfs:

Data, RAID5: total=20.28GiB, used=9.01GiB
System, RAID1: total=32.00MiB, used=16.00KiB
Metadata, RAID1: total=1.00GiB, used=19.86MiB

        Total devices 12 FS bytes used 9.03GiB
        devid    1 size 232.89GiB used 1.84GiB path /dev/sdi
        devid    2 size 232.89GiB used 1.84GiB path /dev/sdl
        devid    4 size 3.64TiB used 2.88GiB path /dev/sdb
        devid    5 size 2.73TiB used 1.84GiB path /dev/sde
        devid    6 size 298.09GiB used 1.84GiB path /dev/sdk
        devid    7 size 2.73TiB used 1.84GiB path /dev/sda
        devid    8 size 465.76GiB used 1.84GiB path /dev/sdj
        devid    9 size 3.64TiB used 2.88GiB path /dev/sdc
        devid    10 size 2.73TiB used 1.84GiB path /dev/sdd
        devid    11 size 186.31GiB used 1.84GiB path /dev/sdf
        devid    12 size 232.83GiB used 1.84GiB path /dev/sdg
        devid    13 size 149.05GiB used 1.84GiB path /dev/sdh

使用心得:

eSATA的port multiplier (PMP)分兩種:
  CBS   Supports Command Based Switching port multiplier
  FBS   Supports FIS Based Switching port multiplier
因為 RAID5 需要同時存取所有硬碟,所以有FBS才行。
  • Renesas Technology Corp. uPD720201 USB 3.0 Host Controller
    • EX-50沒有USB功能。
    • 只能使用S810-U3S(10層)中最多8顆硬碟,可能因為SATA->USB關係,最多就70-80MB/s左右。
    • NCQ不確定能不能用,另一個缺點是無法使用SMART。
  • Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
    •    Test Results:
              100.37
              125.01
              122.78
              102.51
              129.05
              130.42
          Average: 118.36 MB/s
    • 一片卡接兩個eSATA,就可以FIS控制十幾個硬碟(我用12~14個),很好用。
    • 聽說這個晶片的上限就是150MB/s左右,果不其然。
  • Silicon Image, Inc. SiI 3132 + SiI 3531
    • Test Results:
              144.09
              154.43
              161.83
              143.47
              163.34
              152.7
          Average: 153.31 MB/s
    • 兩個晶片分工合作,似乎有進步一點,但沒有達到我的期望(200MB/s)。
  • ASMedia Technology Inc. ASM1061 Serial ATA Controller
    • 似乎只能跑CBS,在我的測試環境下非常不穩,會當機。
    • 使用eSATA+PMP的話,非常不推薦。
  • HighPoint RocketRAID 622 (Marvell 9128)
    • 只能辨識5個硬碟,而且BIOS RAID的功能會使得OS看不到硬碟。
    • 使用eSATA+PMP的話,非常不推薦。
  • HighPoint Rocket 622A (Marvell 9128)
    • 一直出現PMP revalidation failed,根本無法使用。
    • 使用eSATA+PMP的話,非常不推薦。
  • Marvell Technology Group Ltd. Device 9215
    • 似乎只能辨識6個硬碟
    • 很久都開不了機
    • 下次再試試
  • ASUS M5A99FX PRO R2.0 (SB950) + Sil 3531
    •      Test Results:
              114.84
              131.7
              132.73
              137.52
              138.44
              128.12

          Average: 130.56 MB/s

          Test Results:
              138.72
              141.56
              97.98
              151.33
              85.06
              126.26

          Average: 123.49 MB/s
    • SB950可以用辨識超過5個(實測7個),沒遇到當機。
    • SB950的PMP雖然號稱FBS,但是效果看來比Sil 3132/3531還糟。
結論:
  • 感覺 SATA port multiplier 似乎是被放棄的技術,低階的機器用不到,高階的都跑去用 SAS 的技術了。不過若是不要太計較速度,SATA PMP 還是比較便宜。
  • 目前感覺只有 Silicon Image 的 SATA 3.0 Gbps 晶片可以比較好的支援 PMP,其他ASMedia和Marvell較新的 SATA 6.0 Gbps 晶片反而支援度都不好。
  • SiI 3132和SiI 3531雖然號稱 3.0 Gbps實際上可能只有 1.5 Gbps (150 MB/s),但已是目前最佳的選擇。下次試試 SiI 3124。








2013年11月25日 星期一

Radeon HD 6470M - LVDS-1: EDID block 0 invalid

Problem: Frequent pause is noted using 6470M with open source Radeon driver. Kernel reports EDID spam .... In dmesg: [ 2614.472893] Raw EDID: [ 2614.472895] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 2614.472897] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 2614.472898] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 2614.472900] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 2614.472902] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 2614.472903] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 2614.472905] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 2614.472907] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 2614.472909] radeon 0000:02:00.0: LVDS-1: EDID block 0 invalid. Solution: In /etc/modprobe.d/modprobe.conf: add options drm_kms_helper poll=0 The fix doesn't eliminate the problem but make it much less frequent and become tolerable.

2009年4月14日 星期二

webalizer中文乱码问题

webalizer是一个很优秀的apache日志分析工具,安装完之后,却出现乱码。Google了一下,发现下面这个方法最好使。在此记下,以备后用。

删除中文包,不用中文了。rm usr/share/locale/zh/LC_MESSAGES/webalizer.mo

2007年11月29日 星期四

vtkRenderWindowInteractor - provide event driven interface to rendering window

Mouse bindings:
camera: Button 1 - rotate
Button 2 - pan
Button 3 - zoom
ctrl-Button 1 - spin
actor: Button 1 - rotate
Button 2 - pan
Button 3 - uniform scale
ctrl-Button 1 - spin
ctrl-Button 2 - dolly.
Keyboard bindings (upper or lower case):
j - joystick like mouse interactions
t - trackball like mouse interactions
o - object/ actor interaction
c - camera interaction
r - reset camera view
w - turn all actors wireframe
s - turn all actors surface
u - execute user defined function
p - pick actor under mouse pointer (if pickable)
3 - toggle in/out of 3D mode (if supported by renderer)
e - exit
q - exit

2007年11月14日 星期三

Close but no Cigar for Netflix Recommender System

Close but no Cigar for Netflix Recommender System
Posted by CmdrTaco on Wednesday November 14, @10:00AMfrom the fifty-grand-aint-bad dept.

Ponca City, We Love You writes "In October 2006, Netflix, the online movie rental service, announced that it would award $1 million to the first team to improve the accuracy of Netflix's movie recommendations by 10% based on personal preferences. Each contestant was given a set of data from which three million predictions were made about how certain users rated certain movies and Netflix compared that list with the actual ratings and generated a score for each team. More than 27,000 contestants from 161 countries submitted their entries and some got close, but not close enough. Today Netflix announced that it is awarding an annual progress prize of $50,000 to a group of researchers at AT&T Labs, who improved the current recommendation system by 8.43 percent but the $1 million grand prize is still up for grabs and a $50,000 progress prize will be awarded every year until the 10 percent goal is met. As part of the rules of the competition, the team was required to disclose their solution publicly. (pdf)"

2007年11月10日 星期六

vlc on MyBookWorld

./configure --disable-ffmpeg

2007年11月2日 星期五

PHP on MyBookWorld

  1. install libxml2
  2. install libiconv
  3. sudo ln -sf /usr/local/lib/libxml2.so.2 /lib
  4. sudo ln -sf /usr/local/lib/libiconv.so.2 /lib
  5. ./configure --enable-fastcgi --enable-sockets
  6. make
  7. sudo make install

2007年11月1日 星期四

用Cygwin/rsync將Windows的檔案備份到Linux

有啥困難?大家都會,不是嗎?
再仔細想想,中文好像會有問題,對不對?
現在的Linux大部分都用UTF-8來處理中文檔名了吧!

說一下我的解法:
  1. 安裝Cygwin,別忘了把openssh和rsync也順便打勾唷!
  2. 安裝UTF-8 Cygwin
  3. 在~/.bashrc加入【alias ls="ls --show-control-chars"】,重進Cygwin Bash Shell
  4. 先ls看看您的中文檔名正不正常吧!
  5. 如果可以,rsync應該也可以囉!【rsync -auv /cygdrive/c/Incoming/* 10.0.0.3:Incoming】
  6. 趕快上你的Linux box看看中文檔名對不對吧!

重點就是UTF-8 Cygwin。對了,不習慣用Cygwin Shell的人,趕快去下載PuTTYcyg,超好用的。不過,別忘了Translation也要改成UTF-8,看中文檔名才OK唷!