Date: Tue, 17 May 2011 15:19:40 +0200 From: n dhert <ndhertbsd@gmail.com> To: freebsd-questions@freebsd.org Cc: rsimmons0@gmail.com Subject: Re: adding new disk >2TB, gpt? Message-ID: <BANLkTinE5V2hmW%2BPZS_FwV%2Bj8d3YVm-J7w@mail.gmail.com> In-Reply-To: <BANLkTim8PzACJfJCz5hcmr7ESV7d1o-hfA@mail.gmail.com> References: <BANLkTikoqWdpcAhe0ykrcUpd1NFArFoK4w@mail.gmail.com> <BANLkTim8PzACJfJCz5hcmr7ESV7d1o-hfA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks for your answer! I am trying out gpart. On an old PC with 38 GB disk, I have triple boot Windows, OpenSuSE and FreeBSD-8.2. I created an unalloated space of 973 MB at the end. To see the actuel disk geometry, I used FreeBSDs sysinstall # sysinstall Disk name: ad0 FDISK Partition Editor DISK Geometry: 79780 cyls/16 heads/63 sectors = 80418240 sectors (39266MB) Offset Size(ST) End Name PType Desc Subtype Flags 0 63 62 - 12 unused 0 63 22233897 22233959 ad0s1 4 NTFS/HPFS/QNX 7 22233960 29639736 51873695 ad0s3 8 freebsd 165 51873696 189 51873884 - 12 unused 0 51873885 26539380 78413264 ad0s2 4 extended DOS, LBA 15 78413265 1992060 80405324 ad0s4 4 ext2fs 131 80405325 12915 80418239 - 12 unused 0 ad0s1 is my Windows, ad0s2 is the extended partition where SuSE resides (swap and / partition) ad0s3 is my FreeBSD-8.2 (with sections a, e, f, d for /, /tmp, /usr, /var) and ad0s4 is the new freed space of 1992060 sectors = 973 MB I tried # gpart create -s gpt ad0s4 gpart: provider: Device not configured ( gpart create -s gtp /dev/ad0s4 : same error) # gpart show => 63 80418177 ad0 MBR (38G) 63 22233897 1 ntfs (11G) 22233960 29639736 3 freebsd [active] (14G) 51873696 189 - free - (95K) 51873885 26539380 2 !15 (13G) 78413265 1992060 4 !131 (973M) 80405325 12915 - free - (6.3M) => 0 26539380 ad0s2 EBR (13G) 0 2072385 1 !130 (1.0G) 2072385 18249840 32896 !131 (8.7G) 20322225 6152895 322576 !131 (2.9G) 26475120 64260 - free - (31M) => 0 29639736 ad0s3 BSD (14G) 0 1048576 1 freebsd-ufs (512M) 1048576 1994384 2 freebsd-swap (974M) 3042960 3092480 4 freebsd-ufs (1.5G) 6135440 1048576 5 freebsd-ufs (512M) 7184016 22455720 6 freebsd-ufs (11G) # gpart create -s gpt ad4 gpart: provider 'ad4': Invalid argument how do I address the 974 MB partition ??? 2011/5/16 Robert Simmons <rsimmons0@gmail.com> > On Mon, May 16, 2011 at 10:27 AM, n dhert <ndhertbsd@gmail.com> wrote: > > I have a running FreeBSD-8.2-amd system, > > FreeBSD was installed in jan 2009 (then FreeBSD 7.0), which a fisk disk > of > > 200 GB > > for /, swap /usr /var /tmp. > > Later that month, I added a 9 TB disk using /sbin/gpt > > (since sysinstall uses bsdlabel/fdisk, it can't create disks larger than > 2 > > TB) > > > > I want to add an extra >2TB disk... and thought to use gpt again as I did > in > > the past .. > > > > The FreeBSD book (in its 2011 version), section 18.3 still refers to > using > > gpt for disks >2TB > > but the link gpt(8) leads to nowhere and /sbin/gpt no longer exists in > > FreeBSD ! > > > > There seem to be two alternatives: > > 1) /sbin/gpart, of which the man page is quite similar to what gpt used > to > > be, but tells me > > it is ''for disk partitoning GEOM class", > > whereas gpt man pages (in 2009) said: gpt - "GUID partition table > > maintenance utility". > > > > 2) a port sysutils/gdisk of which the Long Description says: > > "Edit GUID partition table (GPT) definitions in Linux, FreeBSD, MacOS X > or > > Windows" > > but its web site shows a completely different command line interface, not > > resembling the old gpt at all.. > > > > What is exactly that difference between GEOM and GUID ? > > I'd like to have things as similar as possible .. > > Can I use /sbin/gpart for the extra 9 GB disk ? or do I have to stick > with > > GUID and use gdisk ? > > gpart create -s gpt ad0 > is the command you want to use. Just replace ad0 with your device > node. Also, "gpart show" will give a list of slices and partitions. > You will then want to do: > gpart add -s <size> -t <type> ad0 > The size and type syntax are in the gpart man page. > If you want it bootable you will need a small partition at the > beginning of the disk: > gpart add -s 128k -t freebsd-boot ad0 > gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ad0 > > You may adjust the size to shrink it to exactly fit the files, but I > think if you're working in TBs you can spare a few wasted k. > > I submitted a PR to get the handbook updated to reflect gpart(8). > > Cheers, > Rob > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTinE5V2hmW%2BPZS_FwV%2Bj8d3YVm-J7w>