LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Backup of NAS drive - WD My Book World - Wrong size? (https://www.linuxquestions.org/questions/linux-newbie-8/backup-of-nas-drive-wd-my-book-world-wrong-size-897862/)

Tappers 08-17-2011 10:16 AM

Backup of NAS drive - WD My Book World - Wrong size?
 
I have a Western Digital My Book world Edition that is one of the early models. 1TB with 10/100 LAN port.

I have stored data on the drive from windows machines.

I want to backup the drive to a USB drive via Ubuntu 11.04 server.

I have added the drive to /etc/fstab and mounted and can see the contents.

I have rsync'd a folder to the usb drive (added to fstab and mounted).

The folder "shared" in windows shows a size of 93gb

If I do du -ch in ubuntu in the mounted folder on the NAS it shows 94gb

If I do du -ch in the usb folder that has been rsync'd to the USB drive it reports as 108GB

But the nas drive reports 270GB used.

Is anyone able to assist with some possible explanations??

Thanks to all.

travisdh1 08-17-2011 10:45 AM

I'll take a stab at it.

Do you have different filesystem types on the nas and the usb drive? That's the most likely cause as you can have different files take up different amounts of space (even on the same filesystem type actually.) This is caused by the way the files are physically stored on the drives, basically if a file or part of a file is smaller than the block size of the device it will take up the entire block. Ex a zero file (touch ~/test) will still take up one block on the storage unit (also a bit of space for an index but that's a little to complex for me to be able to explain it easily or quickly.) So that would explain why you'd have two different sizes reported on the drives themselves. I wouldn't worry about it to much but if you want to verify that the filesystems contain the same files it wouldn't be to hard to write a shell script do a directory tree of each drive and a quick diff.

I'm not so sure about the nas box as I haven't used that model, but my first guess would be that whatever operating system is running on it is stored on the hard drive and not a flash chip internal to the device.

Edit: After looking at your post again you seem to have more data on the device than a small os would use. Are you sure no other shares are hanging around on it? I don't know why it would have so much more space used really.

Tappers 08-18-2011 08:58 AM

Thanks for the response travisdh1.

The could well be different file system types, the USB I have formatted to EXT4 and the NAS could be anything, I think it is linux but not 100% sure! As you have explained so well it could be down to block size!

You have also hit the nail on the head about the NAS! I knew there were some other shares but honestly thought they were empty! As a surprise I foung 155GB in one of them :O

I am still surprised by the amount of difference but can only think that it is down to the storage of data in the blocks as you have said!

thanks for the response!


All times are GMT -5. The time now is 06:52 AM.