LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Why HardDisk info. is inconsistent on PC and Embedded board??? (https://www.linuxquestions.org/questions/linux-software-2/why-harddisk-info-is-inconsistent-on-pc-and-embedded-board-4175497197/)

bvdyi 03-06-2014 12:49 AM

Why HardDisk info. is inconsistent on PC and Embedded board???
 
hello:
I have an embedded system board as DVR, and it's OS is Linux.
I make a testing and the steps are as below:
[1]. I use this DVR system to record video files on a 160G HD, then I type "df -h <mounted path>" to check the usage of this HD, and the terminal shows:

Filesystem Size Used Available Use% Mounted on
/dev/ssd 149.0G 50.5G 99.4G 32% /mnt/ssd

that seems right!

[2]. I remove the HD, and then connect it to a WindowsXP PC, then I delete all the video files(50GB). the usage of HD on Win is about 0%...that's no problem!

[3]. connect the HD back to DVR, after mounted, I type "df" command as [1] to check the usage, however it shows:

Filesystem Size Used Available Use% Mounted on
/dev/ssd 149.0G 50.5G 99.4G 32% /mnt/ssd
(I expect that the usage should close to 0%)
it seems not to be changed!~ I have remount many times and change mounting path, even reboot the DVR, but it's no work! I also check the video files deleted on Win, they are all exist, but couldn't playback! I have no idea!

~~~ I repeat step[1][2] ,but connect HD to a Linux PC, after the deletion, then "df" shows:

Filesystem Size Used Available Use% Mounted on
/dev/ssd 149.0G 0.5G 148.4G 0% /mnt/ssd

it shows the right HD info on terminal of Linux PC. then I connect HD to embeddedLinux(DVR), it also show the right HD info.

my experiment 3 is done the HD deletion on WinXP PC and check the HD usage by typing "df" on Linux PC, and the Linux PC shows right HD info.

my conclusion is Linux PC will get right HD info. whatever the operating of HD is on Win or Linux, but the embedded Linux~~~

now I hope to done the deletion on WinXP PC and check HD usage on DVR(embedded Linux) will also get the right HD info. just like Linux PC... How should I do???
any advice will be very appreciate~
thank you!!!

michaelk 03-06-2014 09:05 AM

How is the formatted, i.e. what file system?

Why do you need to delete the files on a windows PC?

rknichols 03-06-2014 12:58 PM

Windows XP will have moved all of your "deleted" files into the recycle bin, where they still take up just as much space as they did before. Windows XP will show the disk usage as "0%" because that space can be reclaimed as needed. Try emptying the recycle bin before reconnecting the HD to your Linux machine.

bvdyi 03-06-2014 08:08 PM

Quote:

Originally Posted by michaelk (Post 5129942)
How is the formatted, i.e. what file system?

Why do you need to delete the files on a windows PC?

hello: thanks for reply.
the HD file system is FAT32.
...and sometimes we may watch the recording video on PC or operating on these video files include delete.
I guess the "df" on Linux PC is different with embedded Linux one ...maybe??
do you have any idea?
thank you!!!

bvdyi 03-06-2014 08:23 PM

Quote:

Originally Posted by rknichols (Post 5130077)
Try emptying the recycle bin before reconnecting the HD to your Linux machine.

hello:
thanks for reply!
I delete those file on WinXP by pressing "Shift + Del", so those deleted files should not be moved to recycle bin, and I have checked recycle bin is empty!...

I am not sure if the "df" on Linux PC is different with embedded Linux one???
do you have another idea???
thank you!!!

jefro 03-07-2014 02:53 PM

df is df unless you are talking about btrfs. It would be odd that the version of df on this embedded system could have some error.

I get the feeling it is either some automount point issue or how it handles the filesystem. Fat32 shouldn't do that. I don't think but could be some issue with windows not correctly deleting it.

I assume you are a user with enough permission to delete files.

Guess you could use a bartsPE cd to delete it and see it that works.


All times are GMT -5. The time now is 03:14 PM.