Personal tools
You are here: Home Forums Off-Topic Banter 400Gb USB external drive: no space left on device!

400Gb USB external drive: no space left on device!

3.0
Up to Off-Topic Banter

400Gb USB external drive: no space left on device!

Posted by anonymous at June 29. 2008

Hi,

I have installed a 400Gb iomega drive under redhat 8.2. It has worked perfectly so far until I reached 120Gb used and it is now telling me "no space left on device". The disk usage says it is only 33% full so it knows about the full 400 Gb but it won't let me write to it any more! I can delete 5Gb and rewrite 5Gb but it seems as if 120Gb is the most I can put on it! Whats going on?

thanks,

jeff

Re: 400Gb USB external drive: no space left on device!

Posted by Gareth Bult at June 29. 2008

Ok, when you create a filesystem on a hard drive it will assign various parameters to the hard drive for you automatically, unless you specify these yourself. Unfortunately these parameters are "general" and not always appropriate depending on your usage of the space, as in your case.

Problem parameters in this case are likely to be "block-size", "inodes" and "reserved blocks".

Try; df -i
To see if you've run out of "inodes".
(your filesystem must be mounted to do this)
Solution; re-"mkfs" your filesystem specifying more inodes.

If you have very small files, then the space allocated to the file will be the minimum block size of the filesystem, rather than the size of the file. For example with the default 2K block size, if ALL your files are 1K in size, then you will waste 50% of your disk!
Solution: re-"mkfs" your filesystem with a smaller block size.

Reserved blocks:: unless you're going to boot off the filesystem, always add "-m0" to your mkfs line to prevent the system from allocating a proportion of the disk to the root user. Unless the disk is to be a root filesystem, this option is not useful.

mkfs:: -b [block size] -m0 -N [inodes]

Assuming you've run out of inodes (most common), save your data elsewhere (onbviously) and ;

mkfs -m0 -N [inodes] where inodes = value shown in "df -i" times 2.

A common mistake is to decrease the block size on a filesystem, say from 2k to 1k, without changing the INODE allocation. If you half the block size, you will double the number of blocks on the disk, hence you will need (potentially) twice the number of inodes. (!)

Re: 400Gb USB external drive: no space left on device!

Posted by anonymous at June 29. 2008

Hi,
I have the same problem but:

[gt@Paradise usb1]$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/hda2 0 0 0 - /
/dev/hda1 6024 27 5997 1% /boot
/dev/hda3 38933504 48890 38884614 1% /home
/dev/tmpfs 223116 1 223115 1% /dev/shm
/dev/hdb1 48829504 1437869 47391635 3% /Projects
/dev/hdb2 8972112 8972032 80 100% /Stuff
/dev/hdb3 0 0 0 - /Projects2
/dev/hdb4 0 0 0 - /Projects3
/dev/sda1 0 0 0 - /mnt/usb1

As you can see I have inoed on /dev/sda1 (the external usb drive). It's formatted as:

root[usb1]# fdisk -l /dev/sda

Disk /dev/sda: 300.0 GB, 300000739328 bytes
255 heads, 63 sectors/track, 36473 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 36472 292961308+ c W95 FAT32 (LBA)

What else can I do to overcome this problem?
Thanks
Giuseppe

Re: 400Gb USB external drive: no space left on device!

Posted by anonymous at June 29. 2008

Urm, sda1 is showing as a Windows filesystem - the question and solution relate to a Linux filesystem.

> /dev/sda1 1 36472 292961308+ c W95 FAT32 (LBA)

Solution; reformat your disk - warning; this will erase all your data (!)

Re: 400Gb USB external drive: no space left on device!

Posted by anonymous at June 29. 2008

Jeff: did Gareth's answer solve your problem?

Yes thanks a lot. I actually cheated because my application involves taking a single data file and sorting it into several hundred output files each is maybe 1Mb or so. I think I had nearly 10^5 (100,000) files on this which therefore took up 100Gb on the drive. So to 'cheat' I just started 'tar'ring and 'zip'ping the directories that had several thousand files in them. Now my system treats the tape archives (tar) is 1 file each instead of a few thousand which freed up a lot of inodes. I have happily reached 300Gb and counting!

Cheers,
Jeff

Re: 400Gb USB external drive: no space left on device!

Posted by Johnathon Tinsley at June 29. 2008

Hi Jeff,
Good to know it went well - thanks for replying.
Thats a lot of files...! Smile!

Hi Sam,
Yes, linux is free. Probably the best way to get, and learn about linux, is read all of the information available from out "New User" section, and then go to www.ubuntu.com and then download & burn onto a CD Ubuntu, or have them send you a CD for free!
Just somthing to be aware - if you are not careful whilst installing ubuntu, you could wipe your Windows installation! MAKE SURE YOU MAKE BACKUPS!!! (not that I ever make backups... but then I keep loosing all my personal files. Serves me right really...!)


Heres a tour of Ubuntu, so you can see what you're letting yourself in for.
http://linux.co.uk/Members/jtinsley/articles/an-illustrated-tour-of-ubuntu/?searchterm=None


Right, Back to work!

Johnathon

Powered by Ploneboard
Data recovery raid...
Click here if your need data recovery on your RAID system.
Inkjet Printer Cartridges
Order your inkjet printer cartridges online and UK delivery is free.
ink cart
When ordering from us you can forget about having to cart around shops for ink cartridges. See our comprehensive range for great value.
SMALL BUSINESS IT
In a world of faceless organisations, Connect provides a personal service to help you get rid of any IT frustrations.
Dedicated Server
Check out the price of dedicated servers this company offers. Click on the link above and see.
UK BROADBAND PROVIDER
When you choose the best UK broadband provider, you also choose the company who is actively involved in charity.
Reverse Phone Lookup
Type in any phone number to instantly find out owner's name, address and more.
Laptop
Visit CheckCost UK to compare, review and buy latest computers, laptops, scanners, printers, hard drives, LCD monitors and many more.
Software
Visit Ecost Software to find your favourite brands like Adobe, Apple, Microsoft, Autodesk, Codegear, Corel, Symantec and more.
IT SERVICES
Award winning IT Services from London provider Wavex offering support, advice, and training