Menu

curlftpfs fails when using with ntfsclone

Help
2007-07-24
2013-05-02
  • Steven Shiau

    Steven Shiau - 2007-07-24

    curlftpfs is really a nice program. I love it.
    However, when I tried to dump file using ntfsclone, and save it in the directory mounted by curlftpfs, it fails.

    This is how to reproduce the error:
    A simple script to mount ftpfs by curlftpfs, mntcurlftpfs:
    -----------------
    #!/bin/bash
    mode=$1
    echo "Passwd ?"
    read -s passwd
    ftp_srv=192.168.120.254
    ftpfs_dir=images
    ocsroot=/mnt
    user_pwd_pair="steven:$passwd"
    [ -n "$mode" ] && opt="-d -v -o ftpfs_debug"
       curlftpfs ftp://$ftp_srv/$ftpfs_dir $ocsroot $opt -o direct_io,kernel_cache,nonempty,user=$user_pwd_pair
    -----------------
    First, mount the ftpfs with debug options:
    ./mntcurlftpfs debug

    Make sure it's successful:
    df | grep -i curlftpfs
    curlftpfs            7999999992         0 7999999992   0% /mnt

    Then I run:
    dd if=/dev/hda1 of=/mnt/ntfs.dump

    This is the results from dd:
    ----------------------------------
    dd: writing to `/mnt/ntfs.dump': Software caused connection abort
    dd: closing output file `/mnt/ntfs.dump': Transport endpoint is not connected

    This is the console about the curlftpfs debug messages:
    ----------------------------------
    ...
    WRITE[134845384] 512 bytes to 134215168
    1185302566 ftpfs.c:799 ftpfs_write: 512 134215168
       WRITE[134845384] 512 bytes
       unique: 262145, error: 0 (Success), outsize: 24
    unique: 262146, opcode: WRITE (16), nodeid: 2, insize: 576
    WRITE[134845384] 512 bytes to 134215680
    1185302566 ftpfs.c:799 ftpfs_write: 512 134215680
       WRITE[134845384] 512 bytes
       unique: 262146, error: 0 (Success), outsize: 24
    unique: 262147, opcode: WRITE (16), nodeid: 2, insize: 576
    WRITE[134845384] 512 bytes to 134216192
    1185302566 ftpfs.c:799 ftpfs_write: 512 134216192
       WRITE[134845384] 512 bytes
       unique: 262147, error: 0 (Success), outsize: 24
    unique: 262148, opcode: WRITE (16), nodeid: 2, insize: 576
    WRITE[134845384] 512 bytes to 134216704
    1185302566 ftpfs.c:799 ftpfs_write: 512 134216704
       WRITE[134845384] 512 bytes
       unique: 262148, error: 0 (Success), outsize: 24
    unique: 262149, opcode: WRITE (16), nodeid: 2, insize: 576
    WRITE[134845384] 512 bytes to 134217216
    1185302566 ftpfs.c:799 ftpfs_write: 512 134217216
    ftpfs: memory allocation failed
    ----------

    Besides, I tried with ntfsclone:
    ntfsclone --save-image --overwrite /mnt/ntfsclone.dump /dev/hda1

    This is the results from ntfsclone:
    ----------------------------------
    ntfsclone v1.13.1 (libntfs 9:0:0)
    NTFS volume version: 3.1
    Cluster size       : 4096 bytes
    Current volume size: 8578932736 bytes (8579 MB)
    Current device size: 8578934784 bytes (8579 MB)
    Scanning volume ...
    100.00 percent completed
    Accounting clusters ...
    Space in use       : 1884 MB (22.0%)  
    Saving NTFS to image ...
    ERROR(103): Write failed: Software caused connection abort
    ----------------------------------

    This is the console about the curlftpfs debug messages:
    ----------------------------------
    ...
    WRITE[134848104] 1 bytes to 134234406
    1185302081 ftpfs.c:799 ftpfs_write: 1 134234406
       WRITE[134848104] 1 bytes
       unique: 65565, error: 0 (Success), outsize: 24
    unique: 65566, opcode: WRITE (16), nodeid: 2, insize: 4160
    WRITE[134848104] 4096 bytes to 134234407
    1185302081 ftpfs.c:799 ftpfs_write: 4096 134234407
       WRITE[134848104] 4096 bytes
       unique: 65566, error: 0 (Success), outsize: 24
    unique: 65567, opcode: WRITE (16), nodeid: 2, insize: 65
    WRITE[134848104] 1 bytes to 134238503
    1185302081 ftpfs.c:799 ftpfs_write: 1 134238503
       WRITE[134848104] 1 bytes
       unique: 65567, error: 0 (Success), outsize: 24
    unique: 65568, opcode: WRITE (16), nodeid: 2, insize: 4160
    WRITE[134848104] 4096 bytes to 134238504
    1185302081 ftpfs.c:799 ftpfs_write: 4096 134238504
    ftpfs: memory allocation failed
    ----------

    Looks like it's the memory problem. Actually this problem occurs in those similar programs, like dd, ntfsclone and partimage.
    Any plan to fix that ?

    BTW, it would be a good idea to provide an option "--interactive-password" with curlftpfs, so the password won't be explicit.
    Thanks.

     
    • Robson Braga Araujo

      Is the amount of bytes you're trying to upload bigger than your memory? This is a known problem due to be solved in the next release (pretty soon).

      You can have interactive password using -o user=user. If you don't put the password curlftpfs will ask you for one.

       
    • Steven Shiau

      Steven Shiau - 2007-08-02

      Great! Nice to hear that.
      Yes, the data uploaded is larger than the memory.
      Thanks.

       
    • Steven Shiau

      Steven Shiau - 2007-08-29

      Any idea when will this bug be fixed ?
      Thanks in advance.

       

Log in to post a comment.