Unless the disk is not actively used, the results of maximizing (completely filling) the drive can be very unpredictable. Since this is a production environment, I will assume that others read/write to the drive, and what any program may do when confronted with an inability to get space is simply unknown.
That said, there are some simple processes to fill a disk. However, I would like to know more about why first.
Nothing sinister... Like I said, this is for some automated resilience testing. I need to prove that a service can cope when it has insufficient disk space available.
The service is supposed to load data files into a data store and should cope by telling the source server to add the files to the retry queue because it doesn't have the space to accept the copy of the file.
Perhaps something in a simple loop will do the job:-
This will write vast numbers of files until either the space of the i-nodes are exhausted and no new files can be created. You can simply delete the entire hog directory to clean up.
If you want to ensure that you fill space, you could:-
You can then delete hogfile and hogtemp? to free the space.
Both will take quite a while as the IO is probably expensive.
To set a limit, perhaps you could change the loop not to check the return code, but to do a df and get the current value. You can then test if it is over a predetermined limit.
Thanks but I am hoping to perhaps calculate the size in bytes and then create a file in a directory about that size... Perhaps using something like dd?
I wouldn't want the automation suite hanging up for a long time while it generated the files.
This might work though if I create a file that is MB's in size and then copy it until I run out of space.
The idea though, is to leave so little space that the files being loaded would fail to copy across from the source server. So some sort of calculation of size will be required.
Calculating it in K might be accurate enough though. If I just leave a couple of K free then the files will certainly be too large.
I have a RHEL 5.3 machine with the following partitions and free space:
Free space on the partitions
/ : 74GB
/boot : 81MB
/var : 73GB
/home : 37GB
/icat : 758MB
/opt : 1.5GB
Now is it possible to allot a free space of some other partitions to /opt? I want around 100 GB more space... (4 Replies)
Hello All,
I'm having trouble finding info on how to convert sector size (*if that's really what i want to do?) to something easier to understand.
I'm trying to copy the MBR from a bootable SD Card to another SD Card or image file, but I'm not sure what I should use in my dd command since I'm... (17 Replies)
Hi OS Experts
I would like to increase root partition from another partition so that I can save more documents in Home and Desktop. whether it is possible without formating root partition if so please explain
here is o/p of df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda9... (8 Replies)
I am planning to install slack 13.37 on an old stand-alone PIII (512 mb ram) with 17 gb disk space. I need to keep lotsa pdf, chm type e-books for programming with few other misc. documents.
I'm going to use this system for my personal use.
It has no network but I browse internet with cable... (0 Replies)
hi
My System is Sun Microsystems Inc. SunOS 5.10 Solaris
Partition Info is
/dev/vx/dsk/bootdg/var
27G 25G 1.2G 96% /var
/dev/vx/dsk/bootdg/oravol
110G 54G 56G 49% /export/home
I want to shift space 20G from /export/home to /var
What should be the command ?? (2 Replies)
Dear Friends ,
I am using Redhat Ent Linux 5.0 with a EMC storage which HDD space is 4 TB. After Installing RHEL 5 , I get 4 TB space available but when I am going to create a partition then the OS show 2TB available space . I cannot create a partition above 2TB space . Is there any limitation... (3 Replies)
Hi everybody,
I want to know if there is any posibility to find out - on an AIX system - which are the the users who consume most space or at least a posibility to obtain a list with all the users and how much space are they consuming ?
Trying to use du command was useless. Any idea?... (5 Replies)
Hello,
I am trying to monitor disk space for each node on the machine. I am able to get all individual nodes but for the '/' node. For example:
df -k:
bash-2.05b# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/xxx 4127108 2415340 1502120 62% /
/dev/yyy ... (3 Replies)
first of all, sorry about my english...I´m a spanish newbie to this marvelous OS and i have just a couple of doubts...u know? :-)
1) how big should my swap partition be if i installed debian 2.2r3 or FreeBSD 4.x on a AMD k7 1400Mhz with 512Mb of Random Access Memory?
i heard that those OS... (1 Reply)