phaeton
November 18th, 2006, 18:28
Hello!
I have a feeling that I'm misunderstanding disk mounting
procedures. Any pointers would be appreciated. Here's my dilemma:


I have a headless machine I want to use for a small, simple webserver.
It has the freebsd 6.1 OS installed on ad0, and I have a 9770mb hdd as
ad2 that I want to separate into 7 different partitions and use for
daily backups (I realize that backing up every day is a little
excessive, but humor me for the moment). I think I've figured out
bsdlabel and gotten the backup drive configured as I want:


webface# disklabel /dev/ad2
# /dev/ad2:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 2000896 16 4.2BSD 1024 8192 16
b: 2000896 2000912 4.2BSD 1024 8192 16
c: 20010816 0 unused 0 0 # "raw" part,
don't edit
d: 2000896 4001808 4.2BSD 1024 8192 16
e: 2000896 6002704 4.2BSD 1024 8192 16
f: 2000896 8003600 4.2BSD 1024 8192 16
g: 2000896 10004496 4.2BSD 1024 8192 16
h: 8005424 12005392 4.2BSD 1024 8192 16


What I want to do is mount each of the 7 available partitions onto my
ad0 drive, under the appropriate /backup/mon, /backup/tue, backup/wed
etc.. however:


webface# mount /dev/ad2s1a /backup/mon
mount: /dev/ad2s1a: No such file or directory


webface# mount /dev/ad2s1b /backup/tue
mount: /dev/ad2s1b: No such file or directory


Although I can:


webface# mount /dev/ad2s1c backup/mon


just fine. Have I done something wrong, or is it a matter of I cannot
mount individual partitions from one disk all willy-nilly onto another
disk? Should I create a root directory on ad2, and mount all ad2
partitions to that instead, then mount ad2's root to my
/dev/ad0s1a/backup?


Thanks for any and all.


-phaeton

bmw
November 19th, 2006, 19:26
First off, you actually can't use the b or c partitions as they are reserved. Well c is physically reserved, and b is assumed to be a swap partition by so many things that you really shouldn't use it for anything else. That leaves a total of 6 usable partitions.

I'm not sure why you want the day-of-the-week areas to be on physically unique partitions, BTW. That sounds like a future admin headache to me.

Did you newfs your partitions? Check out Adding Disks (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/disks-adding.html) at freebsd.org.

I would just create one big partition (the handbook recommends "e"), mount that on /backups and create 7 folders right under that for mon, tue, etc.

There's nothing excessive with once a day backups. Use rsync to create a mirror for you and the load on your system will be very slight.

Great avatar, BTW. Is that a 2N5104 by any chance? I haven't played with FETs in eons ...

phaeton
December 2nd, 2006, 19:35
Thanks BMW....


So I'm just overcomplicating things, i take it. I thought about just making one huge 'e' partition and making separate directories. Something told me that making seperate partitions were the way to go (must be the old linux influence, or something)


Anyways, I'll give that a shot.


I'm still half tempted to use netbsd for this instead of fbsd for it, but i can't think of any real reason to use one over the other, except for "i wanna". ;)

-phaeton


Oh, btw... i don't know exactly what the semiconductor in the pic is. I'm sure I stole it from Jameco, many years ago. Having a 4th lead on it makes me curious though. For the record, most of the FETs I mess with are J201s ;)