NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: GPT questions - gpt reliability, wedge naming, and filesystem scaling.



On Fri, Jun 20, 2014 at 01:20:03AM +0100, Gerard Lally wrote:
> 
> 1) Is it safe to use GPT on NetBSD? The warnings on the gpt man page
> leave me less than 100% confident.
> 

Yes.  I am using GPT on my laptop in a multiboot netbsd/linux/win8 set
up.  It takes some care to set up but works fine.  I do intend to write
up what I have done when I have some time.

> 2) As I understand it the NetBSD FFS filesystem is capable of growing
> to 8 zettabytes, but MBR partitioning combined with traditional
> disklabels meant we were restricted to 2 (or 4) TB partitions in
> practice. Am I right in saying that GPT and wedges remove this
> restriction, and we can now create partitions and filesystems greater
> than 4TB?
> 

Yes.

> 3) Using "NAME=dk0" in /etc/fstab didn't work for me; I had to specify
> /dev/dk0, /dev/dk1, etc.
> dk names also do not persist across reboots. For example, if I create a
> wedge as follows the dk_swap name reverts to dk1 after rebooting.
> 
> dkctl wd0 addwedge dk_swap 64 2097152 swap
> 
> This is not a big deal but it leaves me wondering how NAME=xxx in fstab
> is supposed to work. Does it work with GPT labels instead?
> 

Odd, mine persist:

# dkctl /dev/rwd0d listwedges
/dev/rwd0d: 12 wedges:
dk0: Basic data partition, 1572864 blocks at 2048, type: 
dk1: 1176b336-7aba-4a02-82ea-2493e09215e3, 1572864 blocks at 1574912, type: 
dk2: EFI system partition, 532480 blocks at 3147776, type: msdos
dk3: Microsoft reserved partition, 262144 blocks at 3680256, type: 
dk4: ed1a0b68-7012-4994-b58e-34710d9e5244, 102400000 blocks at 3942400, type: 
dk5: 0e02bd01-2798-47c9-bd3e-1776faafdf4f, 102400000 blocks at 106342400, type: 
dk7: NetBSD-root, 122880000 blocks at 208742400, type: ffs
dk8: NetBSD-swap, 24576000 blocks at 331622400, type: swap
dk9: NetBSD-home, 364544000 blocks at 356198400, type: cgd

I am using a sort of recent -current though, perhaps that is the
difference.

> 4) To get the sector offsets and sizes right I first created a
> traditional MBR + disklabel setup, sizing partitions in MB and taking
> note of the sector offsets and sector sizes this produced. I started at
> 2048. After destroying the MBR + disklabel setup I then used this
> information to create GPT partitions. I assume this is a safe way to do
> it? I am not really familiar with partition alignment, and even less so
> since the new disks came out.
> 

If you just stick to multiples of 4k you are probably ok, the concepts
of cylinders and heads became meaningless quite some time ago so just
treat the disk as a blob of sectors

-- 
Brett Lymn
Staple Guns: because duct tape doesn't make that KerCHUNK sound - xkcd.com


Home | Main Index | Thread Index | Old Index