NetBSD-Users archive

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

Re: disk numbering



On Tue, Mar 11, 2014 at 09:55:02PM +1300, Mark Davies wrote:
> Indeed its constant disk names in the face of sometimes adding and 
> removing some that I want so an example of how to do that with GPT and 
> wedges would be instructive.  I've read the manual pages a few times but 
> haven't really ever got my head around wedges.

I have this in my /etc/fstab:

# See /usr/share/examples/fstab/ for more examples.
NAME=sb2k5Root/a        /       ffs     rw,log           1 1
NAME=sb2k5Root/b        none    swap    sw,dp            0 0
kernfs                  /kern   kernfs  rw
ptyfs                   /dev/pts        ptyfs   rw
procfs                  /proc   procfs  rw,nolinux
tmpfs   /var/shm        tmpfs   rw,-m1777,-sram%25
/dev/cd0a               /cdrom  cd9660  ro,noauto


The names here are auto-generated from disklabel names, the disklabel says:
# /dev/rsd0c:
type: unknown
disk: ST373207LSUN72G
label: sb2k5Root

and sb2k5Root/a is the "a" partition on that disk. The kernel attaches wedges
via autodiscover (as this machine can't boot directly from gpt) and says:

sd0 at scsibus0 target 0 lun 0: <SEAGATE, ST373207LSUN72G, 045A> disk fixed
sd0: 70007 MB, 14089 cyl, 24 head, 424 sec, 512 bytes/sect x 143374738 sectors
dk0 at sd0: sb2k5Root/a
dk0: 93008640 blocks at 0, type: ffs
dk1 at sd0: sb2k5Root/b
dk1: 50340672 blocks at 93008640, type: swap


Should be very similar with direct wedges via gpt (where gpt carries the name
internally).

Martin


Home | Main Index | Thread Index | Old Index