Date: Thu, 3 May 2001 02:15:58 -0500 From: Mike Meyer <mwm@mired.org> To: Roger Merritt <mcrogerm@stjohn.ac.th> Cc: questions@freebsd.org Subject: Re: Deleting a slice? Message-ID: <15089.1454.293039.840615@guru.mired.org> In-Reply-To: <36638039@toto.iv>
next in thread | previous in thread | raw e-mail | index | archive | help
Roger Merritt <mcrogerm@stjohn.ac.th> types: > I happened to be playing with one of my LAN servers after upgrading to > FreeBSD 4.3-STABLE, and noticed the following: > > [root@poppy:~]# mount -p > /dev/wd0s1a / ufs rw 1 1 > /dev/wd0s1f /tmp ufs rw 2 2 > /dev/wd0s1g /usr ufs rw 2 2 > /dev/wd0s2e /usr/home ufs rw,nosuid 2 2 > /dev/wd0s1e /var ufs rw,nosuid 2 2 > procfs /proc procfs rw 0 0 > > then: > [root@poppy:~]# df > Filesystem 1K-blocks Used Avail Capacity Mounted on > /dev/wd0s1a 49583 40931 4686 90% / > /dev/wd0s1f 99183 217 91032 0% /tmp > /dev/wd0s1g 1524425 1193656 208815 85% /usr > /dev/wd0s2e 2179530 482494 1522674 24% /usr/home > /dev/wd0s1e 99183 13448 77801 15% /var > procfs 4 4 0 100% /proc > > Now, I'm not the guy who installed FreeBSD on this machine and I can't for > the life of me figure why the guy before me set aside 99MB for /tmp. As you > can see, only a couple of hundred KB are being used while my root directory > is 90% full -- and that only because I deleted the /modules.old directory. > > Is there any way I can change the size of the slices that were set up > during the initial installation? It would be really nice if I could split > up /dev/wd0s1f and assign the space to / and /usr. First, those are partitions, not slices. s1a is partition a of slice 1, etc. Tmp needs to be big enough for worst case usage. Depending on what the server is doing, 99M could be more than enough, or badly undersized. /usr/should be relatively static, and has 208M free - twice the size of /tmp - so I'd recommend leaving it alone. Just adding /tmp to / will alleviate the problems on /, as well as leaving *most* of the space on /tmp available for temporary use. Of course, if something using /tmp then eats all the space on /, the consequences could well be worse than having it eat all the space on /tmp. The other alternative would be to leave /tmp alone, and put /var on / instead. /var is less likely to be filled up by something inconsequential than /tmp. You need to run "disklabel wd0" (wd? not on 4.3) to get the disk layout information. That will list the offset of each partition from the beginning of the disk, giving you the order of the partitions on the disk; it normally follows partition labels, but that's not a requirement. You should also find the b partition information, which is used as swap. You'll have to take the system single user; make a backup, including a printed copy of the disklabel; edit the disklabel - see the disklabel man page; recreate any file systems that have moved; then restore from the backups. You can also look for growfs - check the list archives, as it's not part of the distribution - which will grow a file system after you've added more space to it, instead of having to newfs and restore it. Don't neglect the backup in that case, though - editing disk labels is a dangerous occupation. <mike -- Mike Meyer <mwm@mired.org> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15089.1454.293039.840615>