Posts mit dem Label linux werden angezeigt. Alle Posts anzeigen
Posts mit dem Label linux werden angezeigt. Alle Posts anzeigen

Sonntag, 20. Dezember 2009

"reset high speed USB device using ehci_hcd and address 5"

Das Problem
usb 1-6: reset high speed USB device using ehci_hcd and address 5
beim Umgang mit USB Speicher ist mir ein paar mal bereits untergekommen - jetzt habe ich eine Lösung ... bzw. einen workaround.

Quelle: http://ubuntuforums.org/showthread.php?t=163716 (habe mehrere Fundstellen gefunden, das ist eine davom)

In Ubuntu gehts so:
  1. herrausfinden, wie die festplatte heißt. Im Syslog ("/var/log/messages"). geht z.B. mit "dmesg | grep "Attached SCSI disk" | tail -n 1" (gibt zuletzt angeschlossenes USB-Gerät aus. in meinem Beispiel ist die Wechslplatte "sdf"
  2. als root folgenden Befehl absetzen: echo 128 > /sys/block/sdf/device/max_sectors Bei meinem "Ubuntu Karmic Koala" war der Standardwert 240.
Das Problem tritt quer über verschiedene Host-Controller mit bestimmten Endgeräten auf. Es scheint am Endgerät zu liegen (was für mich eine eher überraschende Erkenntnis war).

Die Änderung teilt dem Treiber mit, wie viele sektoren aus dem Speichern gleichzeitig gelesen/geschrieben werden dürfen - es ist also eine Performance-Sache. Genauere Informationen in der Linux USB FAQ.

Time Machine wiederhergestellt

Hat funktioniert, das Backup ist wiederhergestellt. Es hatte dann doch "nur" 4 Stunden gedauert....

Während dem Warten: So kann man aus Linux auf die Time Machine Backups zugreifen: http://www.macosxhints.com/article.php?story=20080623213342356. Gemeinerweise mann man das "Grundfilesystem" lesen, nur kommen man nicht an die Daten. Apple hat gar keine Hardlinks verwendet (was ich eigentlich erwartet hatte - was ich logisch finden würde), sondern hat einen Hardlink-Mechanismus irgendwie in das Dateisystenm gehackt. Apple ist so möglicherweise kompatibler zu Protokollen wie CIFS/SMB?? Ich finde das eigentlich unsinnig - echt hardlinks hätte ich mir gewünscht.

Das "Time Machine" für Linux kann echte hardlinks verwenden: dirvish ist seit mehr als 5 Jahren stabil und legt echt hardlinks an (mittels rsync). Der Scharm an einer solchen Technik ist, dass jedes Betriebssystem, das das verwendete Filesystem kennt, auch alles notwendige zum Backup wiederherstellen an Bord hat. Und das ist mir bei einem Backup eigentlich recht wichtig!

Mittwoch, 10. Dezember 2008

I've just descided to use HFS+ without jounalling for my new disks.

My main operating system ist currently MacOS and Linux, these can read and write HFS+ (linux can only read HFS+journaled, so i've got to disable jounalling)

Windows will only access these disks via samba, if i need this. bad, bus possible.

Montag, 1. Dezember 2008

Filesystems for any OS... (2)

ext2 for mac is last updated in 2006. well, don't know if i want to use this in Leopard (from 2007).

Now I start thinking about NAS Storage with NFS and CIFS. But NAS is quite expensive :-(

Sonntag, 23. November 2008

Filesystems for any OS...

I'm just thinking about filesystems on my next USB-Backup Disk.

Status

Currently i have backup disks formatted with FAT32 (for use with all OS), AFS (for OS X-Time Machine) and ext3 (for linux backups). My main backup disks formatted with FAT, because at this time "Mac OS X" did not support anything other.
I currently plan to by new disks, so it's time to think about this filesytem-mix (or filesystem-mess).


needed Features

Here are my features, i'm dreaming of:
  • journalling: my backup disk should be able to hold my data, even if the OS crashes the disk losses power.
  • filesize: it would be nice to be able to store at least 4.7GB ISO-DVD-Images (i sometime master the images on one PC, but burn on a differen one) and to store my full-length DVB-?-Movies (captured from TV) on the disk without splitting.
  • hardlinks: Do you know Apple's time machine? then you know why hardlinks are something fantastic. you can copy wih "rsync --links-desk=..." and have something like a versioned backup for your data. The best: you do incremental backups, but can delete old backups as if they are full backups.
i do need the backup with several Operating systems. If my Macbook is sunk in the toilette, i'd like to access my data via linux or windows. (Which is quite difficult, i i have only the time machine backup - who can read AFS with this apple partitioning??)


Possibilities

a bigger and maybe for you better ist is en.wikipedia.org/wiki/Comparison_of_file_systems

FAT32

  • OS-Support: excellent
  • biggest filesize: 4GB (bad)
  • journalling: no, but many tools can repair FAT.
  • hardlinks: no

NTFS

  • OS-Support: not sufficient:
    • win: excellent,
    • linux: good (ntfs-3g: read/write),
    • mac: native: read-only, ntfs-3g should works
  • biggest filesize: 16TBGB (but not shure, if anyone but win can read >4GB-Files)
  • journalling: yes (at least with win, not shure what ntfs-3g does here)
  • hardlinks: yes

ext3

  • OS-Support: good
    • win: http://www.fs-driver.org/ -> without journalling
    • linux: native
    • mac: not shure yet (wikipedia say's: "possible with ext2fsx" -> without journalling)
  • biggest filesize: 16GB (enough)
  • journalling: yes (not windows)
  • hardlinks: yes
Looking at the above mentioned list at wikipedia, i guess these are all i can choose.


Results

I don't like to use NTFS, because it is not open sources and with each new windows version, i'm not shure if features are added that break my linux/mac (write) support. The restore possibillities are either cost money or come from Microsoft. The tools from MS are okay, i guess, but i the need windows to repair. This is dangerous in an emergency! (Just try to find a Windows-Live-CD...)

FAT32 is ancient, though it lack eatures of modern files systems. I will use this filessystem on "transfer usb disks" because anyone can read/write this without problems.

ext2/3 i'm not shure about this. the Mac ext2fsx project has a beta from 11/2006, Leopard appeared 10/2007. The filesystem itself has all features i need. Read/write support for windows and Linux is good, but Mac.... .

Anyone knows a better alternative?



Links

The Blogosphere seems to prefere "ext2/3"

Sonntag, 16. Dezember 2007

Identify Programs consuming much Memory from command line

I'll use two commands here: "free" and "ps".

Because my Laptop own's only 512 MB RAM and has a terrible slow hard disk drive, I try to optimize my memory. (the more RAM Cache i have, the better!)

To see, how much memory is currently used:

$ free -m
total used free shared buffers cached
Mem: 503 492 10 0 11 196
-/+ buffers/cache: 285 218
Swap: 1004 134 869



Short interpretation of there lines:
- the "-m" switch: use unit "MBytes"
- i have 512 MB RAM (max availbale is 503 MB, the 9 MB difference is eaten by the linux kernel)
- My applications currently need 285 MB physical RAM and 134 MB SWAP
- 218 MB physical RAM is not used by applications, but used from Linux to spped up my sy for disk cache - 285 MB + 11 MB + 196 MB = 492 MB (used physical RAM)
- 10 MB are "wasted" (not currently used). This may be memory which was freed by an application, which i closed a few seconds ago.


Now, which applications are using the 285 MB physical Memory?? (see http://m0han.blogspot.com/2007/05/howto-profile-memory-in-linux-system.html)


$ ps -eo user,pid,rss,vsize,pcpu,pmem,cmd -ww --sort=rss
USER PID RSS VSZ %CPU %MEM CMD
[...]
jolzer 5659 10844 34016 0.0 2.1 kdesktop [kdeinit]
jolzer 5682 12224 56964 1.4 2.3 psi -session 10145140d8a1000119770190900000056460050_1197759181_634572
jolzer 5694 12224 34604 0.0 2.3 konsole [kdeinit] -session 10145140d8a10001197749424000000
jolzer 5646 12692 54752 0.1 2.4 kded [kdeinit] --new-startup
jolzer 5661 15616 43964 0.1 3.0 kicker [kdeinit]
jolzer 5693 19940 57608 0.2 3.8 krusader -session 10145140d8a1000119773080200000056060020_1197759181_635552
root 5097 69672 88644 1.8 13.5 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/xauth/A:0-TRonOl
jolzer 5688 103524 187552 0.5 20.0 digikam -session 10145140d8a1000119772494000000056060017_1197759181_635294
jolzer 12315 114272 295228 12.0 22.1 /usr/lib/firefox-3.0/firefox-3.0


Most interesting here is the third column: "RSS" ("Resident Set Size") - This shows in KB, how much physical RAM is needed by the process. (swapped out Memory is not counted)

Second most interesting is the fourth column: "VSZ" = "VSIZE" = "Virtual memorysize" = Memory inclusive "swapped out memory".

So you see, i'm using "Firefox Gran Paradiso" (3.0 beta) at this time, which is taking 114MB of my physical memory. By the way, to reduce the memory firefox need, thy search the internet for "firefox reduce memory" - here two good links:
- http://www.firefox-browser.de/wiki/FAQ:Speicherbedarf (german)
- http://kb.mozillazine.org/Reducing_memory_usage_-_Firefox (english)

I've created a small shell script:
(filename "~/bin/jzps")

#!/bin/bash
ps -eo user,pid,rss,vsize,pcpu,pmem,cmd -ww --sort=rss
echo "-- "
free -m


I use this command everytime, my linux gets slower and so i'll learn, which applications eat up too much memory.

But: Don't trust these numbers!!!

Reason: Applications also use "shared memory", which may by used by more than one process.

Workaround: To see, how much memory is really used, use, "free -m" before and after starting the application. This value is more accurate, but difficult to handle: if you are observice memory usage of firefox while surfing, you (and your system!) must not start any other programs.... If you quit firefox, "free -m" should show the same amount of free memory like it showed first.