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!

1.5
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

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

Posted by ali emami at February 17. 2010

I just cnntected a 1.5T external hard drive to my ubuntu linux machine but i ran out of space by copying few hundred files! 

/mnt/extdisk# df -h

Filesystem            Size  Used Avail Use% Mounted on

.

.

.

/dev/sdb1              10M  5.6M  4.5M  56% /mnt/extdisk

root@babble6:/mnt/extdisk# 

 

 

df -h command says my external hard-drive is only 4.5M - anyone knows what is wrong with this?

 

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

Posted by Gareth Bult at February 18. 2010

Hi,

Yes, try fdisk -l /dev/sdb, this should reveal all!

 

Previously ali emami wrote:

I just cnntected a 1.5T external hard drive to my ubuntu linux machine but i ran out of space by copying few hundred files! 

/mnt/extdisk# df -h

Filesystem            Size  Used Avail Use% Mounted on

.

.

.

/dev/sdb1              10M  5.6M  4.5M  56% /mnt/extdisk

root@babble6:/mnt/extdisk# 

 

 

df -h command says my external hard-drive is only 4.5M - anyone knows what is wrong with this?

 

 

Powered by Ploneboard
New Forums

We are now in the process of phasing out this Forum in favour of the new Forums at forum.linux.co.uk. Please consider posting any requests to the new Forum. (you will need to re-register with the new forum I'm afraid)

Poll
3G Netbook
If linux.co.uk were to offer a Netbook with a SUPPORTED 3G connection, would you be interested?




Tell us about yourself!
How many computers do you administer?






 ,
 
IT Support Bristol
IT Services and IT Support provider based in Bristol. Computer maintenance with server support as standard.
Mobile broadband
Compare mobile broadband deals and offers at the UK's best mobile broadband comparison site
Best Mobile Broadband Deals
Compare wireless mobile internet deals on Mobile Broadband Genie, the independent UK price comparison website.
IT Support
Award winning IT Support from help4IT, providing all the IT services of a dedicated IT department to businesses in London and the UK.
Call 0800 043 4448.
Introduction to Linux
Comprehensive 5 day introductory course in London, 8-12 March/10-14 May. Covers installation, command-line, Gnome, power tools, Shell scripting, Office Applications and more.
IT Support Bristol
Netzen provide business IT Support for London, Bristol & Bath, Supporting Microsoft, Cisco, Linux & Mac
Email Support
Email Hosting, Blackberry And Windows Mobile Configuration Available From Our IT Department. Microsoft Gold Certified Partner.
IT Support London
Efficent IT Support & Hosted Services for SME businesses in and around greater London.
IT SERVICES
Award winning IT Services from London provider Wavex offering support, advice, and training
IT Support
A full range of services, from hosting, data recovery and day-to-day support through to Board-level IT advice through our virtual IT Director offering.
Data Recovery
Professional data recovery services