Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jan 2009 10:00:46 -0500
From:      Jerry McAllister <jerrymc@msu.edu>
To:        Eduardo Meyer <dudu.meyer@gmail.com>
Cc:        Jerry McAllister <jerrymc@msu.edu>, stable@freebsd.org, questions@freebsd.org
Subject:   Re: switching bsdlabel's label
Message-ID:  <20090121150046.GA61468@gizmo.acns.msu.edu>
In-Reply-To: <d3ea75b30901210445l70d48631r496d9f45db667be0@mail.gmail.com>
References:  <d3ea75b30901200724o4bc9b515y71733fcb2f5808f9@mail.gmail.com> <20090120161355.GA28525@hugo10.ka.punkt.de> <d3ea75b30901200936n15ae0b03m4c48ba55f3728d44@mail.gmail.com> <20090120184216.GA57318@gizmo.acns.msu.edu> <d3ea75b30901210445l70d48631r496d9f45db667be0@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 21, 2009 at 10:45:28AM -0200, Eduardo Meyer wrote:

> On Tue, Jan 20, 2009 at 4:42 PM, Jerry McAllister <jerrymc@msu.edu> wrote:
> > On Tue, Jan 20, 2009 at 03:36:34PM -0200, Eduardo Meyer wrote:
> >
> >> On Tue, Jan 20, 2009 at 2:13 PM, Patrick M. Hausen <hausen@punkt.de> wrote:
> >> > Hello,
> >> >
> >> > On Tue, Jan 20, 2009 at 01:24:27PM -0200, Eduardo Meyer wrote:
> >> >> I have a certain disk where da0s1a and da0s1d are inverted. By some
> >> >> reason someone labelled root as 'd' and home as 'a'.
> >> >>
> >> >> Can I just
> >> >>
> >> >> bsdlabel -n da0s1 > savedabel.txt
> >> >>
> >> >> Edit savedlabel.txt, switch and restore? (bsdlabel -R da0s1 savedlabel)
> >> >
> >> > Why not simply use bsdlabel -e da0s1?
> >>
> >> Because I didnt know about that? ;-)
> >>
> >> Thank you for the hint.
> >>
> >> However I still have the same doubt. Since basically its the same
> >> task, Is it safe do relabel this way?
> >
> > Hmmm.  Is there stuff written on the disk.  Is root stuff really written
> > on da0s1d and /home stuff really written on da0s1a?   Does the system boot
> > from it OK?
> >
> > Or is it just that the mounts are switched.
> > The mount points are not written in to the label.   That comes after
> > booting.   If it boots, I wonder if it really is switched on the
> > partitions or if it is just that the partitions are mounted backwards
> > (probably due to editing /etc/fstab incorrectly).
> >
> > ////jerry
> 
> Hello Patrick, thanks again. Yes, label is switched. Yes there really
> are stuff on the partitions. No, I dont boot from da0s1d. It is a disk
> for migration. But the one who partitioned was fooled by Sysinstall
> which creates the first label on extra disks as 'd' and the last from
> the allowed 7 as 'a'. Therefore this server is still booting on the
> original disk (ad6s1a) and everything else is mounted in the new one
> (da0s1), everything but root.

What sysinstall does is assume that the 'a' partition will be
used for a root mount and the 'b' partition will be used for swap.
Sinc 'c' is reserved, it starts with 'd'.   Then, if you later 
add an 'a' it will end up being later (higher offset) than the 'd'.

I suppose it might confuse a person, but otherwise it is no problem
and probably would be best to just leave it that way.   You really
only need to use the mount point anyway most of the time.  So, if
the mount point addresses the partition you want to with that name,
then you should have no problem.

You could switch it around using bsdlabel, but I don't think the 
risk would be worth the negligible gain.   But, do as you wish.

////jerry     


> 
> >
> >
> >
> >
> >>
> >> >
> >> > Kind regards,
> >> > Patrick
> >> > --
> >> > punkt.de GmbH * Kaiserallee 13a * 76133 Karlsruhe
> >> > Tel. 0721 9109 0 * Fax 0721 9109 100
> >> > info@punkt.de       http://www.punkt.de
> >> > Gf: Jürgen Egeling      AG Mannheim 108285
> >> >
> >>
> >>
> >>
> >> --
> >> ===========
> >> Eduardo Meyer
> >> pessoal: dudu.meyer@gmail.com
> >> profissional: ddm.farmaciap@saude.gov.br
> >> _______________________________________________
> >> freebsd-questions@freebsd.org mailing list
> >> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> >> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
> >>
> >
> 
> 
> 
> -- 
> ===========
> Eduardo Meyer
> pessoal: dudu.meyer@gmail.com
> profissional: ddm.farmaciap@saude.gov.br
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090121150046.GA61468>