Return to BSD News archive
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!monoceros.EECS.Berkeley.EDU!alanp From: alanp@monoceros.EECS.Berkeley.EDU (Alan Pearson) Newsgroups: comp.os.386bsd.questions Subject: Re: Second disk... Date: 13 May 1994 03:06:54 GMT Organization: University of California, Berkeley Lines: 63 Message-ID: <2quqse$6hm@agate.berkeley.edu> References: <CppBt8.A4C@world.std.com> NNTP-Posting-Host: monoceros.eecs.berkeley.edu In article <CppBt8.A4C@world.std.com>, Brian J McGovern <mcgovern@world.std.com> wrote: >I'm sure that this is a fairly straight forward question, so I'll make it a >little more complex. I added a second drive - a duplicate of my primary >drive (ie - added a wd1 with the same specs as wd0). I did a >disktab -r -w wd1 QUANTUM_LPS to label the disk (disktab information to >follow). This set the drive up with several partions of various size (root, >swap, etc). However, /dev/wd1c and /dev/wd1d seemed to be the "whole drive" in >one partition, which is what I want to mount. I then do a >"mount /dev/wd1c /usr2" to mount the disk... The problems I'm having are: > >1.) Is it really "safe" to do this? I newfs'ed the drive, and it seems to >be working ok. Even test reads/writes work fine so far. I just don't want >to dump a bunch of data on there, and have it go bad. > I don't know if it is actually dangerous (since I have never tried it and havent verified for sure that you WILL lose data), but I don't by any means think it is safe. What you are doing is not right, and the potential is there for you to get burned. partitions c and d do not define mountable filesystems. They are "aliases" for the whole disk that can be used to access the entire thing with device. You are not meant to mount them or newfs them. The problem is that there is no tc (fs type), bc (blocksize) or fc (fragment size) values for the c partition. Also for partiton d. If you really want the entire drive to be 1 filesystem, use partition a, and set up it's length to describe the whole drive. like this: QUANTUM_LPS_2|drive 2:\ :dt=ST506:ty=winchester:nc#901:ns#17:nt#15:se#512:\ :pa#229500:oa#255:ta=4.2BSD:ba#4096:fa#512:\ :pc#229500:oc#255:\ :pd#229755:od#0: You delete partition b, since you dont want swap, and use partition a as your unix filesystem. Make a copy of the disktab for drive 1 and modify it, since you don't want to change the partition information for drive 1. Then newfs /dev/rwd1a and mount /dev/wd1a on /usr2 You said you were able to newfs the drive... did you newfs /dev/rwd1c? And this worked??? I don't think this should be allowed to work since the c partition is not type 4.2BSD. newfs is wrong in doing that if that is what happened. >2.) When I do a df to see how much space I have, I get slightly more than >100,000 1K "blocks" on the drive, 0 used (the drive is still empty, so this >number seems ok),, then 93,000 or so blocked free. Why is there the 7000 or >so difference? Just wondering... > This should be a faq. BSD's fast filesystem reserves ~10% of the disk for free space in order to guarantee that its allocation algorithms do not degrade when the disk is near full. The superuser can continue to put stuff on the disk past the 100% full situation, and sometimes you may see df report a disk as 110% full. Normal users' writes will fail if they try to go beyond the 100% full mark. -- alan pearson alanp@cory.eecs.berkeley.edu UC Berkeley EECS