Re: gpart questions

2011-04-26 Thread Bruce Cran
On Tue, 26 Apr 2011 03:10:48 -0500
CyberLeo Kitsana  wrote:

> # gpart add -b 63 -s 1048500 -t freebsd md0

You could simplify it by using:

gpart add -b 63 -t freebsd md0

> # gpart add -b 16 -s 1048484 -t freebsd-ufs md0s1

Likewise:

gpart add -b 16 -t freebsd-ufs md0s1

Or, if you want to specify a size, you can use "-s 512m"

-- 
Bruce Cran
___
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 questions

2011-04-26 Thread CyberLeo Kitsana
On 04/24/2011 12:24 PM, Helmut Schneider wrote:
> Hi,
> 
> i'm playing around with (virtual) disks within a VMware ESXi 4.1 server:
> ...
> So, what did sysinstall that gpart didn't?

You forgot to gpart create the inner BSD label on da1s1.

8<
# mdconfig -a -t swap -s 512M
md0
# gpart show md0
gpart: No such geom: md0.
# gpart create -s mbr md0
md0 created
# gpart show md0
=>  9  1048563  md0  MBR  (512M)
9  1048563   - free -  (512M)

# gpart add -b 63 -s 1048500 -t freebsd md0
md0s1 added
# gpart show md0
=>  9  1048563  md0  MBR  (512M)
9   54   - free -  (27K)
   63  10485001  freebsd  (512M)
  10485639   - free -  (4.5K)

# gpart show md0s1
gpart: No such geom: md0s1.
# gpart create -s bsd md0s1
md0s1 created
# gpart show md0s1
=>  0  1048500  md0s1  BSD  (512M)
0  1048500 - free -  (512M)
# gpart add -b 16 -s 1048484 -t freebsd-ufs md0s1
md0s1a added
# gpart show md0s1
=>  0  1048500  md0s1  BSD  (512M)
0   16 - free -  (8.0K)
   16  1048484  1  freebsd-ufs  (512M)

# ls -la /dev/md0*
crw-r-  1 root  operator0, 153 Apr 26 02:57 /dev/md0
crw-r-  1 root  operator0, 157 Apr 26 02:58 /dev/md0s1
crw-r-  1 root  operator0, 159 Apr 26 03:03 /dev/md0s1a
8<

-- 
Fuzzy love,
-CyberLeo
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net


Furry Peace! - http://.fur.com/peace/
___
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 questions

2011-04-24 Thread Helmut Schneider
Hi,

i'm playing around with (virtual) disks within a VMware ESXi 4.1 server:

[root@BSDHelmut864 ~]# uname -rsim
FreeBSD 8.2-RELEASE amd64 GENERIC
[root@BSDHelmut864 ~]# sysctl kern.geom.debugflags=17
kern.geom.debugflags: 17 -> 17
[root@BSDHelmut864 ~]# gpart destroy da1
da1 destroyed
[root@BSDHelmut864 ~]# gpart list da1
gpart: No such geom: da1.
[root@BSDHelmut864 ~]#

OK, the disk is empty, now create a new scheme:

[root@BSDHelmut864 ~]# gpart create -s mbr da1
da1 created
[root@BSDHelmut864 ~]# gpart show da1
=>   63  156301425  da1  MBR  (75G)
 63  156301425   - free -  (75G)

[root@BSDHelmut864 ~]# gpart list da1
Geom name: da1
state: OK
fwheads: 255
fwsectors: 63
last: 156301487
first: 63
entries: 4
scheme: MBR
Consumers:
1. Name: da1
   Mediasize: 80026361856 (75G)
   Sectorsize: 512
   Mode: r0w0e0

[root@BSDHelmut864 ~]#

Now create a new slice of ~21GB:

[root@BSDHelmut864 ~]# gpart add -b 63 -s $(echo 21500*1024*2+63 | bc)
-t freebsd da1
da1s1 added
[root@BSDHelmut864 ~]#

But - where is it?

[root@BSDHelmut864 ~]# gpart show da1s1
gpart: No such geom: da1s1.
[root@BSDHelmut864 ~]# gpart list da1s1
gpart: No such geom: da1s1.
[root@BSDHelmut864 ~]#

It should be there:

[root@BSDHelmut864 ~]# gpart list da1
Geom name: da1
state: OK
fwheads: 255
fwsectors: 63
last: 156301487
first: 63
entries: 4
scheme: MBR
Providers:
1. Name: da1s1
   Mediasize: 22544395776 (21G)
   Sectorsize: 512
   Mode: r0w0e0
   rawtype: 165
   length: 22544395776
   offset: 32256
   type: freebsd
   index: 1
   end: 44032085
   start: 63
Consumers:
1. Name: da1
   Mediasize: 80026361856 (75G)
   Sectorsize: 512
   Mode: r0w0e0

[root@BSDHelmut864 ~]#

But it isn't. Now I start sysinstall, choose "custom", "partiton",
press "w" and quit sysinstall. There it is:

[root@BSDHelmut864 ~]# gpart show da1s1
=>   0  44032023  da1s1  BSD  (21G)
 0  44032023 - free -  (21G)

[root@BSDHelmut864 ~]# gpart list da1s1
Geom name: da1s1
state: OK
fwheads: 255
fwsectors: 63
last: 44032022
first: 0
entries: 8
scheme: BSD
Consumers:
1. Name: da1s1
   Mediasize: 22544395776 (21G)
   Sectorsize: 512
   Mode: r0w0e0

[root@BSDHelmut864 ~]#

So, what did sysinstall that gpart didn't?

Thanks, Helmut

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