Re: [SOLVED] Can't *write* to a hard disk, not even a slice using fdisk(8).

2004-04-18 Thread Julien Gabel
 do you  have your securelevel set in rc.conf to YES and to a higher
 level (like 3)?

 Yes, this machine had a securevel positionned: it set to '2'. But
 because I can't touch the disk even in Single User Mode, I don't
 think it is related, but...

 What is your idea?

 Ok.  I had missed the earlier parts.  I had a problem recently where a
 new disk was not touchable at all and it was related to the
 securelevel being at 3...

 Was just a thought.

I don't know if you follow the current@ list too, but I sovled my problem:
http://lists.freebsd.org/mailman/htdig/freebsd-current/2004-April/\
025943.html

I can note that if I said that I can't touch the disk even in Single User
Mode... that was right, but just because I went to single-user mode from
multi-user mode, so the kern.securelevel was always to '2' (which is very
different to boot directly to single-user mode)! Sorry for the mistake and
thanks for your reply which appeared to be the right point here.

--
-jpeg.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can't *write* to a hard disk, not even a slice using fdisk(8).

2004-04-13 Thread Julien Gabel
 GEOM doesn't let you write to an active device, except if you set
 kern.geom.debugflags=16

 Ok no problem, I changed it this way:
  # sysctl kern.geom.debugflags=16
  kern.geom.debugflags: 1 - 16
 But it seems to change *absolutly nothing*... :(

[...]

 Mmmhh... We're doing something wrong here I guess :o Are you 100% sure
 that ad10 is not used by any open geom modules? What does dmesg say
 about ar*?

 Well, I see that geom tastes ad10 and creates a slice class for it...
 However, if kern.geom.debugflags=16, you should still be able to touch
 the slice.

 If debugflags=16 I know of no reason why you shouldn't be able to
 partition de disk; sorry, I'm stumped :(

Ok, some news here. I can't be able to access/write to ad10 using fdisk
for example... under FreeBSD-5.x (OS version installed on the server).

But I gave a try to the CD 4.9-i386-mini.iso and... I succeed to create
a slice on ad10 and even to partition and write some files on it!

So, what I can say here:
 - The disk seems not to be dead;
 - But after I had modify it under the 4.9 CDROM, I can't access it (fdisk,
   bsdlabel, etc.) under the installed and running OS on this machine:
   FreeBSD 5.2.1. :(

It seems that 'Joan' was in the right direction arguing to play with
kern.geom.debugflags, but it didn't work for me. If someone has an
other idea with this new point in mind...

Thanks in advance,
-- 
-jpeg.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can't *write* to a hard disk, not even a slice using fdisk(8).

2004-04-11 Thread Julien Gabel
 GEOM doesn't let you write to an active device, except if you set
 kern.geom.debugflags=16

Ok no problem, I changed it this way :
 # sysctl kern.geom.debugflags=16
 kern.geom.debugflags: 1 - 16

But it seems to change *absolutly nothing*... :(

  # mount
  /dev/ar0s1a on / (ufs, local)
  devfs on /dev (devfs, local)
  /dev/ad8s1d on /home (ufs, local, nodev, noexec, nosuid, with quotas,
   soft-updates)
  /dev/ar0s1e on /tmp (ufs, local, nodev, nosuid, soft-updates)
  /dev/ar0s1f on /usr (ufs, local, soft-updates)
  /dev/ar0s1d on /var (ufs, local, noexec, soft-updates)

 If ad8 is part of ar0 GEOM will try to keep you from shooting yourself
 on the foot. You should take ad8 out of the array first.

I don't think so, /dev/ad8 has no problem and is actually in active use.
Let me be more precise here:

The system (/, /tmp, /usr and /var) is mounted on a mirror represented
by /dev/ar0 made with /dev/ad4 and /dev/ad6.

The data (/home) was previously mounted on the device /dev/ar1 which was
made with /dev/ad8 and /dev/ad10.

Because /dev/ad10 seems to have a problem I made a backup, broke the
mirror seen as /dev/ar1 and simply put /home on /dev/ad8 - freshly
restored.

 Because the problematic disk is not actually used, I can try some
 commands on it if someone think it may be interesting.

 On the hardware side, you should look for some diagnostic tool from the
 manufacturer.

Ok, thanks.
--
-jpeg.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can't *write* to a hard disk, not even a slice using fdisk(8).

2004-04-11 Thread Julien Gabel
 I want to say that it is a mirror created with a hardware HighPoint
 HPT374 (channel 2+3) UDMA133 controller ; not created using software,
 like vinum for example.

 - But when I tried to create a slice on it, I get:
   # fdisk -BI ad10
   *** Working on device /dev/ad10 ***
   fdisk: can't write fdisk partition table: Operation not permitted

 There is no partition mounted on it because the miror is actually
 breack, so this disk is totally not used at this time.

 Before that, a /home was mounted on the device corresponding to the
 mirror, i.e. /dev/ar1 (which was made from /dev/ad8 + /dev/ad10).
 Actually, and because I had some activity on this machine, I made the
 /home partition available under the /dev/ad8 device alone, which is the
 other identical disk which previously formed the mirror and works like
 a charm.

 I take it that you are still trying to manage ad10 through the RAID
 capable controller.

Yes, you're right: I broke the mirror, but let the disk /dev/ad10 in
its place.

 No real information but I would guess the controller is still seeing
 information on the drive ad10 which ties it in with some other disk for
 RAID.

I don't think so, but...

 If you have a regular on board ATA interface I'd try plugging the drive
 in there (you can do it with all other drives removed for safety) and
 then try to initialise using an installation CD. If that works I imagine
 you can put every thing back in your prefered configuration and continue.

... I will try to plug it on another controller, or even in a different
machine.

Thanks,
--
-jpeg.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can't *write* to a hard disk, not even a slice using fdisk(8).

2004-04-11 Thread Chad Leigh -- Shire.Net LLC


do you  have your securelevel set in rc.conf to YES and to a higher 
level (like 3)?

Chad

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can't *write* to a hard disk, not even a slice using fdisk(8).

2004-04-11 Thread Julien Gabel
 do you  have your securelevel set in rc.conf to YES and to a higher
 level (like 3)?

Yes, this machine had a securevel positionned: it set to '2'. But
because I can't touch the disk even in Single User Mode, I don't
think it is related, but...

What is your idea?
--
-jpeg.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can't *write* to a hard disk, not even a slice using fdisk(8).

2004-04-11 Thread Chad Leigh -- Shire.Net LLC
On Apr 11, 2004, at 1:50 AM, Julien Gabel wrote:

do you  have your securelevel set in rc.conf to YES and to a higher
level (like 3)?
Yes, this machine had a securevel positionned: it set to '2'. But
because I can't touch the disk even in Single User Mode, I don't
think it is related, but...
What is your idea?

Ok.  I had missed the earlier parts.  I had a problem recently where a 
new disk was not touchable at all and it was related to the 
securelevel being at 3...

Was just a thought.

Good luck
Chad
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can't *write* to a hard disk, not even a slice using fdisk(8).

2004-04-11 Thread Julien Gabel
 do you  have your securelevel set in rc.conf to YES and to a higher
 level (like 3)?

 Yes, this machine had a securevel positionned: it set to '2'. But
 because I can't touch the disk even in Single User Mode, I don't
 think it is related, but...

 What is your idea?

 Ok.  I had missed the earlier parts.  I had a problem recently where a
 new disk was not touchable at all and it was related to the
 securelevel being at 3...

 Was just a thought.

I did not mention it before,... thanks :)
--
-jpeg.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can't *write* to a hard disk, not even a slice using fdisk(8).

2004-04-11 Thread Joan Picanyol i Puig
On Sun, 11 Apr 2004 10:31:22 +0200, Julien Gabel wrote:

 GEOM doesn't let you write to an active device, except if you set
 kern.geom.debugflags=16
 
 Ok no problem, I changed it this way :
  # sysctl kern.geom.debugflags=16
  kern.geom.debugflags: 1 - 16
 
 But it seems to change *absolutly nothing*... :(

Mmmhh... We're doing something wrong here I guess :o Are you 100% sure
that ad10 is not used by any open geom modules? What does dmesg say about
ar*?

After reading man geom (see the fine print under SPOILING), maybe you
should take this up on current@, pointing to this thread and posting the
following information (better in single user mode, if you have a console):

0. dmesg
1. your RAID array configuration
2. your currently mounted partitions
3. the output of the fdisk command

qvb
-- 
pica


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can't *write* to a hard disk, not even a slice using fdisk(8).

2004-04-11 Thread Julien Gabel
 GEOM doesn't let you write to an active device, except if you set
 kern.geom.debugflags=16

 Ok no problem, I changed it this way:
  # sysctl kern.geom.debugflags=16
  kern.geom.debugflags: 1 - 16
 But it seems to change *absolutly nothing*... :(

 Mmmhh... We're doing something wrong here I guess :o Are you 100% sure
 that ad10 is not used by any open geom modules? What does dmesg say
 about ar*?

What we ca note is that:
 - The machine was booted without using this drive at all (nor in a 'ar'
   array, nor alone via 'ad10');
 - GEOM create an entry for this device during the boot proccess (see
   below), but there is no reference to use it from the OS point of view
   (/etc/fstab, etc.).
 - How can I _really_ know that this drive is not used by geom?

 # dmesg | tail -50
 [...]
 GEOM: create disk ad4 dp=0xc6cb6360
 ad4: 78167MB Maxtor 6Y080P0 [158816/16/63] at ata2-master UDMA133
 GEOM: create disk ad6 dp=0xc6ab2960
 ad6: 78167MB Maxtor 6Y080P0 [158816/16/63] at ata3-master UDMA133
 GEOM: create disk ad8 dp=0xc6ab2560
 ad8: 117246MB Maxtor 6Y120P0 [238216/16/63] at ata4-master UDMA133
 GEOM: create disk ad10 dp=0xc6ab2660
 ad10: 117246MB Maxtor 6Y120P0 [238216/16/63] at ata5-master UDMA133
 GEOM: create disk ar0 dp=0xc6aae5e0
 ar0: 78167MB ATA RAID1 array [9964/255/63] status: READY subdisks:
  disk0 READY on ad4 at ata2-master
  disk1 READY on ad6 at ata3-master
 Mounting root from ufs:/dev/ar0s1a
 g_slice_config(ad10, 0, 0)
 g_slice_config(ad10, 1, 0)
 g_slice_config(ad10, 2, 0)
 g_slice_config(ad10, 3, 0)
 g_slice_config(ad10, 0, 1)
 g_slice_config(ad10, 1, 1)
 g_slice_config(ad10, 2, 1)
 g_slice_config(ad10, 3, 1)

This is what we can expected to see: the only 'ar' array which exist now
is the first mirror for system part. There is no second array, since I
made /home only available on /dev/ad8 and not /dev/ar1s1d. I don't see
anything wrong here(?). Am I missing something?

 After reading man geom (see the fine print under SPOILING), maybe you
 should take this up on current@, pointing to this thread and posting the
 following information (better in single user mode, if you have a console):

Good pointer... which may explains the problem I encountered.

 0. dmesg
 1. your RAID array configuration
 2. your currently mounted partitions
 3. the output of the fdisk command

I will... after doing a swap and test this drive in an other machine to
test it with other hardware(controller) and OS to avoid some mistake on
my side.

Thanks for your help,
-- 
-jpeg.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can't *write* to a hard disk, not even a slice using fdisk(8).

2004-04-11 Thread Joan Picanyol i Puig
On Sun, 11 Apr 2004 15:15:18 +0200, Julien Gabel wrote:

 GEOM doesn't let you write to an active device, except if you set
 kern.geom.debugflags=16
 
 Ok no problem, I changed it this way:
  # sysctl kern.geom.debugflags=16
  kern.geom.debugflags: 1 - 16
 But it seems to change *absolutly nothing*... :(
 
 Mmmhh... We're doing something wrong here I guess :o Are you 100% sure
 that ad10 is not used by any open geom modules? What does dmesg say
 about ar*?
 
  # dmesg | tail -50
  [...]
  GEOM: create disk ad4 dp=0xc6cb6360
  ad4: 78167MB Maxtor 6Y080P0 [158816/16/63] at ata2-master UDMA133
  GEOM: create disk ad6 dp=0xc6ab2960
  ad6: 78167MB Maxtor 6Y080P0 [158816/16/63] at ata3-master UDMA133
  GEOM: create disk ad8 dp=0xc6ab2560
  ad8: 117246MB Maxtor 6Y120P0 [238216/16/63] at ata4-master UDMA133
  GEOM: create disk ad10 dp=0xc6ab2660
  ad10: 117246MB Maxtor 6Y120P0 [238216/16/63] at ata5-master UDMA133
  GEOM: create disk ar0 dp=0xc6aae5e0
  ar0: 78167MB ATA RAID1 array [9964/255/63] status: READY subdisks:
   disk0 READY on ad4 at ata2-master
   disk1 READY on ad6 at ata3-master
  Mounting root from ufs:/dev/ar0s1a
  g_slice_config(ad10, 0, 0)
[...]
  g_slice_config(ad10, 3, 1)
 
 This is what we can expected to see: the only 'ar' array which exist now
 is the first mirror for system part. There is no second array, since I
 made /home only available on /dev/ad8 and not /dev/ar1s1d. I don't see
 anything wrong here(?). Am I missing something?

Well, I see that geom tastes ad10 and creates a slice class for it...
However, if kern.geom.debugflags=16, you should still be able to touch the
slice.

If debugflags=16 I know of no reason why you shouldn't be able to
partition de disk; sorry, I'm stumped :(

qvb
-- 
pica


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Can't *write* to a hard disk, not even a slice using fdisk(8).

2004-04-10 Thread Julien Gabel
Hello,

Here is my problem. I had a hard disk for one year now, working together
with an other identical disk in a _hard_ mirror. One month ago, I noticed
the mirror was not active, found that the second part of the mirror was
not responding and decided to recreate completely the mirror after making
some fresh backup (from the valid part of the RAID-1).

Te newly created mirror seems to work fine until yesterday, when I need
to reboot the system... and the mirror was not responding for a second
time. But this time it was not possible to create a new fs on the recreated
mirror as I did before. For the moment, the system works great on a single
disk.

But the fact that the BIOS and FreeBSD sees the faulting disk without
problem makes me in doubt. I can't see any error from the OS point of view
(nor in syslog nor in console) but now I can't even _partition_ it with
fdisk(8), saying that Operation not permitted!

- My OS release is FreeBSD 5.2.1-RELEASE-p4.

- The disk is a 120Go/8Mo from Maxtor (UDMA133).

- What dmesg(8) says about it:
  # grep ad10 /var/run/dmesg.boot
  GEOM: create disk ad10 dp=0xc6ab2660
  ad10: 117246MB Maxtor 6Y120P0 [238216/16/63] at ata5-master UDMA133

- But when I tried to create a slice on it, I get:
  # fdisk -BI ad10
  *** Working on device /dev/ad10 ***
  fdisk: can't write fdisk partition table: Operation not permitted

1/ How can I be certain that the hard disk is dead (even if it seems
   not to be)?
2/ Is there someting I can do to test/repair it?
3/ Anything else to say to diagnose my problem?

Thanks in advance,
-- 
-jpeg.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can't *write* to a hard disk, not even a slice using fdisk(8).

2004-04-10 Thread Joan Picanyol i Puig
On Sat, 10 Apr 2004 15:22:16 +0200, Julien Gabel wrote:

 Hello,
 
 Here is my problem. I had a hard disk for one year now, working together
 with an other identical disk in a _hard_ mirror.
What's a '_hard_ mirror'? How did you set it up?

 - But when I tried to create a slice on it, I get:
   # fdisk -BI ad10
   *** Working on device /dev/ad10 ***
   fdisk: can't write fdisk partition table: Operation not permitted
GEOM doesn't let you touch the disk if some partition is mounted off it.
Try setting kern.geom.debugflags to 1
 
 3/ Anything else to say to diagnose my problem?
Please show us /etc/fstab and the output of mount

qvb
-- 
pica


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can't *write* to a hard disk, not even a slice using fdisk(8).

2004-04-10 Thread Julien Gabel
 Here is my problem. I had a hard disk for one year now, working together
 with an other identical disk in a _hard_ mirror.

 What's a '_hard_ mirror'? How did you set it up?

I want to say that it is a mirror created with a hardware HighPoint HPT374
(channel 2+3) UDMA133 controller ; not created using software, like vinum
for example.

 - But when I tried to create a slice on it, I get:
   # fdisk -BI ad10
   *** Working on device /dev/ad10 ***
   fdisk: can't write fdisk partition table: Operation not permitted

 GEOM doesn't let you touch the disk if some partition is mounted off it.
 Try setting kern.geom.debugflags to 1

There is no partition mounted on it because the miror is actually breack,
so this disk is totally not used at this time.

Before that, a /home was mounted on the device corresponding to the mirror,
i.e. /dev/ar1 (which was made from /dev/ad8 + /dev/ad10). Actually, and
because I had some activity on this machine, I made the /home partition
available under the /dev/ad8 device alone, which is the other identical
disk which previously formed the mirror and works like a charm.

I changed the sysctl's flag :
 # sysctl kern.geom.debugflags=1
 kern.geom.debugflags: 0 - 1

But when I try :
 # fdisk -BI ad10
 *** Working on device /dev/ad10 ***
 fdisk: can't write fdisk partition table: Operation not permitted

I just get these messages via syslog :
 # tail -8 /var/log/messages
 Apr 10 23:39:04 bento kernel: g_slice_config(ad10, 0, 0)
 Apr 10 23:39:04 bento kernel: g_slice_config(ad10, 1, 0)
 Apr 10 23:39:04 bento kernel: g_slice_config(ad10, 2, 0)
 Apr 10 23:39:04 bento kernel: g_slice_config(ad10, 3, 0)
 Apr 10 23:39:04 bento kernel: g_slice_config(ad10, 0, 1)
 Apr 10 23:39:04 bento kernel: g_slice_config(ad10, 1, 1)
 Apr 10 23:39:04 bento kernel: g_slice_config(ad10, 2, 1)
 Apr 10 23:39:04 bento kernel: g_slice_config(ad10, 3, 1)

 3/ Anything else to say to diagnose my problem?

 Please show us /etc/fstab and the output of mount

 # grep /home /etc/fstab
 #/dev/ar1s1d   /home   ufs   rw,nosuid,nodev,noexec,userquota   2   2
 /dev/ad8s1d/home   ufs   rw,nosuid,nodev,noexec,userquota   2   2

 # mount
 /dev/ar0s1a on / (ufs, local)
 devfs on /dev (devfs, local)
 /dev/ad8s1d on /home (ufs, local, nodev, noexec, nosuid, with quotas,
soft-updates)
 /dev/ar0s1e on /tmp (ufs, local, nodev, nosuid, soft-updates)
 /dev/ar0s1f on /usr (ufs, local, soft-updates)
 /dev/ar0s1d on /var (ufs, local, noexec, soft-updates)

Because the problematic disk is not actually used, I can try some commands
on it if someone think it may be interesting.

Thanks for your help,
--
-jpeg.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can't *write* to a hard disk, not even a slice using fdisk(8).

2004-04-10 Thread Joan Picanyol i Puig
On Sun, 11 Apr 2004 00:45:14 +0200, Julien Gabel wrote:
 GEOM doesn't let you touch the disk if some partition is mounted off it.
 Try setting kern.geom.debugflags to 1

I suck. This should have said:

GEOM doesn't let you write to an active device, except if you set
kern.geom.debugflags=16

 I changed the sysctl's flag :
  # sysctl kern.geom.debugflags=1
  kern.geom.debugflags: 0 - 1

so this should be 16 not 1

  # mount
  /dev/ar0s1a on / (ufs, local)
  devfs on /dev (devfs, local)
  /dev/ad8s1d on /home (ufs, local, nodev, noexec, nosuid, with quotas,
 soft-updates)
  /dev/ar0s1e on /tmp (ufs, local, nodev, nosuid, soft-updates)
  /dev/ar0s1f on /usr (ufs, local, soft-updates)
  /dev/ar0s1d on /var (ufs, local, noexec, soft-updates)

If ad8 is part of ar0 GEOM will try to keep you from shooting yourself on
the foot. You should take ad8 out of the array first.

 
 Because the problematic disk is not actually used, I can try some commands
 on it if someone think it may be interesting.

On the hardware side, you should look for some diagnostic tool from the
manufacturer.

qvb
-- 
pica


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can't *write* to a hard disk, not even a slice using fdisk(8).

2004-04-10 Thread Malcolm Kay
On Sunday 11 April 2004 07:15, Julien Gabel wrote:

 I want to say that it is a mirror created with a hardware HighPoint HPT374
 (channel 2+3) UDMA133 controller ; not created using software, like vinum
 for example.

  - But when I tried to create a slice on it, I get:
# fdisk -BI ad10
*** Working on device /dev/ad10 ***
fdisk: can't write fdisk partition table: Operation not permitted

 There is no partition mounted on it because the miror is actually breack,
 so this disk is totally not used at this time.

 Before that, a /home was mounted on the device corresponding to the mirror,
 i.e. /dev/ar1 (which was made from /dev/ad8 + /dev/ad10). Actually, and
 because I had some activity on this machine, I made the /home partition
 available under the /dev/ad8 device alone, which is the other identical
 disk which previously formed the mirror and works like a charm.

I take it that you are still trying to manage ad10 through the RAID capable
controller.

No real information but I would guess the controller is still seeing 
information on the drive ad10 which ties it in with some other disk for RAID.

If you have a regular on board ATA interface I'd try plugging the drive in 
there (you can do it with all other drives removed for safety) and then try 
to initialise using an installation CD. If that works I imagine you can put
every thing back in your prefered configuration and continue.

Malcolm


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]