GPT labels and gjournal

2011-06-20 Thread nickolasbug
Hello stable.


I've tried to make two journaled partitions on new GPT disk.
Partitions have GPT labels storage and backup:

gpart show -l ada1
=34  2930277101  ada1  GPT  (1.4T)
  34 8388608 1  (null)  (4.0G)
 8388642  2415919104 2  storage  (1.1T)
  2424307746 8388608 3  (null)  (4.0G)
  2432696354   497580781 4  backup  (237G)


gjournal label /dev/gpt/storage /dev/gptid/3570dff6-9a73-11e0-ad0e-001e8c0ecc19
gjournal label /dev/gpt/backup /dev/gptid/58db2577-9a73-11e0-ad0e-001e8c0ecc19

newfs -J /dev/gpt/storage.journal
newfs -J /dev/gpt/backup.journal

Where 3570dff6-9a73-11e0-ad0e-001e8c0ecc19 is GPT UUID of ada1p1 and
58db2577-9a73-11e0-ad0e-001e8c0ecc19 is GPT UUID of ada1p3 partition.


This partitions have been added to fstab:

/dev/gpt/storage.journal /mnt/storage ufs  async,rw  0 0
/dev/gpt/backup.journal  /mnt/backup  ufs  async,rw  0 0


After reboot system doesn't wanna see gpt-labeled partitions
/dev/gpt/storage.journal and /dev/gpt/backup.journal (so, mount fails)
but has /dev/ada1p2.journal and /dev/ada1p4.journal instead.


How can I mount this partitions using GPT labels?


uname -a
FreeBSD cloud 8.2-STABLE FreeBSD 8.2-STABLE #37 r223311: Mon Jun 20
04:16:22 EEST 2011 root@cloud:/usr/obj/usr/src/sys/CLOUD  amd64


Options GEOM_PART_GPT, GEOM_LABEL and GEOM_JOURNAL present in kernel
configuration file.


---
wbr,
Nickolas
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: GPT labels and gjournal

2011-06-20 Thread Andrey V. Elsukov
On 20.06.2011 13:17, nickolas...@gmail.com wrote:
 How can I mount this partitions using GPT labels?

Hi,

i think the only way to do it is use hardcoded provider name
when you are configuring journal.

-- 
WBR, Andrey V. Elsukov



signature.asc
Description: OpenPGP digital signature


Re: GPT labels and gjournal

2011-06-20 Thread Marat N.Afanasyev

nickolas...@gmail.com wrote:

Hello stable.


I've tried to make two journaled partitions on new GPT disk.
Partitions have GPT labels storage and backup:

gpart show -l ada1
= 34  2930277101  ada1  GPT  (1.4T)
   34 8388608 1  (null)  (4.0G)
  8388642  2415919104 2  storage  (1.1T)
   2424307746 8388608 3  (null)  (4.0G)
   2432696354   497580781 4  backup  (237G)


gjournal label /dev/gpt/storage /dev/gptid/3570dff6-9a73-11e0-ad0e-001e8c0ecc19
gjournal label /dev/gpt/backup /dev/gptid/58db2577-9a73-11e0-ad0e-001e8c0ecc19

newfs -J /dev/gpt/storage.journal
newfs -J /dev/gpt/backup.journal

Where 3570dff6-9a73-11e0-ad0e-001e8c0ecc19 is GPT UUID of ada1p1 and
58db2577-9a73-11e0-ad0e-001e8c0ecc19 is GPT UUID of ada1p3 partition.


This partitions have been added to fstab:

/dev/gpt/storage.journal /mnt/storage ufs  async,rw  0 0
/dev/gpt/backup.journal  /mnt/backup  ufs  async,rw  0 0


After reboot system doesn't wanna see gpt-labeled partitions
/dev/gpt/storage.journal and /dev/gpt/backup.journal (so, mount fails)
but has /dev/ada1p2.journal and /dev/ada1p4.journal instead.


How can I mount this partitions using GPT labels?


uname -a
FreeBSD cloud 8.2-STABLE FreeBSD 8.2-STABLE #37 r223311: Mon Jun 20
04:16:22 EEST 2011 root@cloud:/usr/obj/usr/src/sys/CLOUD  amd64


Options GEOM_PART_GPT, GEOM_LABEL and GEOM_JOURNAL present in kernel
configuration file.


---
wbr,
Nickolas
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


i think it would be more useful to:

add labels into UFS, e.g.
#umount /mnt/storage
#umount /mnt/backup

#tunefs -L storage /dev/ada1p2.journal
#tunefs -L backup /dev/ada1p4.journal

and mount
/dev/ufs/storage
and
/dev/ufs/backup

into /mnt/storage and /mnt/backup respectively

--
С уважением, Марат Афанасьев



Re: ZFS boot inside on the second partition inside a slice

2011-06-20 Thread John Baldwin
On Saturday, June 18, 2011 5:04:07 am Henri Hennebert wrote:
 On 06/17/2011 19:37, John Baldwin wrote:
  On Friday, June 17, 2011 1:06:22 pm Henri Hennebert wrote:
  On 06/16/2011 19:35, John Baldwin wrote:
  On Thursday, June 16, 2011 8:45:41 am Zhihao Yuan wrote:
  Exactly. The MFCed ZFSv28 is different from any patch maintained by
  mm@. Maybe some untested changes involved.
 
  Can you try reverting this change:
 
  Author: jhb
  Date: Thu Apr 28 17:44:24 2011
  New Revision: 221177
  URL: http://svn.freebsd.org/changeset/base/221177
 
  Log:
 Due to space constraints, the UFS boot2 and boot1 use an evil hack 
  where
 boot2 calls back into boot1 to perform disk reads.  The ZFS MBR boot 
  blocks
 do not have the same space constraints, so remove this hack for ZFS.
 While here, remove commented out code to support C/H/S addressing from
 zfsldr.  The ZFS and GPT bootstraps always just use EDD LBA addressing.
 
 MFC after:2 weeks
 
  Modified:
 head/sys/boot/i386/boot2/Makefile
 head/sys/boot/i386/common/drv.c
 head/sys/boot/i386/zfsboot/Makefile
 head/sys/boot/i386/zfsboot/zfsldr.S
 
  I try with this revision (221177) reverted to no avail:
  same error - 'read error'
 
  Hmm, ok.  No other ideas off the top of my head.
 
 I make the same test under virtualbox and get:
 
 A critical error has occurred while running the virtual machine and the 
 machine execution has been stopped.
 
 I attach VBox.log.
 
 PS - the message 'ZFS: supported version 28' comes from my patch:
 
 Index: sys/boot/zfs/zfsimpl.c
 ===
 --- sys/boot/zfs/zfsimpl.c(revision 212549)
 +++ sys/boot/zfs/zfsimpl.c(working copy)
 @@ -61,6 +61,8 @@
   STAILQ_INIT(zfs_vdevs);
   STAILQ_INIT(zfs_pools);
 
 + printf(ZFS: supported version %u\n, (unsigned) SPA_VERSION);
 +
   zfs_temp_buf = malloc(TEMP_SIZE);
   zfs_temp_end = zfs_temp_buf + TEMP_SIZE;
   zfs_temp_ptr = zfs_temp_buf;

Hmm, can you add printfs and narrow down where the hang happens (or which
reads are failing)?  The VBOX log seems to make no sense.  It shows the
CPU trying to call into the BIOS from within protected mode in the loader
but that shouldn't ever happen (note a cs of 0x2b (which is the loader's
%cs selector) but an eip that looks like a cs:ip of a BIOS routine).

-- 
John Baldwin
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: snd_hda : sometimes sound sometimes not

2011-06-20 Thread David Demelier

On 28/05/2011 15:46, Jeremy Chadwick wrote:

On Sat, May 28, 2011 at 03:30:26PM +0200, David Demelier wrote:

On 12/05/2011 08:47, David Demelier wrote:

Hello,

I don't know if there is a lot of changes in the snd_hda driver in the
-STABLE branch but since I upgraded to it sometimes I have sound and
sometimes not.

The mixer are exactly the same when these event occurs. This happened
this morning. After booting I do not have any sound. I rebooted and
suddenly I've got sound again...

I only tweak snd_hda(4) for a pin sense on the front panel (it has no
sound neither)

So I added in /boot/devices.hints :
hint.hdac.1.cad0.nid27.config=as=1 seq=15

And there's the both dmesg ok.txt when sound is here and not.txt when
there isn't as you can see there is no difference related to the hda
driver.

http://markand.malikania.fr/ok.txt
http://markand.malikania.fr/nok.txt

I'm guessing something. My laptop has a mute shortcut, if I press it at
the BIOS stage I will not have sound neither thus is it possible that my
chipset is muted from anything?

Cheers,



Sorry to cross-post again, but I just wanted to tell you that the
problem disappeared in -CURRENT so now I just how the unknown bogus
code will be MFC before 8.3-RELEASE


Unless someone can chime in with details of the commits which changed,
assuming the magic change will be MFC'd is a bad one.  It's safe to
say that when 8.3-RELEASE comes out if this problem haunts you again,
you will be mailing the list about it, and this cycle will continue
until 9.0-RELEASE comes out.

Does any developer/committer have familiarity with this issue and have
some ideas as to what may have changed in CURRENT that addresses David's
issue?  And if so, can that code be MFC'd safely or patches provided to
David for RELENG_8 that he can try out?

I'm CC'ing mav@ here (snd_hda(4) says he's one of the authors), although
he may not have any knowledge of the code which may need to be MFC'd.
He may be able to point us to who has a better idea though.



No worries Jeremy but thanks for your interest you seems to be the only 
one who believed my problem. The problem has been fixed in -STABLE, I 
don't know where but it works now 


--
David Demelier
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: GPT labels and gjournal

2011-06-20 Thread Bengt Ahlgren
nickolas...@gmail.com writes:

 Hello stable.


 I've tried to make two journaled partitions on new GPT disk.
 Partitions have GPT labels storage and backup:

 gpart show -l ada1
 =34  2930277101  ada1  GPT  (1.4T)
   34 8388608 1  (null)  (4.0G)
  8388642  2415919104 2  storage  (1.1T)
   2424307746 8388608 3  (null)  (4.0G)
   2432696354   497580781 4  backup  (237G)


 gjournal label /dev/gpt/storage 
 /dev/gptid/3570dff6-9a73-11e0-ad0e-001e8c0ecc19
 gjournal label /dev/gpt/backup /dev/gptid/58db2577-9a73-11e0-ad0e-001e8c0ecc19

 newfs -J /dev/gpt/storage.journal
 newfs -J /dev/gpt/backup.journal

 Where 3570dff6-9a73-11e0-ad0e-001e8c0ecc19 is GPT UUID of ada1p1 and
 58db2577-9a73-11e0-ad0e-001e8c0ecc19 is GPT UUID of ada1p3 partition.


 This partitions have been added to fstab:

 /dev/gpt/storage.journal /mnt/storage ufs  async,rw  0 0
 /dev/gpt/backup.journal  /mnt/backup  ufs  async,rw  0 0


 After reboot system doesn't wanna see gpt-labeled partitions
 /dev/gpt/storage.journal and /dev/gpt/backup.journal (so, mount fails)
 but has /dev/ada1p2.journal and /dev/ada1p4.journal instead.


 How can I mount this partitions using GPT labels?

Interesting!  (ama...@ksu.ru already suggested an alternative that I
believe works, but I thought I'd share my experience with this issue.)
I ran into a similar problem with gmirror yesterday, but first my
attempt at explaining why the above is happening.

A geom(4) class tastes providers (e.g. ada1p2) in a certain order.
When gjournal is tasting, it finds ada1p2 before gpt/storage, and
creates ada1p2.journal.  ada1p2 is then used, and gpt/storage is
automatically removed.

(Or alternatively, gjournal tastes before glabel, and there are no
gpt/... labels when gjournal tastes providers; same result, though.)

So to have the above work, glabel has to taste before gjournal, and
gjournal has to taste the label device (gpt/xxx) before the real device
(ada1p2).

An alternative solution would be if gjournal creates a label itself,
instead of adding .journal to the device name, for example
/dev/journal/foo in the same way as gmirror creates /dev/mirror/foo.
Then the journal device becomes independent of the device holding the
data component, making it possible to mount /dev/journal/foo.

Now back to gmirror.  When I tried:

gmirror label m1 /dev/gptid/xxx /dev/gptid/yyy

it still showed up as using the actual devices.  When I tried to
hardcode the provider names:

gmirror label -h m1 /dev/gptid/xxx /dev/gptid/yyy

it said it labelled both /dev/gptid/... but the mirror failed to appear.
But this does not matter for gmirror, since a device-independent mirror
name is created in /dev/mirror regardless of the names of the
components.

The tasting order seems to be very important.  Would it be possible to
fix the above by changing so that labels are tasted before the real
devices?  Or does that create different problems?  gjournal would
perhaps find both gpt/xxx and ada1p2, resulting in a mess?

I think the idea with labels is great, but whether it works or not seems
pretty random to me as a user.

(People with more geom knowledge than me, please correct all errors in
the above :-) Perhaps labels are not tasted at all, like real
providers are???)

Bengt
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: ZFS boot inside on the second partition inside a slice

2011-06-20 Thread Zhihao Yuan
I finally redo everything with GPT-based solution. At the same time, I
found a problem with zpool.cache and I fixed with:
http://forums.freebsd.org/showthread.php?t=4185
zpool.cache will be changed after you exported the zpool... Anyway,
now I'm OK with my freebsd-only box, again.

On Fri, Jun 17, 2011 at 9:18 PM, Zhihao Yuan lich...@gmail.com wrote:
 If this problem can not be solved, I probably have to redo everything
 to use GPT-based solution and lose my Windows.

 On Fri, Jun 17, 2011 at 12:37 PM, John Baldwin j...@freebsd.org wrote:
 On Friday, June 17, 2011 1:06:22 pm Henri Hennebert wrote:
 On 06/16/2011 19:35, John Baldwin wrote:
  On Thursday, June 16, 2011 8:45:41 am Zhihao Yuan wrote:
  Exactly. The MFCed ZFSv28 is different from any patch maintained by
  mm@. Maybe some untested changes involved.
 
  Can you try reverting this change:
 
  Author: jhb
  Date: Thu Apr 28 17:44:24 2011
  New Revision: 221177
  URL: http://svn.freebsd.org/changeset/base/221177
 
  Log:
    Due to space constraints, the UFS boot2 and boot1 use an evil hack where
    boot2 calls back into boot1 to perform disk reads.  The ZFS MBR boot 
  blocks
    do not have the same space constraints, so remove this hack for ZFS.
    While here, remove commented out code to support C/H/S addressing from
    zfsldr.  The ZFS and GPT bootstraps always just use EDD LBA addressing.
 
    MFC after:    2 weeks
 
  Modified:
    head/sys/boot/i386/boot2/Makefile
    head/sys/boot/i386/common/drv.c
    head/sys/boot/i386/zfsboot/Makefile
    head/sys/boot/i386/zfsboot/zfsldr.S
 
 I try with this revision (221177) reverted to no avail:
 same error - 'read error'

 Hmm, ok.  No other ideas off the top of my head.

 --
 John Baldwin




 --
 Zhihao Yuan, nickname lichray
 The best way to predict the future is to invent it.
 ___
 4BSD -- http://4bsd.biz/




-- 
Zhihao Yuan, nickname lichray
The best way to predict the future is to invent it.
___
4BSD -- http://4bsd.biz/
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: GPT labels and gjournal

2011-06-20 Thread perryh
Bengt Ahlgren ben...@sics.se wrote:
 nickolas...@gmail.com writes:
  I've tried to make two journaled partitions on new GPT disk.
...
  How can I mount this partitions using GPT labels?
...
 I think the idea with labels is great, but whether it works or
 not seems pretty random to me as a user.

Based on the PR descriptions, this sounds as if it might be related
to kern/140352, kern/150555, and/or kern/150626.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org