Skip to main content

Posts

Local-link Address (LLA, 169.254.0.0/16) networking on Debian/Ubuntu Linux How To

Instructions for connecting external IP devices to the second NIC on a Debian/Ubuntu box using Local-link Address networking (169.254.0.0/16) e.g. connecting a Axis 206M camera. Install on the Debian/Ubuntu PC: dhcp3-server avahi-autoipd To configure dhcpd, add the following lines to /etc/dhcp3/dhcpd.conf: subnet 169.254.0.0 netmask 255.255.0.0 { range 169.254.8.2 169.254.8.20; } Add a route to 255.255.255.255 to the second NIC in order to send UDP broadcast traffic to it. This is accomplished by the last two lines below in /etc/network/interfaces: % cat /etc/network/interfaces auto lo eth0 eth1 iface lo inet loopback address 127.0.0.1 netmask 255.0.0.0 iface eth0 inet dhcp iface eth1 inet dhcp post-up route add -net 255.255.255.255 netmask 255.255.255.255 metric 99 dev eth1 post-down route del -net 255.255.255.255 netmask 255.255.255.255 metric 99 dev eth1

Idea: Relatively Reliable Ram Drive Server

Idea:Relatively Reliable Ram Disk Server (specs updated 2012-Q2) Two commodity servers Parts (for each) MB with 8 or 16 DIMM slots Two 10G ethernet cards for storage SATA RAID Four smallish enterprise drives: Two drives in a mirrored pair for OS Two drives for backing store 32GB DIMMs of ECC Registered RAM Parts for file server node Bonded pair of 1G or 10G cards Building Make a large RAM disk on each (leave 2GB for OS) On one machine: Share the RAM disk with the other machine via one crossover network (one of the 10G cards on each machine) via iSCSI Share pair of backing drives via iSCSI On other machine (file server) Using md, on each, mirror the iSCSI RAM disk to the local RAM disk. Make a filesystem on mirrored RAM disk Share RAM filesystem via NFS and SAMBA. Combine iSCSI drives and local drives into RAID 0+1 backing store.  Make journaled filesytem on backing store disk. Mount backing store Put each server on a sizable independent UPS...

How to share files from Linux to Mac OS X with NFS

1. Install the NFS server packages on your Linux machine 2. Place the following in you /etc/exports /path/to/share/ ip.of.nfs.client(rw,sync,insecure) For example: /home/user/ 192.168.1.15(rw,sync,insecure) Note the "insecure". 3. Restart your NFS services on the Linux machine 4. On Mac OS X type Command-K in Finder. 5. Type in nfs://ip.of.nfs.server/path/to/share/. For example: nfs://192.168.1.15/home/user/ 6. Click connect. You should get a Finder window into the NFS share. Things to consider if the connection fails: Is your server running a firewall? If so, have you allowed NFS? If your server is running a firewall and does not need to (e.g. it and the client are in a trusted network), you may want to turn it off. Do you have the correct IP address in /etc/exports on the Linux server? This is the IP address of the Mac OS X machine. Note that you can use the hostname as well if you have DNS set up or are using hosts files.

Method for finding disk space faster than du.

Mount all of the areas with your data with unique paths. E.g., /mnt/fileserver1/mystuff, /mnt/fileserver2/mystuff, etc. With cron, do periodic 'find -ls' runs to a file across all of you personal paths. To count a certain directory: cat find_ls_file | awk ' /^some\/sub\/path/ {sum += $7} END  { gb=(sum/1024/1024/1024); printf"%0.2f GB\n",gb}' where find_ls_file holds the results of your find.  Even more useful is adding up any pattern, e.g., all .xvid files. cat find_ls_file | awk ' /\.xvid/ {sum += $7} END  { gb=(sum/1024/1024/1024); printf"%0.2f GB\n",gb}' Also, be sure to exclude snapshot directories from your find, if you have them (e.g., NetApp, ZFS) Another advantage of this method is parallelism. You can farm out the finds if you need to. Cheers, Adam