takeuchi@osku02.enet.dec.com (Tomoharu Takeuchi) (08/24/90)
In article <2697.26d4fadc@csc.anu.oz> axt654@csc.anu.oz writes: > Hi, > I've got a DECStation 3100 running Ultrix 2.1. We have a 600Mb hard disk > with three partitions. Why doesn't USED+FREE=TOTAL ? I assume it isn't swap > space as that's a separate partition (isn't it?) so maybe it's because the disk > is fragmented? If so, how do you pack a ultrix disk? It seems we're missing > over 50Mb! > > Filesyste Total kbytes kbytes % > node kbytes used free used Mounted on > /dev/rz1a 15551 9659 4337 69% / > /dev/rz1g 271848 215676 28988 88% /usr > /dev/rz1h 271849 71937 172728 29% /u ultrix file system keep 10% of TOTAL is margine. If you want to use its ,after backup file system and following command # /etc/newfs -m 0 /dev/rrz1g rz56 and restore files. You get USED+FREE=TOTAL. -- ***************************************************************** / Tomoharu Takeuchi takeuchi@osku01.enet.dec.com / / Digital Equipment Corp. Japan Software Services/Osaka / #################################################################
axt654@csc.anu.oz (08/24/90)
Hi, I've got a DECStation 3100 running Ultrix 2.1. We have a 600Mb hard disk with three partitions. Why doesn't USED+FREE=TOTAL ? I assume it isn't swap space as that's a separate partition (isn't it?) so maybe it's because the disk is fragmented? If so, how do you pack a ultrix disk? It seems we're missing over 50Mb! Here is the output from df Filesyste Total kbytes kbytes % node kbytes used free used Mounted on /dev/rz1a 15551 9659 4337 69% / /dev/rz1g 271848 215676 28988 88% /usr /dev/rz1h 271849 71937 172728 29% /u Thnaks in advance for any help tridge@aerodec.anu.oz.au
omerzu@quando.quantum.de (Thomas Omerzu) (08/27/90)
In article <2697.26d4fadc@csc.anu.oz> axt654@csc.anu.oz writes: >Hi, > I've got a DECStation 3100 running Ultrix 2.1. We have a 600Mb hard disk >with three partitions. Why doesn't USED+FREE=TOTAL ? I assume it isn't swap >space as that's a separate partition (isn't it?) so maybe it's because the disk >is fragmented? If so, how do you pack a ultrix disk? It seems we're missing >over 50Mb! Maybe you should have a glance at the man page for the `newfs' command: [...] -m free space % The percentage of space reserved from normal users; the minimum free space threshold. The default value used is 10%. [...] So, that place is not missing, it's just reserved. `Normal' users are prevented from writing when disk capacity reaches 100%. The remaining space con only be used by processes running under uid root. This feature ensures that system processes will not be blocked by users who consumpt all available disk space. You may change the default value of 10% reserved space via the -m option of newfs while creating a filesystem. But you should be careful about this; at least all filesystems that are frequently used by system processes (/, /usr) - especially if that filesystem is also writable by ordinary users (like /usr/tmp on the /usr filesystem) - should have a reasonable amount of reserved space. Bye, Thomas. -- *-----------------------------------------------------------------------------* Thomas Omerzu UUCP: ...!unido!quando!omerzu / omerzu@quando.uucp Quantum GmbH, Bitnet: UNIDO!quando!omerzu / omerzu%quando@UNIDO(.bitnet) Dortmund, Germany Internet: omerzu@quando.quantum.de
alan@shodha.dec.com ( Alan's Home for Wayward Notes File.) (08/28/90)
In article <2697.26d4fadc@csc.anu.oz>, axt654@csc.anu.oz writes: > Hi, > I've got a DECStation 3100 running Ultrix 2.1. We have a 600Mb hard disk > with three partitions. Why doesn't USED+FREE=TOTAL ? I assume it isn't swap > space as that's a separate partition (isn't it?) so maybe it's because the disk > is fragmented? If so, how do you pack a ultrix disk? It seems we're missing > over 50Mb! > > Here is the output from df > > Filesyste Total kbytes kbytes % > node kbytes used free used Mounted on > /dev/rz1a 15551 9659 4337 69% / > /dev/rz1g 271848 215676 28988 88% /usr > /dev/rz1h 271849 71937 172728 29% /u > > > Thnaks in advance for any help > tridge@aerodec.anu.oz.au As other replies have pointed out the biggest chunk of missing space is the 10% that's reserved. If you consult the tunefs(8) manual page you'll that this can be changed. The rest of it is a little harder to track if you aren't familar with the file system structure. A file system is made up of things called cylinder groups. I think the default of number of cylinders in a group is 16, but this can be changed when you create the file system (see newfs(8)). Each cylinder group consists of a superblock, a cylinder group block, an inode table and data blocks. The superblock and cylinder group block are probably 8 KB each, but the inode table is bigger. This non-data part of the file system is necessary overhead. If you have lots of cylinder groups the amount of overhead adds up. Look at /usr/adm/install.FS.log to see the logs of the newfs commands that created the file. From this you can find out how many cylinder groups your file systems were created with and from that estimate the overhead. Generally you don't need worry about file system fragmentation unless the file system gets very full. When that happens all the "good" place to allocate blocks are probably gone and ULTRIX will just use the first suitable block it finds. As long as the file system stays full large files may be get blocks allocated from one end of the file system to the other. Trying to reorganize the layout while the disk is full will only help file created early in the restore process. Once the file system gets less full though you may have that were created when it was full. These are the ones that will see the most improvment from being shuffled. Currently the only supported way I know to reorganize is the use dump/newfs/ restore. Keep in mind that this really only applies to large files. Small files (file system block size or smaller) are inherently compressed. For large files you can't really compress them anyway. The way that blocks are generally allocated is that new directories tend to go into cylinder groups with the most free space. Files created in those directories will prefer to be allocated in the same cylinder group. Up to a certain size (setable with tunefs(8)) the file will be allocated block in that cylinder group. After that, the blocks get allocated to other cylinder groups. The result is that a very large file will tend to be spread in large chunks evenly across the disk. For more information about the file system that ULTRIX uses refer to the paper: "A Fast File System for UNIX*", by Marshall Kirk McKusick, Willian N. Joy, Samuel J. Leffler, Robert S. Fabry. *UNIX is a trademark of AT&T. ULTRIX is a trademark of Digital Equipment Corp. -- Alan Rollow alan@nabeth.enet.dec.com
mathisen@dali.cs.montana.edu (Jaye Mathisen) (08/28/90)
In article <TAKEUCHI.90Aug24161639@osku02.enet.dec.com> takeuchi@osku02.enet.dec.com (Tomoharu Takeuchi) writes: > If you want to use its ,after backup file system and following command > > # /etc/newfs -m 0 /dev/rrz1g rz56 > > and restore files. You get USED+FREE=TOTAL. Well, rather than go to all the work to back it up and restore it, just shut things down to single-user mode, and then do tunefs -m # /dev/rrz1g and reboot...
ghelmer@dsuvax.uucp (Guy Helmer) (08/28/90)
In <TAKEUCHI.90Aug24161639@osku02.enet.dec.com> takeuchi@osku02.enet.dec.com (Tomoharu Takeuchi) writes: >In article <2697.26d4fadc@csc.anu.oz> axt654@csc.anu.oz writes: >> [...] >> It seems we're missing >> over 50Mb! > ultrix file system keep 10% of TOTAL is margine. > If you want to use its ,after backup file system and following command > # /etc/newfs -m 0 /dev/rrz1g rz56 > and restore files. You get USED+FREE=TOTAL. If you really need that 10% of the partition and change minfree to get it, you'll kill your disk performance. Also, there's no reason to backup/newfs/restore, just use "tunefs -m#" -- minfree is alterable at any time on a running system. >/ Tomoharu Takeuchi takeuchi@osku01.enet.dec.com / -- Guy Helmer work: DSU Computing Services, Business & Education Institute (605) 256-5315 play: MidIX System Support Services (605) 256-2788 dsuvax!ghelmer@cs.utexas.edu, ...!bigtex!loft386!dsuvax!ghelmer
spa@fctunl.rccn.pt (Salvador Pinto Abreu) (08/31/90)
In article <1592@shodha.dec.com> alan@shodha.dec.com ( Alan's Home for Wayward Notes File.) writes: [discussion on why USED+FREE space less than TOTAL...] Currently the only supported way I know to reorganize is the use dump/newfs/ restore. There's another (easier) way, that doesn't require the fs to be rebuilt: (single user mode) # mount /usr # cp /usr/etc/tunefs /tunefs # umount -a # /tunefs -m 2 /dev/rz1g # /tunefs -m 2 /dev/rz1h ... # mount -a -t ufs This changes the minimum amount of free space from the default (10 percent) to a more adequate [in a disk-space-starved environment, like ours :-(] 2% (that's the number 2 in the /tunefs commands). -- Alan Rollow alan@nabeth.enet.dec.com -- --- Salvador Pinto Abreu BITNET/Internet: spa@fctunl.rccn.pt +---------------------------------+ UUCP: spa@unl.uucp | Departamento de Informatica +----------------------------------+ | Universidade Nova de Lisboa 2825 Monte Caparica, PORTUGAL | +--------------------------------------------------------------------+