Re: glabel nor tunefs save my labels

2010-05-12 Thread Carl Johnson
Roland Smith rsm...@xs4all.nl writes:

 On Tue, May 11, 2010 at 07:46:57PM +0200, David DEMELIER wrote:
 2010/5/11 Roland Smith rsm...@xs4all.nl:
  On Tue, May 11, 2010 at 07:08:40PM +0200, David DEMELIER wrote:
  Thanks for all your answers.
 
  mark...@melon ~ $ sudo tunefs -p /dev/ad0s1f
  snip
  tunefs: volume label: (-L)                                 usr
 
  It's weird, as you can see the label is set but nothing in /dev/label,
  /dev/ufs, /dev/vol !
 
 
 Aaah ! So I understand everything now ! Is this written somewhere ?

 See §19.6 (Labeling Disk Devices) in the FreeBSD Handbook. However, it is not 
 mentioned
 there that labels are removed when the partition is mounted. Maybe that
 behavior is recent?

I am not the original poster, but I tried again and I now am mostly
using labels and the labels are still showing in /dev/ufs/.  I didn't
have labels showing in /dev/ufs, but I changed fstab to what they
should be and rebooted.  The system came up using the labels and they
are showing in /dev/ufs/ and using 'glabel status'.

I say mostly because the /usr partition isn't recognized for some
reason, even though dumpfs and tunefs show the label.  That label is
also not shown in /dev/ufs or using 'glabel status'.  That made the
reboot a little tricky since I had to manually mount /usr in order to
get an editor to edit fstab to continue the boot.

-- 
Carl Johnsonca...@peak.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: glabel nor tunefs save my labels

2010-05-12 Thread Roland Smith
On Wed, May 12, 2010 at 09:35:08AM -0700, Carl Johnson wrote:
 Roland Smith rsm...@xs4all.nl writes:
 
  On Tue, May 11, 2010 at 07:46:57PM +0200, David DEMELIER wrote:
  2010/5/11 Roland Smith rsm...@xs4all.nl:
   On Tue, May 11, 2010 at 07:08:40PM +0200, David DEMELIER wrote:
   Thanks for all your answers.
  
   mark...@melon ~ $ sudo tunefs -p /dev/ad0s1f
   snip
   tunefs: volume label: (-L)                                 usr
  
   It's weird, as you can see the label is set but nothing in /dev/label,
   /dev/ufs, /dev/vol !
  
  
  Aaah ! So I understand everything now ! Is this written somewhere ?
 
  See §19.6 (Labeling Disk Devices) in the FreeBSD Handbook. However, it is 
  not mentioned
  there that labels are removed when the partition is mounted. Maybe that
  behavior is recent?
 
 I am not the original poster, but I tried again and I now am mostly
 using labels and the labels are still showing in /dev/ufs/.  I didn't
 have labels showing in /dev/ufs, but I changed fstab to what they
 should be and rebooted.  The system came up using the labels and they
 are showing in /dev/ufs/ and using 'glabel status'.

When I did my testing, I did not reboot the system. Maybe that is the 
difference?

 I say mostly because the /usr partition isn't recognized for some
 reason, even though dumpfs and tunefs show the label.  That label is
 also not shown in /dev/ufs or using 'glabel status'.  That made the
 reboot a little tricky since I had to manually mount /usr in order to
 get an editor to edit fstab to continue the boot.

That is odd indeed. Maybe a misspelling in the label? Anything in dmesg or
/var/log/messages.

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpdBZjBu5aBi.pgp
Description: PGP signature


Re: glabel nor tunefs save my labels

2010-05-12 Thread Carl Johnson
Roland Smith rsm...@xs4all.nl writes:

 On Wed, May 12, 2010 at 09:35:08AM -0700, Carl Johnson wrote:
 Roland Smith rsm...@xs4all.nl writes:
 
  On Tue, May 11, 2010 at 07:46:57PM +0200, David DEMELIER wrote:
  2010/5/11 Roland Smith rsm...@xs4all.nl:
   On Tue, May 11, 2010 at 07:08:40PM +0200, David DEMELIER wrote:
   Thanks for all your answers.
  
   mark...@melon ~ $ sudo tunefs -p /dev/ad0s1f
   snip
   tunefs: volume label: (-L)                                 usr
  
   It's weird, as you can see the label is set but nothing in /dev/label,
   /dev/ufs, /dev/vol !
  
  
  Aaah ! So I understand everything now ! Is this written somewhere ?
 
  See §19.6 (Labeling Disk Devices) in the FreeBSD Handbook. However, it is 
  not mentioned
  there that labels are removed when the partition is mounted. Maybe that
  behavior is recent?
 
 I am not the original poster, but I tried again and I now am mostly
 using labels and the labels are still showing in /dev/ufs/.  I didn't
 have labels showing in /dev/ufs, but I changed fstab to what they
 should be and rebooted.  The system came up using the labels and they
 are showing in /dev/ufs/ and using 'glabel status'.

 When I did my testing, I did not reboot the system. Maybe that is
 the difference?

It might be, but I had rebooted more than once previously.  This time
I mounted them using the labels, so maybe *that* is the difference.  I
have another system running in VirtualBox from Linux (this one is not
a virtual machine) and I don't remember having any similar problems
with labels on it.  It doesn't make sense to me so I really don't
know.

 I say mostly because the /usr partition isn't recognized for some
 reason, even though dumpfs and tunefs show the label.  That label is
 also not shown in /dev/ufs or using 'glabel status'.  That made the
 reboot a little tricky since I had to manually mount /usr in order to
 get an editor to edit fstab to continue the boot.

 That is odd indeed. Maybe a misspelling in the label? Anything in dmesg or
 /var/log/messages.

I have checked many times and can't find anything different about that
FS compared with the others.  It isn't a misspelling because there
isn't anything in /dev/ufs except the other 4 labels that I am already
using.  There is nothing in the logs except the boot error in dmesg
when it couldn't find /usr to mount it.

The system works so I am not really worried about it.  It just
irritates me when I can't get things to work as I think they should.
-- 
Carl Johnsonca...@peak.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: glabel nor tunefs save my labels

2010-05-11 Thread David DEMELIER
Thanks for all your answers.

mark...@melon ~ $ sudo tunefs -p /dev/ad0s1f
tunefs: POSIX.1e ACLs: (-a)disabled
tunefs: NFSv4 ACLs: (-N)   disabled
tunefs: MAC multilabel: (-l)   disabled
tunefs: soft updates: (-n) enabled
tunefs: gjournal: (-J) disabled
tunefs: maximum blocks per file in a cylinder group: (-e)  2048
tunefs: average file size: (-f)16384
tunefs: average number of files in a directory: (-s)   64
tunefs: minimum percentage of free space: (-m) 8%
tunefs: optimization preference: (-o)  time
tunefs: volume label: (-L) usr

It's weird, as you can see the label is set but nothing in /dev/label,
/dev/ufs, /dev/vol !

About blanking the MBR, I will do it when 8.1-RELEASE will be
released, I don't want to rewrite my partition table for the moment.
It's not a serious problem.

Cheers.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: glabel nor tunefs save my labels

2010-05-11 Thread Roland Smith
On Tue, May 11, 2010 at 07:08:40PM +0200, David DEMELIER wrote:
 Thanks for all your answers.
 
 mark...@melon ~ $ sudo tunefs -p /dev/ad0s1f
snip
 tunefs: volume label: (-L) usr
 
 It's weird, as you can see the label is set but nothing in /dev/label,
 /dev/ufs, /dev/vol !

The labels are removed when the partition is mounted somewhere!
So, you will only see the labels of unmounted partitions/disks in devfs.

See for yourself (commands run on my 8.0-RELEASE-p2 system):

Checking that this partition is labeled;

# tunefs -p /dev/ad6s1a
...
tunefs: volume label: (-L) rootbk

When it is mounted,

# mount 
...
/dev/ad6s1a on /mnt/bk/root (ufs, local)

there are no labels:

# ls /dev/ufs/* /dev/ufsid/*
ls: No match.

After unmounting

# umount /dev/ad6s1a
# ls /dev/ufs/* /dev/ufsid/*
/dev/ufs/rootbk  /dev/ufsid/482e0880cf225c60

Both the label set with tunefs and the ufsid label appear!

Mount it again and the labels disappear again;

# mount /mnt/bk/root
# ls /dev/ufs/* /dev/ufsid/*
ls: No match.

Hope this helps.

Roland
-- 

R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpMCV23mcMc6.pgp
Description: PGP signature


Re: glabel nor tunefs save my labels

2010-05-11 Thread David DEMELIER
2010/5/11 Roland Smith rsm...@xs4all.nl:
 On Tue, May 11, 2010 at 07:08:40PM +0200, David DEMELIER wrote:
 Thanks for all your answers.

 mark...@melon ~ $ sudo tunefs -p /dev/ad0s1f
 snip
 tunefs: volume label: (-L)                                 usr

 It's weird, as you can see the label is set but nothing in /dev/label,
 /dev/ufs, /dev/vol !


Aaah ! So I understand everything now ! Is this written somewhere ?

-- 
Demelier David
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: glabel nor tunefs save my labels

2010-05-11 Thread Roland Smith
On Tue, May 11, 2010 at 07:46:57PM +0200, David DEMELIER wrote:
 2010/5/11 Roland Smith rsm...@xs4all.nl:
  On Tue, May 11, 2010 at 07:08:40PM +0200, David DEMELIER wrote:
  Thanks for all your answers.
 
  mark...@melon ~ $ sudo tunefs -p /dev/ad0s1f
  snip
  tunefs: volume label: (-L)                                 usr
 
  It's weird, as you can see the label is set but nothing in /dev/label,
  /dev/ufs, /dev/vol !
 
 
 Aaah ! So I understand everything now ! Is this written somewhere ?

See §19.6 (Labeling Disk Devices) in the FreeBSD Handbook. However, it is not 
mentioned
there that labels are removed when the partition is mounted. Maybe that
behavior is recent?

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpF9O4SyvVPF.pgp
Description: PGP signature


Re: glabel nor tunefs save my labels

2010-05-10 Thread Roland Smith
On Mon, May 10, 2010 at 10:26:18PM +0200, Demelier David wrote:
 Hi,
   I was trying to follow this guide to make labels :
   
 http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/geom-glabel.html
 
   It does not work here, I boot single user and ran these commands :
   glabel label usr /dev/ad0s1f

Do not use this on an already existing filesystem! Use tunefs instead;

tunefs ‐L usr /dev/ad0s1f

If you really want to use glabel, do it on an empty disk or partition. What
you must understand is that 'glabel label' uses the last sector of the
provider to store its metadata. So if you were to do e.g. 

glabel label ‐v usr /dev/da2

A labeled device /dev/label/usr would be created. This is one sector smaller
than /dev/da2! If you were to use newfs on /dev/da2 instead of on
/dev/label/usr, the label would be destroyed once the last sector is 
overwritten!

See the the EXAMPLES section of glabel(8).

   GEOM: ad2s1a: geometry does not match label (255h,63s != 16h,255s).
   GEOM: ad2s1c: geometry does not match label (255h,63s != 16h,255s).
   GEOM: ad2s1: geometry does not match label (255h,63s != 16h,255s).

These are harmless, AFAICT. You can ignore them.

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpIhUKshEiH7.pgp
Description: PGP signature


Re: glabel nor tunefs save my labels

2010-05-10 Thread Demelier David
On Mon, May 10, 2010 at 11:08:30PM +0200, Roland Smith wrote:
 On Mon, May 10, 2010 at 10:26:18PM +0200, Demelier David wrote:
  Hi,
  I was trying to follow this guide to make labels :
  
  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/geom-glabel.html
  
  It does not work here, I boot single user and ran these commands :
  glabel label usr /dev/ad0s1f
 
 Do not use this on an already existing filesystem! Use tunefs instead;
 
 tunefs ‐L usr /dev/ad0s1f
 

I tried this and in single-user mode there were 

root root(a|e|b|d|f) usr tmp var

and I typed exit, it boots, and then no more entries in /dev/ufs ! And now there
is only tmp and var in /dev/vol. I'm so confused now.

 If you really want to use glabel, do it on an empty disk or partition. What
 you must understand is that 'glabel label' uses the last sector of the
 provider to store its metadata. So if you were to do e.g. 
 
 glabel label ‐v usr /dev/da2
 
 A labeled device /dev/label/usr would be created. This is one sector smaller
 than /dev/da2! If you were to use newfs on /dev/da2 instead of on
 /dev/label/usr, the label would be destroyed once the last sector is 
 overwritten!
 

So that was why entries were removed each time I boot.

Thanks for your support.

-- 
Demelier David
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: glabel nor tunefs save my labels

2010-05-10 Thread Roland Smith
On Mon, May 10, 2010 at 11:36:20PM +0200, Demelier David wrote:
 On Mon, May 10, 2010 at 11:08:30PM +0200, Roland Smith wrote:
  On Mon, May 10, 2010 at 10:26:18PM +0200, Demelier David wrote:
   Hi,
 I was trying to follow this guide to make labels :
 
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/geom-glabel.html
   
 It does not work here, I boot single user and ran these commands :
 glabel label usr /dev/ad0s1f
  
  Do not use this on an already existing filesystem! Use tunefs instead;
  
  tunefs ‐L usr /dev/ad0s1f
  
 
 I tried this and in single-user mode there were 
 
 root root(a|e|b|d|f) usr tmp var
 
 and I typed exit, it boots, and then no more entries in /dev/ufs ! And now 
 there
 is only tmp and var in /dev/vol. I'm so confused now.

I do not really understand what you are trying to say here?

Does 'tunefs ‐p /dev/ad0s1f' show that the label exists?

You should know that a label in /dev/ufs and /dev/ufsid is removed as soon as
the filesystem is mounted!

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpJk7YxSo96Z.pgp
Description: PGP signature


Re: glabel nor tunefs save my labels

2010-05-10 Thread Carl Johnson
Demelier David demelier.da...@gmail.com writes:

 On Mon, May 10, 2010 at 11:08:30PM +0200, Roland Smith wrote:
 On Mon, May 10, 2010 at 10:26:18PM +0200, Demelier David wrote:
  Hi,
 I was trying to follow this guide to make labels :
 
  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/geom-glabel.html
  
 It does not work here, I boot single user and ran these commands :
 glabel label usr /dev/ad0s1f
 
 Do not use this on an already existing filesystem! Use tunefs instead;
 
 tunefs ‐L usr /dev/ad0s1f

You can check to see if it is actually set with:
  dumpfs /dev/ad0s1f | grep volname

I have a similar problem with an 8.0 system in which all partitions
are labeled (and verified from a live CD), but nothing shows in
/dev/ufs, and glabel status shows no labels.

-- 
Carl Johnsonca...@peak.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: glabel nor tunefs save my labels

2010-05-10 Thread Michael Powell
Demelier David wrote:

 Hi,
 I was trying to follow this guide to make labels :
 http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/geom-glabel.html
 
 It does not work here, I boot single user and ran these commands :
 glabel label usr /dev/ad0s1f
[snip]

If there was older software on the drive previously you might try blanking 
the MBR. I know I had trouble installing 8.0 on a drive that previously had 
6.2 installed on it. Something about the MBR support in 8.0 was different 
and the labels from 6.2 were invisible to it. So when it came time for 
disklabel to write out the labels during the 8.0 install it would fail. This 
is what I did: Boot from a LiveFS CD and execute:

sysctl kern.geom.debugflags=16

dd if=/dev/zero of=/dev/adx oseek=1 bs=512 count=1

Replace 'x' in adx with your drive number. If your problem is being caused 
by the same situation I experienced this should take care of it. 

 
 Do I am missing something? On my other machine it prints a lot of
 GEOM: ad2s1a: geometry does not match label (255h,63s != 16h,255s).
 GEOM: ad2s1c: geometry does not match label (255h,63s != 16h,255s).
 GEOM: ad2s1: geometry does not match label (255h,63s != 16h,255s).
 
For the most part simply ignore these. Lots of people see them nowadays and 
considered to be cosmetic and harmless. I believe it has something to do the 
drift away from the old MBR DOS compatibility days and the move to newer 
slicing/partitioning schemes. In other words these will eventually 
disappear, but in the meantime are probably a red herring.

-Mike
 


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org