Re: absolute vs. relative offsets in disklabel

2006-07-31 Thread Dan Nelson
In the last episode (Aug 01), Dmitry Marakasov said:
> Recent `disklabel differences FreeBSD, DragonFly' thread gave me a
> thought - why do we have absolute offsets in disklabel? AFAIK, on
> NetBSD and OpenBSD, label is not necessarily located `near'
> filesystems stored in it's partitions - and even disklabel utility
> shows absolute offsets (with 'c' covering entire device). FreeBSD,
> however, seem to step far away from that standart - 8 partitions
> instead of 16, label located in the beginning of a partition,
> bsdlabel shows relative offsets. Now I wonder if there are any
> reasons for offsets to be actually absolute? There are many weighty
> arguments for relative offsets:

I asked this question a few years ago after having problems dd'ing a
FreeBSD installation from one disk to another, and the answer was "it's
always been that way" :) It shouldn't be too hard to have the code
autodetect whether the offsets are relative or absolute by looking at
what the 'c' partition's offset is.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: absolute vs. relative offsets in disklabel

2006-08-01 Thread Dmitry Marakasov
* Dan Nelson ([EMAIL PROTECTED]) wrote:
> > Recent `disklabel differences FreeBSD, DragonFly' thread gave me a
> > thought - why do we have absolute offsets in disklabel? AFAIK, on
> > NetBSD and OpenBSD, label is not necessarily located `near'
> > filesystems stored in it's partitions - and even disklabel utility
> > shows absolute offsets (with 'c' covering entire device). FreeBSD,
> > however, seem to step far away from that standart - 8 partitions
> > instead of 16, label located in the beginning of a partition,
> > bsdlabel shows relative offsets. Now I wonder if there are any
> > reasons for offsets to be actually absolute? There are many weighty
> > arguments for relative offsets:
> I asked this question a few years ago after having problems dd'ing a
> FreeBSD installation from one disk to another, and the answer was "it's
> always been that way" :) It shouldn't be too hard to have the code
> autodetect whether the offsets are relative or absolute by looking at
> what the 'c' partition's offset is.
The only problem seem to be that older FreeBSD versions won't be able to
use modified labels.

-- 
Best regards,
 Dmitry  mailto:[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: absolute vs. relative offsets in disklabel

2006-08-03 Thread Ulrich Spoerlein
Dmitry Marakasov wrote:
> There are many weighty arguments for relative offsets:
> - No confusion (once I did try to dd slice from one place on disk to
>   another to copy it, and was very surprised when changes made on one
>   partition appeared on another as well)
> - Ability to copy and move slices with simple dd(1).

Yes please! I am faced with the problem, that I want to offset my
FreeBSD slice about -2GB, so I can use growfs to enlarge it.

btw, how hard would it be to write a shrinkfs and perhaps movefs tool?

Ulrich Spoerlein
-- 
A: Yes.
>Q: Are you sure?
> >A: Because it reverses the logical flow of conversation.
> >>Q: Why is top posting frowned upon?
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: absolute vs. relative offsets in disklabel

2006-08-03 Thread Oliver Fromme
Ulrich Spoerlein wrote:
 > btw, how hard would it be to write a shrinkfs and perhaps movefs tool?

movefs shouldn't be very difficult, but shrinkfs is more
complex, because you have to relocate files and metadata
within the filesystem.  The shrink operation can fail if
there isn't enough space in the new size for all data
(and you need to take into account that not only data
space is reduced, but also the number of inodes).  Snap-
shots will make it even more complicated.

But then again, harddisks tend to get bigger, so there is
probably not much need for a shrinkfs tool.

Best regards
   Oliver

-- 
Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

We're sysadmins.  To us, data is a protocol-overhead.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: absolute vs. relative offsets in disklabel

2006-08-03 Thread Alexander Leidinger
Quoting Ulrich Spoerlein <[EMAIL PROTECTED]> (Wed, 2 Aug 2006 21:25:07 +0200):

> btw, how hard would it be to write a shrinkfs and perhaps movefs tool?

I've seen a commit to perforce which talked about shrinking an FS... I
don't remember where.

Bye,
Alexander.

-- 
That would be because the software doesn't work.
http://www.Leidinger.net  Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org netchild @ FreeBSD.org  : PGP ID = 72077137
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: absolute vs. relative offsets in disklabel

2006-08-03 Thread Dag-Erling Smørgrav
Dmitry Marakasov <[EMAIL PROTECTED]> writes:
> Recent `disklabel differences FreeBSD, DragonFly' thread gave me a
> thought - why do we have absolute offsets in disklabel?

We don't, AFAIK.  Since the transition to GEOM, the offsets are
relative to the start of the containing provider.

DES
-- 
Dag-Erling Smørgrav - [EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: absolute vs. relative offsets in disklabel

2006-08-04 Thread Alexander Leidinger
Quoting Oliver Fromme <[EMAIL PROTECTED]> (Thu, 3 Aug 2006 14:48:24 +0200 
(CEST)):

> But then again, harddisks tend to get bigger, so there is
> probably not much need for a shrinkfs tool.

Sometimes it's not an availability decision... think about EMC,
disk pools and changing requirements in an environment where the
decision makers know enough to use their desktop system.

Bye,
Alexander.

-- 
 "Maybe you can't understand this, but I finally found what I need to be
happy, and it's not friends, it's things." -Fry
http://www.Leidinger.net  Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org netchild @ FreeBSD.org  : PGP ID = 72077137
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: absolute vs. relative offsets in disklabel

2006-08-06 Thread Dmitry Marakasov
* Dag-Erling Sm?rgrav ([EMAIL PROTECTED]) wrote:
> > Recent `disklabel differences FreeBSD, DragonFly' thread gave me a
> > thought - why do we have absolute offsets in disklabel?
> We don't, AFAIK.  Since the transition to GEOM, the offsets are
> relative to the start of the containing provider.
It has nothing to do with GEOM, it's ondisk format of disklabel. I've
confirmed, there are global offsets.

-- 
Best regards,
 Dmitry  mailto:[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: absolute vs. relative offsets in disklabel

2006-08-07 Thread John Baldwin
On Sunday 06 August 2006 10:59, Dmitry Marakasov wrote:
> * Dag-Erling Sm?rgrav ([EMAIL PROTECTED]) wrote:
> > > Recent `disklabel differences FreeBSD, DragonFly' thread gave me a
> > > thought - why do we have absolute offsets in disklabel?
> > We don't, AFAIK.  Since the transition to GEOM, the offsets are
> > relative to the start of the containing provider.
> It has nothing to do with GEOM, it's ondisk format of disklabel. I've
> confirmed, there are global offsets.

Actually, the GEOM provider goes though some gymnastics to portray the offsets 
as relative to userland, but ondisk they are still stored as absolute to 
preserve compatiblity.
-- 
John Baldwin
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: absolute vs. relative offsets in disklabel

2006-08-07 Thread Roman Kurakin

John Baldwin:


On Sunday 06 August 2006 10:59, Dmitry Marakasov wrote:
 


* Dag-Erling Sm?rgrav ([EMAIL PROTECTED]) wrote:
   


Recent `disklabel differences FreeBSD, DragonFly' thread gave me a
thought - why do we have absolute offsets in disklabel?
   


We don't, AFAIK.  Since the transition to GEOM, the offsets are
relative to the start of the containing provider.
 


It has nothing to do with GEOM, it's ondisk format of disklabel. I've
confirmed, there are global offsets.
   



Actually, the GEOM provider goes though some gymnastics to portray the offsets 
as relative to userland, but ondisk they are still stored as absolute to 
preserve compatiblity.
 


You mean that "read mbroffset" to geom could return a relative value?

rik


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: absolute vs. relative offsets in disklabel

2006-08-07 Thread John Baldwin
On Monday 07 August 2006 17:05, Roman Kurakin wrote:
> John Baldwin:
> 
> >On Sunday 06 August 2006 10:59, Dmitry Marakasov wrote:
> >  
> >
> >>* Dag-Erling Sm?rgrav ([EMAIL PROTECTED]) wrote:
> >>
> >>
> Recent `disklabel differences FreeBSD, DragonFly' thread gave me a
> thought - why do we have absolute offsets in disklabel?
> 
> 
> >>>We don't, AFAIK.  Since the transition to GEOM, the offsets are
> >>>relative to the start of the containing provider.
> >>>  
> >>>
> >>It has nothing to do with GEOM, it's ondisk format of disklabel. I've
> >>confirmed, there are global offsets.
> >>
> >>
> >Actually, the GEOM provider goes though some gymnastics to portray the 
offsets 
> >as relative to userland, but ondisk they are still stored as absolute to 
> >preserve compatiblity.
> >  
> >
> You mean that "read mbroffset" to geom could return a relative value?

No, this is specific to the BSD label class, not something GEOM does in 
general.

-- 
John Baldwin
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"