NetBSD-Users archive

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

Re: boot disk has two MBR partitions



On 1 Mar 2013 at 14:46, Saifi Khan wrote:

> On Sat, 23 Feb 2013, David Lord wrote:
> 
> > On 23 Feb 2013 at 20:18, Saifi Khan wrote:
> >
> >> Hi:
> >>
> >> Please excuse me for asking rather 'naive' question.
> >>
> >> i've rtfm'd at
> >> http://www.netbsd.org/docs/guide/en/netbsd.html
> >>
> >> Now, i have a boot disk (NetBSD terminology) of 320 GB (SATA II).
> >>
> >> Booted my laptop with 'boot.iso' (NetBSD-current) and using the 'NetBSD' 
> >> fdisk utility, i created two MBR partitions (NetBSD terminology) of the 
> >> following size:
> >>  partition no 1: 20 GB   (base system, src)
> >>  partition no 2: 300 GB (pkgsrc, other sources, mails etc.)
> >>
> >> i intend to setup 'ffs' on both the MBR partitions.
> >>
> >> in the linux world, the disk would typically be '/dev/sda' and the two 
> >> profound partitions would be
> >>  /dev/sda1
> >>  /dev/sda2
> >>
> >> in the NetBSD scheme of things, the first disk is seen as 'wd0'. In that 
> >> case, how would the two 'MBR partitions' be addressed as ?
> >>
> >
> > The NetBSD part of the disk is usually split into partitions
> >
> > ID mount point
> > a: /
> > b: swap
> > c: NetBSD partitions
> > d: whole disk
> > e: /usr
> > f: /tmp
> > g: /var
> > ....
> > m:
> >
> 
> The 'mbrlabel' command helped insert the 2nd MBR partition 
> entry in the disklabel.
> 
> However, the wrong size was picked by mbrlabel (wonder why) 
> and i had to edit the 'disklabel' entry from the information 
> gleaned from 'fdisk' output.
> 
> 
> > Having many mountable partitions used to have an advantage
> > after a major system crash in that some would be left clean
> > which reduced time spent by fsck. With current WAPBL the
> > journal is replayed after a crash which gives a fast
> > recovery.
> >
> 
> Does disk geometry, the CHS remapping and subsequent 
> translation have any impact on the 'fsck' performance. ?

Probably

but I don't run fsck so often that it concerns me.

> 
> 
> >> i also have a couple of related questions:
> >>
> >> 1. what is the rationale behind using 'd' in BSD partition to represent 
> >> the entire disk ?
> >> 2. what is the significance of using two representations like wd0 and rwd0 
> >> ?
> >
> > The 'raw' devices have to be used in some cases but unless
> > you are sure use the 'wd" rather than "rwd".
> >
> 
> Would appreciate, if you could share an example where 'raw' 
> device would be useful.
> 

This is something that usally appears in the relevant man page
for the program you are using.

> 
> >> 3. does fsck like utility perform better when one has slice with BSD 
> >> partitions rather than straight DOS like partition ?
> >
> > DOS fat partitions become fragmented and can run out of
> > allocation units so require regular defragmentation as the
> > partition becomes full.
> >
> > Fsck is not normally required on NetBSD ffs partitions.
> >
> 
> currently running netbsd-current (20120220 snapshot).
> 
> i have had two freeze ups in the last 2 days, when i had to 
> hold the 'power' button to switch off the laptop.
> 
> On power cycling the device, on both occassions, i had to 
> run 'fsck' manually to restore blocks, clean up etc.
> 

I's rare for me to need to use fsck. After a crash requiring
reboot I see entries in /var/log/messages:
   "/netbsd: /: replaying log to disk"

Were your partitions created manually?

Currently my systems have ffsv2 partitions either auto created
at install, using "newfs -O", or by using "ffsk_ffs -c 4" for 
existing partitions.

/etc/fstab entries have the "log" option, eg.
/dev/wd0a    /     ffs   rw,log    1  1
/dev/wd0h    /var  ffs   rw,log    1  2


David



Home | Main Index | Thread Index | Old Index