OpenWrt TP-LINK TL-WR703N 3G

Problem:
Aug  2 00:04:46 OpenWrt daemon.info pppd[9652]: Serial connection established.
Aug  2 00:04:46 OpenWrt daemon.info pppd[9652]: Using interface 3g-WAN
Aug  2 00:04:46 OpenWrt daemon.notice pppd[9652]: Connect: 3g-WAN <--> /dev/ttyUSB0
Aug  2 00:05:13 OpenWrt daemon.notice pppd[9652]: Modem hangup
Aug  2 00:05:13 OpenWrt daemon.notice pppd[9652]: Connection terminated.
Aug  2 00:05:14 OpenWrt daemon.info pppd[9652]: Exit.
Aug  2 00:05:14 OpenWrt daemon.notice netifd: Interface 'WAN' is now down

Solution:
config 'interface' 'wan'
        ...
        option pppd_options 'debug noipdefault'

+ SET CORRECT TIMEZONE!

Partition GPT more than 2TB. For instance 4 TB :)

No problem!

parted /dev/cciss/c0d1p1
mklabel gpt
mkpart primary ext4 1 -1 # 1 and -1 mean from begining to end of table = whole disc.
quit

And finish: mkfs.ext4 /dev/cciss/c0d1p1

But…

Sometimes: Warning: The resulting partition is not properly aligned for best performance.
So: Write from 0% to 100%

(parted) mkpart
Partition name?  []? w-raid
File system type?  [ext2]? ext4
Start? 0%
End? 100%

Microsoft Access 2000/2003 samba sharing multiuser

Working config.

[bazy]
admin users = @admin
available = yes
comment = Bazy
path = /home/share/bazy
public = yes
browsable = yes
writable = yes
force user = root
force group = dr_all
force create mode = 0777
directory mask = 0777
inherit permissions = yes
level2 oplocks = no
oplocks = no
#
write list = @dr_group,@admin

[CISCO] Multihoming BGP subnetting

When we have IP class 91.240.24.0 with /24 and want to subnet it in our LAN, after split it, BGP has stop working.

Solution:

ip route 91.230.24.0 mask 255.255.255.0 null 0

router bgp 12345
network 91.230.24.0 mask 255.255.255.0

[resolved!] The file /boot/grub/stage1 not read correctly

Chrooted, just install grub, and done!

# grub-install /dev/sda
The file /boot/grub/stage1 not read correctly.

WTF? Ok, i know another way…

# grub
grub> root (hd0,0)
 Filesystem type is ext3, partition type 0x83

grub> setup (hd0)
 Checking if "/boot/grub/stage1" exists... no
 Checking if "/grub/stage1" exists... no

Error 15: File not found

grub> find /boot/grub/stage1

Error 15: File not found

Gruub, what wrong with You!

After small investigation, i am sure. Grub have a bug.

Look:

# tune2fs -l /dev/sda1 | grep -i 'inode size’

Probably You see: 256

But grub work’s correct only with 128

How to workaround it?

# mkfs.ext3 -I 128 /dev/sda1

But remember – all data from disk will be erased!

Explanation:

e2fsprogs ? 1.40.5 creates ext3 filesystems with 256 byte large inodes by default (in contrast to 128 byte used before), to accommodate for further ext4 related changes… Using any of these new features requires updating the bootsector of your system. Bootsectors written by „grub or earlier versions of „grub-gfxboot” are not able to boot or even access partitions using any of these new features!

ESX / ESXi / ESX5 / ESX6 / ESX 6.7 / VmWare – Rescan SCSI disk / partition – hot add

If You want to rescan new size partition after increasing drive at vmware, use:

echo 1 > /sys/class/scsi_device/2\:0\:4\:0/device/rescan

(or script)

for id in `ls -1 /sys/class/scsi_device/`; do echo 1 > /sys/class/scsi_device/$id/device/rescan; done

If You want to rescan new drive after hot added them at vmware, use:

echo "- - -" > /sys/class/scsi_host/host#/scan

(or script)

for id in `ls -1 /sys/class/scsi_host | grep -v "\." | sed 's/@//g'`; do echo "- - -" > /sys/class/scsi_host/$id/scan; done

Without reboot! 😉

Zarezerwowane 5% dysku w linuxie…

Zdarza sie, że system rezerwuje sobie 5 % ( standardowo ) dsku na swoje potrzeby. Ok. Ale czy każda partycja tyle musi mieć?

To sprawdźmy, ile masz kotku rezerwacji w środku?

tune2fs -l /dev/sda1 | grep -i reserved

To może nie tak zachłannie. Zostawmy 3%.

tune2fs -m 3 /dev/sda1

Dziękuję!