09-30-2012
Quote:
Originally Posted by
Corona688
If you've deleted the file, then you have to kill whatever process has it open to close and remove it from disk.
If you hadn't deleted the file, you could've simply truncated it -- overwritten it with an empty file -- to reduce its size to zero.
Not necessarily.
It would depend on how the file is being written to by the process(es) that are writing to the file, and the file system in use.
If the file is being written to in append mode, truncating the file out from under the process(es) will probably work to reduce its size permanently.
If it's not being written to in append mode, after you truncate it down from, say, 10 GB to zero, the next time the process(es) write to the file, they'll still do so at the old 10 GB file offset. What happens then depends on whether or not the underlying file system supports sparse files.
And that's just if you're doing it all on a single machine. If it's a shared file (NFS, some other shared file system), things can get really fun.
10 More Discussions You Might Find Interesting
1. HP-UX
Hi All,
one of the mount point in Hp ux server has reached 95%
its a data base file and can not be deleted.
so i want to know how to increase the size of mount point
i am new to unix ,please help me (1 Reply)
Discussion started by: jyoti
1 Replies
2. UNIX for Dummies Questions & Answers
Hi..
I want to increase the file system size of any filesystem online, without using the Volume manager like LVMs, is it possible? & if yes then how? (3 Replies)
Discussion started by: Amol21
3 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
Could anybody tell me how to increase/decrease a process size in UNIX HP machine ? Whether the process size limitation will cause core dump ?
Thanks,
Rohit.. (1 Reply)
Discussion started by: ronix007
1 Replies
4. Solaris
Dear all,
I am very new to solaris,
I have installed solaris 10,
i tried installing few softwares into file system, unfortunately system failed to install stating "No space left on device "
i searched few threads and it says, we have to increase root size. where my root size is... (2 Replies)
Discussion started by: radhnki
2 Replies
5. UNIX for Dummies Questions & Answers
Unix protect its password by using salt
It that mean larger the salt size the more secure?
if the salt size increase greatly, will the password still able to be cracked?
thank you for helping (1 Reply)
Discussion started by: cryogen
1 Replies
6. AIX
Hello,
I am working AIX VIO server and extended Virtual Disk of one of the Partition with 10GB. After starting partition, i am not able to see increased size of disk.
Can you please help me what I need to do to increase the size of virtual disk from partition?
Thanks
Kishor
... (7 Replies)
Discussion started by: kishorbhede
7 Replies
7. UNIX for Dummies Questions & Answers
hi guys
I am working on my vmware workstation.
I have a /dev/sdb which is 5GB. I am using LVM.
Now I increase /dev/sdb 2 more GB.
fdisk -l shows 7 GB but pvscan still shows 5GB.
how do I make my system recognize the new 7GB added and be able to add those to my physical volumen and... (1 Reply)
Discussion started by: kopper
1 Replies
8. What is on Your Mind?
Any suggestions on how to increase the number of posters and contributors? Please vote and write in your suggestions.
Thank you! (72 Replies)
Discussion started by: Neo
72 Replies
9. SCO
Hi,
I'm Linux administrator who happens to 'administer' SCO Unix 5.0.7, which is virtual server on VMware - deployed from official ovf image.
My problem is that root filesystem is almost out of disk space, and we've decided to do it as we do on every other virtual servers and extend disk on... (13 Replies)
Discussion started by: goldenboy
13 Replies
10. Solaris
Host System: SPARC S7-2 Server; 2x8-core CPUs; 128Gb RAM; 2x600Gb HDD. running Solaris 11.3.
Last login: Tue Sep 19 14:42:42 2017 from xxx.xxx.xxx
Oracle Corporation SunOS 5.11 11.3 June 2017
$ uname -a
SunOS sog01 5.11 11.3 sun4v sparc sun4v
$
Original physical systems: Sun... (0 Replies)
Discussion started by: apmcd47
0 Replies
fsx(8) System Manager's Manual fsx(8)
Name
fsx - file system exerciser
Syntax
/usr/field/fsx [ -h ] [ -ofile ] [ -tn ] [ -fpath ] [ -pm ]
Description
The exerciser exercises a file system by spawning up to 250 (the default is 20) processes that create, open, write, close, open, read, val-
idate, close, and unlink a test file. These test files are created in (the default) unless the -fpath option is used. The exerciser will
run until or kill -15 pid is sent to the process.
A logfile is made in for you to examine and then remove. If there are errors in the logfile, make sure you check the file, because that is
where the driver and kernel error messages are saved.
Options
The options are:
-h Print the help messages for the command.
-ofile Save the output diagnostics in file.
-tn Run time in minutes (n). The default is to run until the process receives a or a kill -15 pid.
-pm Number (m) of processes to spawn. The maximum is 250; the default is 20.
-fpath Path name of directory on file system you wish to test. For example, or The default is
Examples
The following example runs 10 processes on until the process receives a or kill -15 pid:
% /usr/field/fsx -p10 -f/mnt
The following example runs 20 processes on for 120 minutes in the background:
% /usr/field/fsx -t120 &
Restrictions
If there is a need to run a system exerciser over an NFS link or on a diskless system there are some restrictions. For exercisers that
need to write into a file system, such as the target file system must be writable by root. Also the directory, in which any of the exer-
cisers are executed, must be writable by root because temporary files are written into the current directory. These latter restrictions
are sometimes difficult to overcome because often NFS file systems are mounted in a way that prevents root from writing into them. Some of
the restrictions may be overcome by copying the exerciser to another directory and then executing it. Avoid using the exerciser over an
NFS or diskless file system.
See Also
Guide to System Exercisers
fsx(8)