Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How do you defragment you harddrive in unix (Madrake Linux 9.0)? Post 30330 by pudad on Monday 21st of October 2002 01:35:36 AM
Old 10-21-2002
Question How do you defragment you harddrive in unix (Madrake Linux 9.0)?

Subject says it all...
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Supplemental harddrive.

Am planning on adding a secodary SCSI hardrive to the existing 20gb drive., that I have. The old drive has Linux on it. Once, the new drive is added, I am planning on having windows on it. Firstly, could this be done ? Has anyone build a system with a similar configuration ? What is requried,... (1 Reply)
Discussion started by: matvrix
1 Replies

2. Linux

Mount a harddrive in linux.

Hey people i'm very new to linux. I just put a extra 200 gig maxtor HD in my computer. Linux can tell it's there...but it says it cant mount it. How do i mount it manually? thanks, John (2 Replies)
Discussion started by: RKJV
2 Replies

3. UNIX for Dummies Questions & Answers

Copying a file to my harddrive

I'm loged on to a unix sever over the internet and i want to copy a file from there to my harddrive. How would i go about this because cp does not seem to work. (1 Reply)
Discussion started by: zoolz
1 Replies

4. UNIX for Dummies Questions & Answers

booting from which harddrive

Hi, both of my /dev/hda and my /dev/hdb contain /boot partition. I'm wondering how to tell which harddrive's /boot is actually being read? Thanks (2 Replies)
Discussion started by: onthetopo
2 Replies

5. Solaris

installing second harddrive

This is my first post i am a solaris newbie. I just purchased my first sun system. It is a sunblade 1000. It had a fcal 36gb hdd in it already so i purchased a secondary 36gb fcal harddrive to increase my harddrive space however, how do i get it to detect the second harddrive? I have tried boot -r... (2 Replies)
Discussion started by: crzywut
2 Replies

6. Solaris

Unix command to remove external SCSI harddrive

Hi All, I have an external scsi harddrive (HD) connected directly to the workstation. I understand when the external HD is connected and turned on, and type in "devfsadm" command. Unix will detect it but not mount the drive. So by typing in "format" command it will display the following: #... (6 Replies)
Discussion started by: tlee
6 Replies

7. Solaris

Detecting Harddrive Errors

I am looking for some tips or suggestions in how to do the following. 1) From a Solaris server, I run the command iostat -En and receive output that is similiar to the following which shows your disks along with the cdrom/dvdrom: c0t2d0 Soft Errors: 0 Hard Errors: 0 Transport... (1 Reply)
Discussion started by: sunsysadm2003
1 Replies

8. UNIX for Dummies Questions & Answers

How to copy MBR from old harddrive to new harddrive?

How do I copy the master boot record from one harddrive to another or how to install just the MBR? (7 Replies)
Discussion started by: shorty
7 Replies

9. Programming

Trying to write a program to fill up my harddrive (Linux/C)

Hi guys, I'm trying to write a little program that will fill up my harddrive and will log the process during this. Now I've come up with this: #include <stdio.h> void main(void) { char cmd1; char cmd2; int i=1; sprintf(cmd2, "df -h"); while (i<=5) { system("dd... (3 Replies)
Discussion started by: Tiglet
3 Replies

10. Fedora

Partitioning harddrive for installing Linux alongside win 7.

I'm planning on using two Linux OS's alongside win 7, one being Fedora KDE 30. So to prepare for the install I partitioned my harddrive using the Minitool Partition Wizard. I have a 320 GB hdd, so I nade one partiotion about 80 GB forFedora and then left about 70 GB as unused, to later... (2 Replies)
Discussion started by: AndersA
2 Replies
defragment(8)						      System Manager's Manual						     defragment(8)

NAME
defragment - Makes the files in a file domain more contiguous SYNOPSIS
/usr/sbin/defragment [-e] [-n] [-N threads] [-t time] [-T time] [-v] [-V] domain OPTIONS
Ignores errors and continues, if possible. Errors that are ignored are usually related to a specific file. Specifies the number of threads to run on the utility. The default number of threads that will be run is the number of volumes in the domain. The maximum number you can specify for the number of threads is 20. Prevents defragmentation from actually taking place. Use in conjunction with the -v option to display statistics on the number of extents in the file domain. Specifies a flexible time interval (in minutes) for the defragment utility to run. If the utility is performing an operation when the specified time has elapsed, the procedure continues until the operation is com- plete. Specifies an exact time interval (in minutes) for the defragment utility to run. When the specified time has elapsed, the defrag- mentation procedure stops, even if it is performing an operation. Displays statistics on the amount of fragmentation in the file domain and information on the progress of the defragment procedure. Displays the same information provided by the -v option along with informa- tion about each operation the defragment utility performs on each file. This option slows the defragment procedure. OPERANDS
Specifies the name of the file domain. DESCRIPTION
When a file consists of many discontiguous file extents, the file is fragmented on the disk. File fragmentation reduces the read/write per- formance because more I/O operations are required to access a fragmented file. The defragment utility attempts to reduce the number of file extents in a file domain by making files more contiguous. Defragmenting a file domain often makes the free space on a disk more contiguous, resulting in less fragmented file allocations in the future. Before you can defragment a file domain, all filesets in the file domain must be mounted. If you try to defragment an active file domain that includes unmounted filesets, the system displays an error message indicating that a fileset is unmounted. To determine the amount of file fragmentation in a file domain, run the defragment command with the -v and -n options. This provides the fragmentation information without starting the defragmentation process. Run defragment with the -v and -n options again to see the improve- ment. Before running the defragment utility, delete any files in the domain that you do not need. This gives the defragment utility more free space to use, which produces better results. Deleting files afterwards creates only more free-space fragments. It is also a good idea to run the balance utility on the domain before you run the defragment utility in order to balance domain free space before defragmenting the domain files. To monitor the improvement made to the file domain by the defragment utility, use the verbose mode option, -v, which displays the following information: Extents The number of extents in the specified domain. (Contiguous extents in sparse files are counted as one extent after defragmentation, when in fact there are several contiguous file extents.) Files w/ extents The number of files that have extents. (Note that files do not have extents if the files are less than 7 Kilobytes.) Avg exts per file w/ exts The average number of extents for each file that has one or more extents. Aggregate I/O perf The efficiency of the entire file domain. An increase in value indicates improvement. Free space fragments The number of free-space fragments in the domain. RESTRICTIONS
The defragment utility requires a minimum of 1 percent of the total space, or 5 megabytes per volume (whichever is less) to be free in order to run. You cannot run the defragment utility while the addvol, balance, defragment, rmfset, or rmvol utility is running on the same file domain. You must be the root user to use this utility. EXAMPLES
The following example defragments the file domain called accounts_dmn. A flexible time limit of 15 minutes is imposed and verbose mode is requested to display the fragmentation data: # defragment -v -t 15 accounts_dmn defragment: defragmenting domain 'accounts_dmn' Pass 1; Clearing Volume 1: area at block 11680 ( 103072 blocks): 81% full Domain data as of the start of this pass: Extents: 10432 Files w/extents: 4305 Avg exts per file w/exts: 2.42 Aggregate I/O perf: 52% Free space fragments: 2743 <100K <1M <10M >10M Free space: 38% 0% 0% 62% Fragments: 2742 0 0 1 Filling . . . Pass 13; Clearing Volume 1: area at block 559744 ( 62736 blocks): 0% full Volume 2: area at block 76640 ( 24624 blocks): 18% full Domain data as of the start of this pass: Extents: 4306 Files w/extents: 4305 Avg exts per file w/exts: 1.00 Aggregate I/O perf: 100% Free space fragments: 23 <100K <1M <10M >10M Free space: 0% 9% 27% 64% Fragments: 6 10 5 2 Filling Current domain data: Extents: 4305 Files w/extents: 4305 Avg exts per file w/exts: 1.00 Aggregate I/O perf: 100% Free space fragments: 17 <100K <1M <10M >10M Free space: 0% 6% 29% 65% Fragments: 3 8 4 2 defragment: defragmented domain 'accounts_dmn' The information displayed before each pass and at the conclusion of the defragmentation process shows the improvement made to the file domain by the defragment utility. SEE ALSO
Commands: addvol(8), balance(8), rmvol(8) defragment(8)
All times are GMT -4. The time now is 07:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy