Date: Fri, 11 Jul 2014 23:17:56 +0200 From: Rolf Nielsen <rmg1970swe@gmail.com> To: freebsd-questions@freebsd.org Subject: Re: gpart and bsdlabel Message-ID: <53C05484.5000406@gmail.com> In-Reply-To: <20140711201114.GA2064@bewilderbeast.blackhelicopters.org> References: <20140711201114.GA2064@bewilderbeast.blackhelicopters.org>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2014-07-11 22:11, Michael W. Lucas wrote: > Hi, > > I'm gradually switching from the familiar and comfortable agony of > fdisk/disklabel to gpart. > > In the past, our org has avoided certain partition letters on > specific drives. If the drive isn't a boot drive, it has no 'a" > partition. If it has no swap, it has no 'b' partition. > > gpart assigns partition letters in the order in which they're > created. > > Is there a way to specify which partition letter you want to > create, or start with, or something? > > Thanks, ==ml > I just created a 10 GB file backed md device, and did some experiments with gpart. Here's the result. root@lazlar:/misc/cdrecorder/Film # gpart create -s MBR md0 md0 created root@lazlar:/misc/cdrecorder/Film # gpart add -t freebsd md0 md0s1 added root@lazlar:/misc/cdrecorder/Film # gpart create -s BSD md0s1 md0s1 created root@lazlar:/misc/cdrecorder/Film # gpart add -b 16 -s 4G -t freebsd-ufs -i 6 md0s1 md0s1f added root@lazlar:/misc/cdrecorder/Film # gpart add -b 8388624 -t freebsd-swap -i 2 md0s1 md0s1b added root@lazlar:/misc/cdrecorder/Film # bsdlabel md0s1 # /dev/md0s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] b: 12582816 8388624 swap c: 20971440 0 unused 0 0 # "raw" part, don't edit f: 8388608 16 4.2BSD 0 0 0 It seems the partition letters can be assigned dynamically, using the - -i option to gpart add. Rolf -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJTwFSEAAoJEB1OKfQ0M8TgLNsQAOGyOCjSTnjPYcvAUha+rDUc ixtmuhDubex7Ri2hcg5ThYdkQ23cyliL1b/uppnRU6JAfiucuLYc5yHzxAStZ+ET YdkOyGlwAKCJ7RpT5pGc3cv6xdCqXO1p6MLaZd2UOFoqhKy/jW+eLtpp+6s+FTTj Bhz5V+Sp11GOo5T+HdoTa9ixvLP98uH58h9f8za7Kh8Q/gvB+GL8C7ruxInJGlvs LbyVyOmvozhxbnY/80HpcCUfc4eLlkJ3RzRDwQGsSqAvV0pfczRgmjCbzRHqVkIV ggRDohEzFWXO39VDSaTQpE407ORcuvgPcENgQO9ftI52eCVSv0FgC6kGje4VitDO D4De9IefMk2kppiX2RQ5sVxHWTOa59iTFmjn5HgnoTs2pms1ubyzeZJyWXr97s5j WGI9sDOzXJ9Io2k1J19pXP46DMqn8TqaoC5OK079pBpzvj50+xNXfy0CZ09UFjfY XSLnI3htGV4LEAXrj77rFBZLiRYPuGaesFGxK+Y9U10ecXm2WleYUG0fUqvbv91+ BOsf1uXhp/4aWNtPjW+Cot/hhoop0j8U7B0Z0gKjAqGlsy8uBa+pxwsmPoDyR6Fz F9z95Pl7vLRgvCZa2RSgcsm3JhgpTZVAVl9RtOQuVUQRqlckw0TzpL6PRu0PYara lyCVNp/8JzQt/cJ1TW+3 =viUr -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53C05484.5000406>