Much ado about scripting, Linux & Eclipse: card subject to change

Showing posts with label fat32. Show all posts
Showing posts with label fat32. Show all posts

2010-06-21

pogoplug network attached storage (NAS) for linux, mac, windows

A couple months ago I bought a PogoPlug. Because it's an ungodly pink colour and because I've been hella busy with other stuff, I finally unboxed it today, and discovered that while:

... setting it up for Linux was not entirely trivial.

While the above article helped, a couple points were not immediately obvious:

  • If you mount the drive as root, it's not accessible as anyone else; if you mount as the user, not even root can read it.
  • Use of a /etc/pogoplugfs.conf file is highly recommended, so that you can log in w/o having to key in your username and password every time. Create this file as root, and set it chmod 644 if not already:
    svcuser=you@email-provider.com
    svcpassword=web-login-password
    logseverity=10
  • To automount the drive on startup (eg., on my old xubuntu 6 system), as root, try creating a new file, /etc/init.d/pogoplug:
    #! /bin/sh
    ### BEGIN INIT INFO
    # Provides:          
    # Required-Start:    $remote_fs $syslog
    # Required-Stop:     $remote_fs $syslog
    # Should-Start:      $named
    # Default-Start:     2 3 4 5
    # Default-Stop:      1
    # Short-Description: pogoplug fs mount as myusername
    # Description:       pogoplug fs mount as myusername
    ### END INIT INFO
    
    sudo -u myusername /usr/bin/pogoplugfs --mountpoint /media/pogoplug
    
    exit 0
  • Then, to activate this file, as root:
    chmod +x /etc/init.d/pogoplug; \
    for x in 2 3 4 5; do \
      cd /etc/rc${x}.d; ln -s /etc/init.d/pogoplug S99pogoplug; \
    done

With Fedora 12, I could simply create a startup task using System < Preferences < Startup Applications from the gnome menu.

2009-01-02

ext3 vs. fat32: fsck benchmark

It's been ages since I fsck'd my two Western Digital MyBook USB drives. I was amazed just how much longer it takes to check fat32 drives compared to ext3 ones. sdb is a 250G drive; sdc is a 320G drive. Both contain a mix of file types and sizes, and both have two partitions - one fat32, one ext3. My original reason for this split was that at the time I was dual-booting Windows/Linux, and support for writing to NTFS in Linux and to ext3 from Windows was at the time less that optimal. My next drive will be ext3, or perhaps something even newer (ext4? reiserfs?).

Here's the data from this semi-scientific comparison, which says that ext3 is faster by at least an order of magnitude:

Partition, Type Fsck Time (hour) Free Space (G) Used Space (%) Used Space (G) Size (G)
sdc1, fat32 43.1 22 87 138 159
sdb1, fat32 10.9 4.7 89 35 40






sdb2, ext3 2.2 6.8 97 171 188
sdc3, ext3 0.9 17 88 115 138

And here's the `fsck` & `df -h` output:

/dev/sdb1: 40G 35G 4.7G 89%
/dev/sdb1: 18367 files, 4567286/5181919 clusters
Elapsed: 10.9 hours
/dev/sdc1: 159G 138G 22G 87%
/dev/sdc1: 1032 files, 8992148/10370914 clusters
Elapsed: 43.1 hours
/dev/sdb2: 188G 171G 6.8G 97%
/dev/sdb2: 223588/50692096 files (2.4% non-contiguous), 46338930/50675034 blocks
Elapsed: 2.2 hours
/dev/sdc3: 138G 115G 17G 88%
/dev/sdc3: 8946/18333696 files (29.8% non-contiguous), 30330767/36638240 blocks
Elapsed: 0.9 hours