Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Liar liar pants on fire

  • 09-04-2008 2:02pm
    #1
    Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭


    So.....I have an 8G memory stick (not the one in the thread below). It is a totally legit sandisk M2 with pro duo adapter. I use it in my PSP.

    My problem is this: Linux incorrectly reports free space on the device. It says that 7G is in use, but in fact, less than 4G are. Windows correctly reports free space. I have tried using a card reader and the PSP in linux and both report the same free space. Attempting to write more than what linux reports as the free space results in failure because of a full device.

    du reports correct usage. df is full of lies. Output of both below.

    Any ideas?
    paul@newbox:~$ df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/md0              229G   82G  148G  36% /
    varrun                1.5G  144K  1.5G   1% /var/run
    varlock               1.5G     0  1.5G   0% /var/lock
    procbususb            1.5G  140K  1.5G   1% /proc/bus/usb
    udev                  1.5G  140K  1.5G   1% /dev
    devshm                1.5G     0  1.5G   0% /dev/shm
    lrm                   1.5G   33M  1.5G   3% /lib/modules/2.6.20-16-generic/volatile
    /dev/sde1             7.6G  7.0G  532M  94% /media/disk
    paul@newbox:/media/disk$ du -hc --max-depth=1 /media/disk/
    2.0G    /media/disk/PSP
    201M    /media/disk/ISO
    96K     /media/disk/MP_ROOT
    269M    /media/disk/MUSIC
    957M    /media/disk/PICTURE
    32K     /media/disk/VIDEO
    3.4G    /media/disk/
    3.4G    total
    


Comments

  • Closed Accounts Posts: 3,981 ✭✭✭[-0-]


    What filesystem type is it and how did you mount it?


  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    It's FAT32. It got automounted both times (card reader and psp).


  • Registered Users, Registered Users 2 Posts: 220 ✭✭dueyfinster


    I had a similar problem; the integrity of the disk was damaged by Windows (well I couldn't eject it as I had not got the relevant permissions as I was on a college dumb terminal - so sorta my fault.) Even though it was messed up in windows; I could write data no problem; but the odd few files wouldn't get written. Linux took extra time to mount it and couldn't report accurately stats on the key; maybe this has something to do with it?


  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    Well....I tar'd up the contents of the stick then formatted it and untar'd the contents back onto it and it's now correctly reporting free space. I'd still like to find a solution. My sons (definitely legit) 4G memory stick is also incorrectly reporting free space.


  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    maybe this has something to do with it?

    Nah, I'm very careful to mount / unmount correctly. Thanks though. Keep em coming.


  • Advertisement
  • Closed Accounts Posts: 7,563 ✭✭✭leeroybrown


    As far as I remember FAT32 filesystems have a 'free_clusters' counter that the Linux kernel driver uses. Apparently, recent versions of Windows use a FAT32 driver that doesn't bother to update the counter anymore. Needless to say this wasn't documented.


  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    I see. I see. So if I get a more recent kernel I may see this fixed?

    I can use FAT16 on the 4G stick (I'll report back if this works out), but obviously I'm stuck with FAT32 for the 8G one.


  • Closed Accounts Posts: 3,981 ✭✭✭[-0-]


    It could also be an issue with udev. I had a similar issue with fat32 on my eeepc. I updated udev and this resolved it - it's why I was asking what filesystem type it was. :)

    Maybe see if you can update udev? If that doesn't work try a newer kernel. Glad you got a work around for now though.


  • Moderators, Regional Midwest Moderators Posts: 11,183 Mod ✭✭✭✭MarkR


    No chance it was something in a .trash file?


  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    MarkR wrote: »
    No chance it was something in a .trash file?

    I thought that, but du should have picked that up.

    I've basically narrowed down the problem to this: When the delete is performed by the PSP, the free space is never freed up (as far as linux is concerned). If I mount the PSP and use rm, no problems that I can see.

    [-0-]: Will try a newer version of udev on the home machine and see how that pans out.


  • Advertisement
Advertisement