LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   >20% of my usbdisc is used regardless of no files on it (https://www.linuxquestions.org/questions/linux-hardware-18/20-of-my-usbdisc-is-used-regardless-of-no-files-on-it-604936/)

ungua 12-06-2007 08:28 AM

>20% of my usbdisc is used regardless of no files on it
 
when empty, my mp3-player is recognised as having available 390.2 of 496.9mb (512mb). that seems strange to me, since there are no files on the disc at all! to illustrate the problem, a screenshot. how do i format a usbdisc in suse? i have only formated disc in linux with a knoppix-live-cd before.

thank you very much & best regards
ungua

v00d00101 12-06-2007 11:09 AM

Try something like.

Code:

mke2fs -m 0 -j /dev/someDevice
The -m flag allows you to change how much space is reserved for the root user (and his daemons). So set it to 0, and you should now have the majority of the space available. Also you do not necessarily need the -j (journal) flag if you arent bothered by the partition being ext2.

druuna 12-06-2007 11:27 AM

Hi,

I would be a bit careful before formatting the usbdisc.

The screenshot you posted shows this:

/dev/sdc ? 496,9 MB /media/usbdisk 390,2 MB .....

/dev/sdc => a device is found, but no partition layout.
? => no filesystem is detected. That could mean 2 things, there is no FS present or there is one but it is not recognized!

Are you sure your mp3-player is still going to work if you format the disk with ext2 or ext3 or reiserfs or etc. ??

Just a heads up.

b0uncer 12-06-2007 11:55 AM

What kind of a player is it? Note that most USB players have somekind of software on them, to be able to play songs. It usually means that they have a certain kind of filesystem (sometimes it's luckily FAT, but not always), maybe a database (but in that case special software is usually needed to transfer music to and from the player, to write the changes to the database too) and so on. So disk space can be needed by the player, even if there are no media files on it. And like druuna pointed, even if this was not the case, the player might not recognize ext2 (or other filesystems for that matter), and simply stop working after the format. The usual filesystem is FAT (because it's recognized/supported by a lot of operating systems), and I haven't seen any commercial mp3 player till today that would use or understand ext filesystems (if there are some, tell me; of course I know about iPodLinux, but I mean 'official' Linux players here). Apple iPods may use HFS (was it right?), some of them use FAT, but they don't work if you just go about formatting the player to ext (you'd then need to replace the firmware too, with one that understood ext filesystem).

So better leave it alone, or at least first study how to rever the changes and have the player 100% back to factory settings including filesystem and firmware, so that it works, before you start. Because if you don't, and it stops working, you can forget every warranty you might have - they all state somewhere (maybe small print) that any usermade changes void warranty.

ungua 12-07-2007 04:18 AM

it's this player and i am very sure that it's filesystem is fat. furthermore, it was not such that that much space was reserved when the player was new for two years ago - i then had the full space of just below 500mb available. i wouldn't dare to format it with a non-windows compatible file system ...

best regards
ungua

pwc101 12-07-2007 04:39 AM

Have you checked that there aren't some hidden files/directories on it that are taking up all the space? To do this, in a terminal, type:
Code:

cd /media/usbdisk
la -alh

That should at least show if there are some hidden directories (files/directories whose names are preceded by a .)

If there are some hidden directories/files, then you should be able to delete them and reclaim the used space.

b0uncer 12-07-2007 04:39 AM

Ok, seems like a "regular" mp3 player to me (using either FAT16 which is very commonly used with this kind of players, or FAT32) - it works by just copying the audio files there, right? Without any special programs to do that?

You could try to format it as FAT if you liked, it would probably work then. You can of course first take an image of the player disk, so you could later put it back if you wanted, to revert the changes. The image sould be easy to take and put back with dd (there's a very good thread about dd usage here at LQ). You can create FAT filesystem with mkfs.vfat I think:
Quote:

mkfs.vfat (8) - create an MS-DOS file system under Linux
But like I said, first dd an image of the player as a backup. You could also check the partition table of the disk with fdisk -l, just to make sure.

EDIT: one thing that came to my mind from pwc101:s post is that it's possible there is a trash directory on the drive (called .trash or .Trash - so it's usually hidden in Linux's file manager view). When deleting songs from the device they should usually be removed right away, but I've (once or twice) bumped into a situation myself where the file manager I used didn't remove the file, but instead put it into the "trash bin". And not into a trash bin on my harddisk, but it created a trash directory onto the device itself, and stored the files there - so instead of removing them (and freeing up space) it just moved the files into a usually-not-shown directory. Check if .trash or .Trash exists, and if it does, remove it.

ungua 12-07-2007 01:29 PM

wow, thank you for a very comprehensive post, or i might even call it a "guide"! :) i have checked if there are any hidden files by going to "show" > "show hidden files" in konqueror, i assume that's same like using these shell commands? (i'm a gui-guy :))

best regards
ungua

ungua 12-14-2007 05:25 AM

it seems there are no hidden files on the disc? i tried the "la -alh"-command (result). running dd creates a 0b-image, so it doesn't seem to recognize what's in the "lost" section either (screenshot)!? i don't really dare to format if i'm not 100% sure it will work afterwards...

thank you & regards
ungua

ungua 01-13-2008 08:08 AM

very strange: i just copied zappa's "absolutely free" to my mp3-player. in its menue i couldn't see the album, so i connected it to the notebook again. the folder "zappa" then was completely empty, but the disc space in use. so i deleted the folder, but that didn't free these 80,3mb of disc space!! how weird is that?? that leaves 309 out of 512mb.
the mkfs-command is not recognised in the shell, but i will format the drive in windows later today. i just wanted to post this strange happening, it's really not understandable.

regards
ungua


All times are GMT -5. The time now is 02:11 AM.