Re: gpart, glabel and newfs -- what am I doing wrong

2013-01-13 Thread Erich Dollansky
Hi,

On Sun, 13 Jan 2013 01:36:21 -0500
kpn...@pobox.com wrote:

 On Sun, Jan 13, 2013 at 08:09:00AM +0700, Erich Dollansky wrote:
  For what is glabel then still good?
 
 It is still useful for partition schemes that don't have labels (eg,
 MBR) AND the filesystem used doesn't support labels itself AND the
 end of the partition does not get touched by the filesystem.
 
 Note that UFS in FreeBSD does support labels. I believe it is the '-L'
 option to newfs. ZFS does not in this sense, and ZFS touches the end
 of the partition.
 
 That's a long list of conditions. So, really, glabel should typically
 be avoided.
 

thanks for the explaination. I am not able to use the labels outside
gpart but if they work for me - as it currently looks like - I will
stick with them.

I will later report in more detail when I have finished my scripts.

Erich
___
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: gpart, glabel and newfs -- what am I doing wrong

2013-01-13 Thread Warren Block

On Sun, 13 Jan 2013, kpn...@pobox.com wrote:


On Sun, Jan 13, 2013 at 08:09:00AM +0700, Erich Dollansky wrote:

For what is glabel then still good?


It is still useful for partition schemes that don't have labels (eg, MBR)
AND the filesystem used doesn't support labels itself AND the end of the
partition does not get touched by the filesystem.


But it doesn't matter what the filesystem does.  Access to the last 
block is not allowed by the label device.  The filesystem does not even 
see it.  See my reply in -fs:

http://lists.freebsd.org/pipermail/freebsd-fs/2013-January/016113.html
___
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: gpart, glabel and newfs -- what am I doing wrong

2013-01-13 Thread Warren Block

On Sun, 13 Jan 2013, Warren Block wrote:


On Sun, 13 Jan 2013, kpn...@pobox.com wrote:


On Sun, Jan 13, 2013 at 08:09:00AM +0700, Erich Dollansky wrote:

For what is glabel then still good?


It is still useful for partition schemes that don't have labels (eg, MBR)
AND the filesystem used doesn't support labels itself AND the end of the
partition does not get touched by the filesystem.


But it doesn't matter what the filesystem does.  Access to the last block is 
not allowed by the label device.  The filesystem does not even see it.  See 
my reply in -fs:

http://lists.freebsd.org/pipermail/freebsd-fs/2013-January/016113.html


Sorry, forgot to mention that one possible use for glabel is to label a 
swap partition on an MBR drive.


  # glabel label myswap /dev/ada0s1b

And then in /etc/fstab:

  /dev/label/myswap noneswapsw  0   0

One block is used for metadata at the end of ada0s1b, but it's safe from 
overwriting because /dev/label/myswap does not include that block.

___
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


gpart, glabel and newfs -- what am I doing wrong

2013-01-12 Thread Erich Dollansky
Hi,

in general, I try to create the partitions with gpart, add a label with
glabel and put a filesystem. I think that I am doing something very
simple the wrong way but I cannot see the error.

I try to do it in the following way:

# gpart destroy -F da0
# gpart create -s GPT da0
# gpart add -t freebsd-boot -s 64k da0
# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0
# gpart add -t freebsd-ufs -s 512m -a 4k -l Toshiba16GB2boot da0
# gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2root da0
# gpart add -t freebsd-swap -s 10m -a 4k -l Toshiba16GB2swap da0
# gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2var da0
# gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2tmp da0
# gpart add -t freebsd-ufs -a 4k -l Toshiba16GB2usr da0

Label the partitions:

# glabel label Toshiba16GB2boot /dev/da0p2
# glabel label Toshiba16GB2root /dev/da0p3
# glabel label Toshiba16GB2swap /dev/da0p4
# glabel label Toshiba16GB2var /dev/da0p5
# glabel label Toshiba16GB2tmp /dev/da0p6
# glabel label Toshiba16GB2usr /dev/da0p7

And put a file system onto the partitions.

# newfs /dev/label/Toshiba16GB2boo
# newfs /dev/label/Toshiba16GB2roo
# newfs /dev/label/Toshiba16GB2var
# newfs /dev/label/Toshiba16GB2tmp
# newfs /dev/label/Toshiba16GB2usr

But newfs on the first partition results in this:

Filesystem size 15  minimum size of 48

When I ran the newfs directly on the device, I get this:

[X220]/home/erich (root)  newfs /dev/da0p2
/dev/da0p2: 512.0MB (1048576 sectors) block size 32768, fragment size
4096 using 4 cylinder groups of 128.03MB, 4097 blks, 16512 inodes.
super-block backups (for fsck -b #) at:
 192, 262400, 524608, 786816

Of course, this is what I expect.

I believe that it is something simple but I am not able to see my
mistake.

Erich
___
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: gpart, glabel and newfs -- what am I doing wrong

2013-01-12 Thread Mardorf Ralf
FWIW I could not partition using the FreeBSD 9.0 amd64 install DVD. I 
partitioned with the PcBSD  8.2 DVD and then tried to install from 9.0, but it 
anyway caused partitioning issues.
After that I partitioned using FreeBSD 8.3, installed 8.3 and then updated to 
9.1.

Regards,
Ralf

___
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: gpart, glabel and newfs -- what am I doing wrong

2013-01-12 Thread Warren Block

On Sat, 12 Jan 2013, Erich Dollansky wrote:


in general, I try to create the partitions with gpart, add a label with
glabel and put a filesystem. I think that I am doing something very
simple the wrong way but I cannot see the error.

I try to do it in the following way:

# gpart destroy -F da0
# gpart create -s GPT da0
# gpart add -t freebsd-boot -s 64k da0
# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0
# gpart add -t freebsd-ufs -s 512m -a 4k -l Toshiba16GB2boot da0
# gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2root da0
# gpart add -t freebsd-swap -s 10m -a 4k -l Toshiba16GB2swap da0
# gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2var da0
# gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2tmp da0
# gpart add -t freebsd-ufs -a 4k -l Toshiba16GB2usr da0

Label the partitions:

# glabel label Toshiba16GB2boot /dev/da0p2
# glabel label Toshiba16GB2root /dev/da0p3
# glabel label Toshiba16GB2swap /dev/da0p4
# glabel label Toshiba16GB2var /dev/da0p5
# glabel label Toshiba16GB2tmp /dev/da0p6
# glabel label Toshiba16GB2usr /dev/da0p7


There is no need for all this.  You already created GPT labels with
'gpt -l' above.  And those labels don't need extra metadata at the end 
of the partition.



And put a file system onto the partitions.

# newfs /dev/label/Toshiba16GB2boo
# newfs /dev/label/Toshiba16GB2roo
# newfs /dev/label/Toshiba16GB2var
# newfs /dev/label/Toshiba16GB2tmp
# newfs /dev/label/Toshiba16GB2usr


Those look cut off.  And there's surely a limit to the length of label 
names, but I'm not sure what it is.  Anyway, use


  # newfs /dev/gpt/Toshiba16GB2boot

And consider using -U with newfs.
___
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: gpart, glabel and newfs -- what am I doing wrong

2013-01-12 Thread Erich Dollansky
Hi,

On Sat, 12 Jan 2013 09:56:39 -0700 (MST)
Warren Block wbl...@wonkity.com wrote:

 On Sat, 12 Jan 2013, Erich Dollansky wrote:
 
  in general, I try to create the partitions with gpart, add a label
  with glabel and put a filesystem. I think that I am doing something
  very simple the wrong way but I cannot see the error.
 
  I try to do it in the following way:
 
  # gpart destroy -F da0
  # gpart create -s GPT da0
  # gpart add -t freebsd-boot -s 64k da0
  # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0
  # gpart add -t freebsd-ufs -s 512m -a 4k -l Toshiba16GB2boot da0
  # gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2root da0
  # gpart add -t freebsd-swap -s 10m -a 4k -l Toshiba16GB2swap da0
  # gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2var da0
  # gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2tmp da0
  # gpart add -t freebsd-ufs -a 4k -l Toshiba16GB2usr da0
 
  Label the partitions:
 
  # glabel label Toshiba16GB2boot /dev/da0p2
  # glabel label Toshiba16GB2root /dev/da0p3
  # glabel label Toshiba16GB2swap /dev/da0p4
  # glabel label Toshiba16GB2var /dev/da0p5
  # glabel label Toshiba16GB2tmp /dev/da0p6
  # glabel label Toshiba16GB2usr /dev/da0p7
 
 There is no need for all this.  You already created GPT labels with
 'gpt -l' above.  And those labels don't need extra metadata at the
 end of the partition.
 
For what is glabel then still good?

 And consider using -U with newfs.

Do not worry, this was just for the test.

Erich
___
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