Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 May 2001 16:35:30 +0200
From:      Christoph Sold <so@i-clue.de>
To:        sam <sam2539@the-beach.net>, freebsd-questions@FreeBSD.ORG
Subject:   Re: mount da0 da1 is it an illusion?
Message-ID:  <01051116353003.17691@informatix.i-clue.de>
In-Reply-To: <200105111234.f4BCYsG06204@newgate.miami.home>
References:  <200105111234.f4BCYsG06204@newgate.miami.home>

next in thread | previous in thread | raw e-mail | index | archive | help
Well, Indeed it's confusing. But it's simple, if you think about it.

You did once format the second disk as a FreeBSD disk, along with all the 
gory details. Then, it was mounted as first (da0) disk. Thus, the disklabels 
from the disk still read da0sXx. The disklabel gets the information at label 
time, it stays the same no matter what. Thus, after remounting the disk on 
da1, the disklabel does not change.

HTH
-Christoph Sold

On Friday 11 May 2001 15:36, sam wrote:
> I am so confused.
>
> The machine has 2 identical SCSI drives: size, manufacturer, what on
> them I'm not sure anymore.
> # df
> Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
> /dev/da0s1a     99183    27958    63291    31%    /
> /dev/da0s1g   7203658    40912  6586454     1%    /home
> /dev/da0s1f    992239   690397   222463    76%    /usr
> /dev/da0s1e    127023     1804   115058     2%    /var
> procfs              4        4        0   100%    /proc
>
> I thought I was mounting the second drive by doing:
>
> # mount da1s1 /BU
> # cd /BU
> # ls -l
> drwxr-xr-x  15 root  wheel  2048 May  4 13:16 etc
> drwxr-xr-x   5 root  wheel   512 May 11 05:35 home
>
> BUT the second drive was once partitioned the same as the boot drive so
> the copied files are just going to "/" on the second drive in a small
> partition.
> #df
> Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
> /dev/da0s1a     99183    27958    63291    31%    /
> /dev/da0s1g   7203658    40912  6586454     1%    /home
> /dev/da0s1f    992239   690397   222463    76%    /usr
> /dev/da0s1e    127023     1804   115058     2%    /var
> procfs              4        4        0   100%    /proc
> /dev/da1s1      99183    43280    47969    47%    /BU
>
> See, it's half full and /BU is the same size as /.
>
> #Now it's start getting more interesting.
>
> So I thought, "how nice, I can mount all the partitions on da1 and copy
> the same file systems." Like:
> /dev/da1s1a /BU
> /dev/da1s1g /BUhome
> And so on.
>
> But there was no /dev/da1s1a. So being braver than smart, I don't read
> about MAKEDEV and do:
> # MAKEDEV da1s1a.
>
> I got lost but it appears to have made da1s1a - da1s1h?
>
> BUT then it got really scary.
>
> # mount /dev/da1s1a /BU
> # cd /BU
> # ls -l
> -rw-r--r--   2 root  wheel      658 Nov 20 07:03 .cshrc
> -rw-r--r--   2 root  wheel      251 Nov 20 07:03 .profile
> -r--r--r--   1 root  wheel     4735 Nov 20 07:03 COPYRIGHT
> drwxr-xr-x   2 root  wheel     1024 Mar 12 10:51 bin
> drwxr-xr-x   3 root  wheel      512 Mar 12 10:52 boot
> drwxr-xr-x   2 root  wheel      512 Mar 12 10:48 cdrom
> lrwxr-xr-x   1 root  wheel       11 Mar 12 10:52 compat -> /usr/compat
> drwxr-xr-x   3 root  wheel    13824 Mar 12 15:57 dev
> drwxr-xr-x   2 root  wheel      512 Mar 12 10:48 dist
> drwxr-xr-x  15 root  wheel     2048 Mar 15 11:03 etc
> drwxr-xr-x   2 root  wheel      512 Mar 12 10:48 home
> -r-xr-xr-x   1 root  wheel  3258128 Nov 20 08:02 kernel
> -r-xr-xr-x   1 root  wheel  3258128 Nov 20 08:02 kernel.GENERIC
> drwxr-xr-x   2 root  wheel      512 Nov 20 06:56 mnt
> drwxr-xr-x   2 root  wheel     2560 Mar 12 10:48 modules
> dr-xr-xr-x   2 root  wheel      512 Nov 20 06:56 proc
> drwxr-xr-x   2 root  wheel      512 Mar 12 10:48 root
> drwxr-xr-x   2 root  wheel     2048 Mar 12 10:51 sbin
> drwxr-xr-x   4 root  wheel     1024 Mar 12 10:48 stand
> lrwxrwxrwx   1 root  wheel       11 Mar 12 10:49 sys -> usr/src/sys
> drwxrwxrwt   2 root  wheel      512 Mar 15 11:04 tmp
> drwxr-xr-x   2 root  wheel      512 Mar 12 10:48 usr
> drwxr-xr-x   2 root  wheel      512 Mar 12 10:48 var
>
> What the hell is that. I almost did:
> # cd /BU
> # rm -R *
>
> Thinking I was looking at some old installation on the second disk.
>
> It's an illusion. It must be the way I did MAKEDEV right? da0s1a and
> da1s1a are the same thing???
>
> If you're still with me. I think I need to reformat the second disk. But
> I'm not sure what's real and what's an illusion.
>
> Look at the line below labeled "disk:" after  disklabel -r for both da0
> and da1:
>
> ns1[/]# disklabel -r da0s1
> # /dev/da0s1c:
> type: SCSI
> disk: da0s1
>
> ns1[/]# disklabel -r da1s1
> # /dev/da1s1c:
> type: SCSI
> disk: da0s1
>
> Obviously I am clueless. I'll go google and man for few hours now.
>
> Please, if anyone can shed some light.
>
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

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?01051116353003.17691>