浏览模式: 标准 | 列表 2012年11月的文章

取消了一台linode的VPS

手里有一台Linode的vps从购买那天至今从未宕机过(持续在线时间:161天),因为业务上暂时不需要了,就先取消掉好了。

比较人性化的事情就是取消掉的VPS会当机把该支付周期内的尾款按照天数退回至账户余额。

我的这款VPS位于日本机房,配置如下:

CPU:4核心Intel(R) Xeon(R) L5520  @ 2.27GHz

  • 内存:512M
  • SWAP:512M
  • 硬盘:20GB
  • 价格:19.95美元/月
  • 支付方式:双币信用卡

所在母鸡IP:tokyo83.linode.com [106.187.33.95]

VPS分配的IP:106.187.98.14X

如果本文对你有帮助并且你需要购买,这是我的推介通道:

http://www.linode.com/?r=a2771ffdad86fad8ad4d07eeb7e661812bdbd906

Tags: linode, vps, 稳定性, 取消

PayPal国内账户付款转账手续费

晚上转了一笔paypal给国内的账户,然后看了下PayPal国内账户付款转账手续费情况,如下:

国内pp账户转账有两种:

  • 从余额转账,手续费:1.5%+0.3USD
  • 从借记卡(信用卡)转账, 手续费:3.4%+0.3USD

不过来自PayPal的客服提醒这种操作不宜过多, PayPal可能会认为存在风险操作,会限制账户。

另外,来自跨国的收款交易,手续费是:3.9%+0.3USD

Tags: paypal, 转账手续费

云主机的数据盘丢失找回来

今天在测试一款云主机产品(其实就是VPS),国内喜欢偷换概念卖产品……

云主机可以安装Windows2003与CentOS6.2系统,在测试的过程中我将Windows2003系统切换至CentOS6.2系统后发现110G的数据盘丢失了……

这是个神奇的事情,本想直接让客服来搞,想想有时间就自己看了下,把数据盘都弄出来了。

过程如下:

 

[root@localhost ~]# df -h

  • 文件系统      容量  已用  可用 已用%% 挂载点
  • /dev/mapper/VolGroup-lv_root
  •                       7.5G  1.2G  5.9G  17% /
  • tmpfs                 2.5G     0  2.5G   0% /dev/shm
  • /dev/sda1             485M   65M  395M  14% /boot 

[root@localhost ~]# ll /dev/sd*

  • brw-rw---- 1 root disk 252,  0 11月  8 12:55 /dev/sda
  • brw-rw---- 1 root disk 252,  1 11月  8 12:55 /dev/sda1
  • brw-rw---- 1 root disk 252,  2 11月  8 12:55 /dev/sda2
  • brw-rw---- 1 root disk 252, 16 11月  8 12:55 /dev/sdb

 [root@localhost ~]# fdisk /dev/sdb

  • Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
  • Building a new DOS disklabel with disk identifier 0xadb9341e.
  • Changes will remain in memory only, until you decide to write them.
  • After that, of course, the previous content won't be recoverable.
  •  
  • Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
  •  
  • WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
  •          switch off the mode (command 'c') and change display units to
  •          sectors (command 'u').
  •  
  • Command (m for help): p
  •  
  • Disk /dev/sdb: 118.1 GB, 118111600640 bytes
  • 16 heads, 63 sectors/track, 228855 cylinders
  • Units = cylinders of 1008 * 512 = 516096 bytes
  • Sector size (logical/physical): 512 bytes / 512 bytes
  • I/O size (minimum/optimal): 512 bytes / 512 bytes
  • Disk identifier: 0xadb9341e
  •  
  •    Device Boot      Start         End      Blocks   Id  System
  •  
  • Command (m for help): new
  • Command action
  •    e   extended
  •    p   primary partition (1-4)
  • p
  • Partition number (1-4): 1
  • First cylinder (1-228855, default 1): 
  • Using default value 1
  • Last cylinder, +cylinders or +size{K,M,G} (1-228855, default 228855): 
  • Using default value 228855
  •  
  • Command (m for help): p
  •  
  • Disk /dev/sdb: 118.1 GB, 118111600640 bytes
  • 16 heads, 63 sectors/track, 228855 cylinders
  • Units = cylinders of 1008 * 512 = 516096 bytes
  • Sector size (logical/physical): 512 bytes / 512 bytes
  • I/O size (minimum/optimal): 512 bytes / 512 bytes
  • Disk identifier: 0xadb9341e
  •  
  •    Device Boot      Start         End      Blocks   Id  System
  • /dev/sdb1               1      228855   115342888+  83  Linux
  •  
  • Command (m for help): w
  • The partition table has been altered!
  •  
  • Calling ioctl() to re-read partition table.
  • Syncing disks.

[root@localhost ~]# mkfs -t ext3 /dev/sdb1

  • mke2fs 1.41.12 (17-May-2010)
  • 文件系统标签=
  • 操作系统:Linux
  • 块大小=4096 (log=2)
  • 分块大小=4096 (log=2)
  • Stride=0 blocks, Stripe width=0 blocks
  • 7208960 inodes, 28835722 blocks
  • 1441786 blocks (5.00%) reserved for the super user
  • 第一个数据块=0
  • Maximum filesystem blocks=0
  • 880 block groups
  • 32768 blocks per group, 32768 fragments per group
  • 8192 inodes per group
  • Superblock backups stored on blocks: 
  • 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
  • 4096000, 7962624, 11239424, 20480000, 23887872
  •  
  • 正在写入inode表: 完成                            
  • Creating journal (32768 blocks): 完成
  • Writing superblocks and filesystem accounting information: 完成
  •  
  • This filesystem will be automatically checked every 39 mounts or
  • 180 days, whichever comes first.  Use tune2fs -c or -i to override.

[root@localhost ~]# mkdir /data 

[root@localhost ~]# mount -t ext3 /dev/sdb1 /data

[root@localhost ~]# df -h

  • 文件系统      容量  已用  可用 已用%% 挂载点
  • /dev/mapper/VolGroup-lv_root
  •                       7.5G  1.2G  5.9G  17% /
  • tmpfs                 2.5G     0  2.5G   0% /dev/shm
  • /dev/sda1             485M   65M  395M  14% /boot
  • /dev/sdb1             109G  188M  103G   1% /data

[root@localhost ~]# echo "/dev/sda1 /data ext3 defaults 0 0">>/etc/fstab

 

Tags: 云主机, 数据盘, fdisk

解决SSH终端下中文乱码问题

执行如下指令即可:

echo "export LC_ALL=C">>/etc/profile

Tags: ssh, 中文乱码