Re: jls usage

2013-07-11 Thread Colin House

On 12/07/2013 11:19 AM, Fbsd8 wrote:

In a .sh script I'm trying to get the jid for a single jail using this code

jid=`jls -j jailname | cut -f 1- | awk '{print $1}'`

The first line output by jls is a title line which the cut command is
suppose to cut out so the first field on line 2 gets selected by the awk
command. This is not working as I want, I get the first field of the
title line.

Is the cut command the correct command to us here?

This is what the jls command shows
# /root >jls -j dir2
JID  IP Address  Hostname Path
 15  10.0.10.24  dir2 /usr/jails/dir2

  I am after the number 15

Thanks in advance

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



this might do the trick for you:

jls -j jailname | tail -1 | awk '{print $1}'
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: jls usage

2013-07-11 Thread Teske, Devin

On Jul 11, 2013, at 6:19 PM, Fbsd8 wrote:

> In a .sh script I'm trying to get the jid for a single jail using this code
> 
> jid=`jls -j jailname | cut -f 1- | awk '{print $1}'`
> 

Looks a little over complicated... why not just..

jls -j jailname jid
-- 
Devin

> The first line output by jls is a title line which the cut command is suppose 
> to cut out so the first field on line 2 gets selected by the awk command. 
> This is not working as I want, I get the first field of the title line.
> 
> Is the cut command the correct command to us here?
> 
> This is what the jls command shows
> # /root >jls -j dir2
>   JID  IP Address  Hostname Path
>15  10.0.10.24  dir2 /usr/jails/dir2
> 
> I am after the number 15
> 
> Thanks in advance
> 
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

_
The information contained in this message is proprietary and/or confidential. 
If you are not the intended recipient, please: (i) delete the message and all 
copies; (ii) do not disclose, distribute or use the message in any manner; and 
(iii) notify the sender immediately. In addition, please be aware that any 
message addressed to our domain is subject to archiving and review by persons 
other than the intended recipient. Thank you.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


jls usage

2013-07-11 Thread Fbsd8

In a .sh script I'm trying to get the jid for a single jail using this code

jid=`jls -j jailname | cut -f 1- | awk '{print $1}'`

The first line output by jls is a title line which the cut command is 
suppose to cut out so the first field on line 2 gets selected by the awk 
command. This is not working as I want, I get the first field of the 
title line.


Is the cut command the correct command to us here?

This is what the jls command shows
# /root >jls -j dir2
   JID  IP Address  Hostname Path
15  10.0.10.24  dir2 /usr/jails/dir2

 I am after the number 15

Thanks in advance

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


Re: [Bulk] FreeBSD upgrade woes (8.3 -> 8.4)

2013-07-11 Thread Mark Felder
On Thu, Jul 11, 2013, at 14:37, David Noel wrote:
> 
> If this is the case replacing the kernel should have no effect. But
> what then? Any thoughts?

I'd contact freebsd-fs@ and see what they have to say
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: [Bulk] FreeBSD upgrade woes (8.3 -> 8.4)

2013-07-11 Thread David Noel
On 7/11/13, Mark Felder  wrote:
> On Thu, 11 Jul 2013 05:00:39 -0500, Eduardo Morras 
> wrote:
>
>> Perhaps make buildkernel was compiled with -j >1, it's known to create a
>>
>> buggy kernel.
>
> This is not true to my knowledge. If buildkernel produced bad kernels with
>
> -j>1 we'd not allow you to do that without jumping through hoops.
>

If this is the case replacing the kernel should have no effect. But
what then? Any thoughts?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How to get file from nfs id

2013-07-11 Thread Dan Nelson
In the last episode (Jul 11), Radek Krejca said:
> Hello,
> 
> I have problem with heavy load of my nfsd server. There is connected about 70 
> diskless machines, but in readonly mode. I catched traffic and get this:
> 
> 21:00:39.715337 IP diskless-1.3297435097 > storage.nfs: 112 getattr fh 
> Unknown/A27801CEDE115FA30A005CD908007ABA4200570CDB51
> 21:00:39.716229 IP storage.nfs > diskless-1.3297435097: reply ok 112 getattr 
> REG 444 ids 0/0 sz 64944
> 21:00:39.716463 IP diskless-1.3297435098 > storage.nfs: 112 getattr fh 
> Unknown/A27801CEDE115FA30A0043DE08007CBA4200570CDB51
> 21:00:39.719112 IP storage.nfs > diskless-1.3297435098: reply ok 112 getattr 
> REG 444 ids 0/0 sz 82800
> 21:00:39.719453 IP diskless-1.3297435099 > storage.nfs: 112 getattr fh 
> Unknown/A27801CEDE115FA30A0043DE08007CBA4200570CDB51
> 21:00:39.721636 IP storage.nfs > diskless-1.3297435099: reply ok 112 getattr 
> REG 444 ids 0/0 sz 82800
> 
> Why is the same machine requesting chmod of the same file and is there any
> way to find out name of file from this long id?

You can't get tcpdump to print it, but the getattr reply does include the
inode of the file.  If you start up wireshark and capture the same packets
(or open a capture file created by tcpdump), the inode is stored in the
"nfs->obj_attributes->attributes->fileid" field.  You can then use "find /
-inum 12345" to locate that inode on disk.

-- 
Dan Nelson
dnel...@allantgroup.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: prevent ip conflict in dhcp client

2013-07-11 Thread krad
what is normal though these days? A lot of the fibre vhdsl lines do use
dhcp on the wan link in the uk as they are just presented as ethernet,
whilst other providers pppoe.


On 11 July 2013 13:47, Frank Leonhardt  wrote:

> This all sounds like a very strange thing to be doing! But I hate it when
> people answer my questions with "Why would you want to do that", so I won't.
>
> Binding an IPv4 address using a MAC address, which is the answer to a lot
> of DHCP problems. But your explanation "my client acts like a router" set
> alarm bells ringing. What exactly are you trying to do, and are you aware
> that routers aren't (normally) configured using DHCP? If you've got any
> kind of normal Internet line it will receive it's IP address using LCP (the
> NCP part, and the IPCP to be precise). Or at least, that's how I think it
> normally works.
>
> Regards, Frank.
>
>
> On 11/07/2013 12:43, krad wrote:
>
>> ops %s/rand/range/
>>
>>
>> On 11 July 2013 12:42, krad  wrote:
>>
>>  alter the pool rand on the network to use say, x.x.x.1-199 on a /24, and
>>> then allocate your statics >200 but <= 254 or add something similar to
>>> your
>>> isc-dhcp config
>>>
>>> host host.intranet {
>>>hardware ethernet c8:60:33:1d:f3:57;
>>>fixed-address 192.168.210.81;
>>>option host-name "host.intranet";
>>>   }
>>>
>>> Alternatively use ipv6 as the automatic ip address configuration tests
>>> exactly like you commented on
>>>
>>>
>>> On 11 July 2013 12:18, s m  wrote:
>>>
>>>  thanks Eugene,
 you're right but i forgot to say that my client acts like a router. i
 mean
 none of interfaces should have ip address in same range (this is
 conflict
 for me). i can manage each interface to get ip address from DHCP or
 manually. so one interface may get ip address from dhcp server whereas
 all
 others have ip addresses which are set manually.
 for this situation, do you have any ideas to avoid ip conflict?
 thanks again for your attention
 SAM


 On Thu, Jul 11, 2013 at 3:06 PM, Eugene  wrote:

  Hi Sam,
>
> Actually I think this is wrong approach. Correctly configured networks
> should be consistent and should not need such 'fixes'. Also you should
> observe the IP provided by upstream DHCP server otherwise it is an
> invitation for trouble (both technical and possibly legal).
> Are the 'other' interfaces in your internal networks? Then you should
> change them to use different address block from that used in your
> provider's network (there are many address blocks for private
> networks).
> And/or you should talk to your admin and discuss the address policy,
>
 maybe

> they can give you a fixed address.
>
> Best wishes
> Eugene
>
>
> -Original Message- From: s m
> Sent: Thursday, July 11, 2013 2:19 PM
> To: freebsd-questions
> Subject: prevent ip conflict in dhcp client
>
>
> hello all
>
> i have a question about dhcp client. i want to know if there is any way
>
 to

> understand the ip address which is offered by server before it assigned
>
 to

> the interface.
> i have a freebsd system which one of its interfaces should get ip
>
 address

> from dhcp server whereas other interfaces have ip addresses and their
> ip
> address change many times. so i want to prevent ip conflict.  is there
>
 any

> way to prevent ip conflict in this situation?
> i think the best way is to know the ip address which is offered by dhcp
> server before assigning it to interface  and check if it has conflict
>
 with

> others or not. is it possible? if yes, how i can do this?
>
> any comments or hints are appreciated.
> thanks in advance
> SAM
> ___
> freebsd-questions@freebsd.org  mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> <
>
 http://lists.freebsd.org/**mailman/listinfo/freebsd-**questions
 >

> To unsubscribe, send any mail to "freebsd-questions-**
> unsubscr...@freebsd.org  
> 
> >"
>
>  __**_
 freebsd-questions@freebsd.org  mailing list
 http://lists.freebsd.org/**mailman/listinfo/freebsd-**questions
 To unsubscribe, send any mail to "
 freebsd-questions-unsubscribe@**freebsd.org
 "

  __**_
>> freebsd-questions@freebsd.org  mailing list
>> http://lists.freebsd.org/**mailman/listinfo/freebsd-**questions
>> To unsubscribe, send any mail to"fre

Re: prevent ip conflict in dhcp client

2013-07-11 Thread Frank Leonhardt
This all sounds like a very strange thing to be doing! But I hate it 
when people answer my questions with "Why would you want to do that", so 
I won't.


Binding an IPv4 address using a MAC address, which is the answer to a 
lot of DHCP problems. But your explanation "my client acts like a 
router" set alarm bells ringing. What exactly are you trying to do, and 
are you aware that routers aren't (normally) configured using DHCP? If 
you've got any kind of normal Internet line it will receive it's IP 
address using LCP (the NCP part, and the IPCP to be precise). Or at 
least, that's how I think it normally works.


Regards, Frank.


On 11/07/2013 12:43, krad wrote:

ops %s/rand/range/


On 11 July 2013 12:42, krad  wrote:


alter the pool rand on the network to use say, x.x.x.1-199 on a /24, and
then allocate your statics >200 but <= 254 or add something similar to your
isc-dhcp config

host host.intranet {
   hardware ethernet c8:60:33:1d:f3:57;
   fixed-address 192.168.210.81;
   option host-name "host.intranet";
  }

Alternatively use ipv6 as the automatic ip address configuration tests
exactly like you commented on


On 11 July 2013 12:18, s m  wrote:


thanks Eugene,
you're right but i forgot to say that my client acts like a router. i mean
none of interfaces should have ip address in same range (this is conflict
for me). i can manage each interface to get ip address from DHCP or
manually. so one interface may get ip address from dhcp server whereas all
others have ip addresses which are set manually.
for this situation, do you have any ideas to avoid ip conflict?
thanks again for your attention
SAM


On Thu, Jul 11, 2013 at 3:06 PM, Eugene  wrote:


Hi Sam,

Actually I think this is wrong approach. Correctly configured networks
should be consistent and should not need such 'fixes'. Also you should
observe the IP provided by upstream DHCP server otherwise it is an
invitation for trouble (both technical and possibly legal).
Are the 'other' interfaces in your internal networks? Then you should
change them to use different address block from that used in your
provider's network (there are many address blocks for private networks).
And/or you should talk to your admin and discuss the address policy,

maybe

they can give you a fixed address.

Best wishes
Eugene


-Original Message- From: s m
Sent: Thursday, July 11, 2013 2:19 PM
To: freebsd-questions
Subject: prevent ip conflict in dhcp client


hello all

i have a question about dhcp client. i want to know if there is any way

to

understand the ip address which is offered by server before it assigned

to

the interface.
i have a freebsd system which one of its interfaces should get ip

address

from dhcp server whereas other interfaces have ip addresses and their ip
address change many times. so i want to prevent ip conflict.  is there

any

way to prevent ip conflict in this situation?
i think the best way is to know the ip address which is offered by dhcp
server before assigning it to interface  and check if it has conflict

with

others or not. is it possible? if yes, how i can do this?

any comments or hints are appreciated.
thanks in advance
SAM
__**_
freebsd-questions@freebsd.org  mailing list
http://lists.freebsd.org/**mailman/listinfo/freebsd-**questions<

http://lists.freebsd.org/mailman/listinfo/freebsd-questions>

To unsubscribe, send any mail to "freebsd-questions-**
unsubscr...@freebsd.org  "


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


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


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


Re: [Bulk] FreeBSD upgrade woes (8.3 -> 8.4)

2013-07-11 Thread Warren Block

On Thu, 11 Jul 2013, Eduardo Morras wrote:


On Thu, 11 Jul 2013 04:40:38 -0500
David Noel  wrote:


I didn't include the make buildworld or make buildkernel for the sake
of brevity but yes, I executed them prior to installworld and
installkernel.


Perhaps make buildkernel was compiled with -j >1, it's known to create a buggy 
kernel. Check your make configuration. Adding a -B, like make -B -j N buildkernel 
may work and is fast if -j is set to number or processors, but it's safer do a 
make -j 1 buildkernel, same for buildworld.


Is this version-specific?  I've been using -j4 or -j8 for years for 
buildworld and kernel (buildkernel + installkernel) on FreeBSD 8 and 9 
with no problems.  Probably on FreeBSD 7 also, but I don't recall.


installworld is a different matter, always do that with a single job.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: prevent ip conflict in dhcp client

2013-07-11 Thread Eugene

Hi Sam,

The idea that for the internal networks you should use so-called private 
address space (unless you are a big organization that need and can get a 
public address block of its own). You can read about it in more detail here 
https://en.wikipedia.org/wiki/Private_network


So, for your upstream interface you use the address obtained via DHCP from 
your provider.

For your internal networks you use private blocks, for example:
Network 1: 192.168.0.1 mask 255.255.255.0
Network 2: 192.168.1.1 mask 255.255.255.0
Network 3: 192.168.2.1 mask 255.255.255.0
etc...

And you configure NAT on the router to perform address translation for the 
external connections (See FreeBSD handbook for that).
Personally I think ipfilter/ipnat 
(http://www.freebsd.org/doc/handbook/firewalls-ipf.html) is more easy and 
convenient but other people probably will have other opinions =)


If you don't have a public IP address (sometimes this is optional service 
that costs extra money) and it happens that your provider also uses 
192.168.x.x block in ITS internal network (that is EXTERNAL for you), just 
change your internal networks to some other block.


Regards,
Eugene


-Original Message- 
From: s m

Sent: Thursday, July 11, 2013 3:18 PM
To: Eugene
Cc: freebsd-questions
Subject: Re: prevent ip conflict in dhcp client

thanks Eugene,
you're right but i forgot to say that my client acts like a router. i mean
none of interfaces should have ip address in same range (this is conflict
for me). i can manage each interface to get ip address from DHCP or
manually. so one interface may get ip address from dhcp server whereas all
others have ip addresses which are set manually.
for this situation, do you have any ideas to avoid ip conflict?
thanks again for your attention
SAM


On Thu, Jul 11, 2013 at 3:06 PM, Eugene  wrote:


Hi Sam,

Actually I think this is wrong approach. Correctly configured networks
should be consistent and should not need such 'fixes'. Also you should
observe the IP provided by upstream DHCP server otherwise it is an
invitation for trouble (both technical and possibly legal).
Are the 'other' interfaces in your internal networks? Then you should
change them to use different address block from that used in your
provider's network (there are many address blocks for private networks).
And/or you should talk to your admin and discuss the address policy, maybe
they can give you a fixed address.

Best wishes
Eugene


-Original Message- From: s m
Sent: Thursday, July 11, 2013 2:19 PM
To: freebsd-questions
Subject: prevent ip conflict in dhcp client


hello all

i have a question about dhcp client. i want to know if there is any way to
understand the ip address which is offered by server before it assigned to
the interface.
i have a freebsd system which one of its interfaces should get ip address
from dhcp server whereas other interfaces have ip addresses and their ip
address change many times. so i want to prevent ip conflict.  is there any
way to prevent ip conflict in this situation?
i think the best way is to know the ip address which is offered by dhcp
server before assigning it to interface  and check if it has conflict with
others or not. is it possible? if yes, how i can do this?

any comments or hints are appreciated.
thanks in advance
SAM
__**_
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/**mailman/listinfo/freebsd-**questions
To unsubscribe, send any mail to "freebsd-questions-**
unsubscr...@freebsd.org "


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


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


Re: prevent ip conflict in dhcp client

2013-07-11 Thread krad
ops %s/rand/range/


On 11 July 2013 12:42, krad  wrote:

> alter the pool rand on the network to use say, x.x.x.1-199 on a /24, and
> then allocate your statics >200 but <= 254 or add something similar to your
> isc-dhcp config
>
> host host.intranet {
>   hardware ethernet c8:60:33:1d:f3:57;
>   fixed-address 192.168.210.81;
>   option host-name "host.intranet";
>  }
>
> Alternatively use ipv6 as the automatic ip address configuration tests
> exactly like you commented on
>
>
> On 11 July 2013 12:18, s m  wrote:
>
>> thanks Eugene,
>> you're right but i forgot to say that my client acts like a router. i mean
>> none of interfaces should have ip address in same range (this is conflict
>> for me). i can manage each interface to get ip address from DHCP or
>> manually. so one interface may get ip address from dhcp server whereas all
>> others have ip addresses which are set manually.
>> for this situation, do you have any ideas to avoid ip conflict?
>> thanks again for your attention
>> SAM
>>
>>
>> On Thu, Jul 11, 2013 at 3:06 PM, Eugene  wrote:
>>
>> > Hi Sam,
>> >
>> > Actually I think this is wrong approach. Correctly configured networks
>> > should be consistent and should not need such 'fixes'. Also you should
>> > observe the IP provided by upstream DHCP server otherwise it is an
>> > invitation for trouble (both technical and possibly legal).
>> > Are the 'other' interfaces in your internal networks? Then you should
>> > change them to use different address block from that used in your
>> > provider's network (there are many address blocks for private networks).
>> > And/or you should talk to your admin and discuss the address policy,
>> maybe
>> > they can give you a fixed address.
>> >
>> > Best wishes
>> > Eugene
>> >
>> >
>> > -Original Message- From: s m
>> > Sent: Thursday, July 11, 2013 2:19 PM
>> > To: freebsd-questions
>> > Subject: prevent ip conflict in dhcp client
>> >
>> >
>> > hello all
>> >
>> > i have a question about dhcp client. i want to know if there is any way
>> to
>> > understand the ip address which is offered by server before it assigned
>> to
>> > the interface.
>> > i have a freebsd system which one of its interfaces should get ip
>> address
>> > from dhcp server whereas other interfaces have ip addresses and their ip
>> > address change many times. so i want to prevent ip conflict.  is there
>> any
>> > way to prevent ip conflict in this situation?
>> > i think the best way is to know the ip address which is offered by dhcp
>> > server before assigning it to interface  and check if it has conflict
>> with
>> > others or not. is it possible? if yes, how i can do this?
>> >
>> > any comments or hints are appreciated.
>> > thanks in advance
>> > SAM
>> > __**_
>> > freebsd-questions@freebsd.org mailing list
>> > http://lists.freebsd.org/**mailman/listinfo/freebsd-**questions<
>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions>
>> > To unsubscribe, send any mail to "freebsd-questions-**
>> > unsubscr...@freebsd.org "
>> >
>> ___
>> freebsd-questions@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> To unsubscribe, send any mail to "
>> freebsd-questions-unsubscr...@freebsd.org"
>>
>
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: prevent ip conflict in dhcp client

2013-07-11 Thread krad
alter the pool rand on the network to use say, x.x.x.1-199 on a /24, and
then allocate your statics >200 but <= 254 or add something similar to your
isc-dhcp config

host host.intranet {
  hardware ethernet c8:60:33:1d:f3:57;
  fixed-address 192.168.210.81;
  option host-name "host.intranet";
 }

Alternatively use ipv6 as the automatic ip address configuration tests
exactly like you commented on


On 11 July 2013 12:18, s m  wrote:

> thanks Eugene,
> you're right but i forgot to say that my client acts like a router. i mean
> none of interfaces should have ip address in same range (this is conflict
> for me). i can manage each interface to get ip address from DHCP or
> manually. so one interface may get ip address from dhcp server whereas all
> others have ip addresses which are set manually.
> for this situation, do you have any ideas to avoid ip conflict?
> thanks again for your attention
> SAM
>
>
> On Thu, Jul 11, 2013 at 3:06 PM, Eugene  wrote:
>
> > Hi Sam,
> >
> > Actually I think this is wrong approach. Correctly configured networks
> > should be consistent and should not need such 'fixes'. Also you should
> > observe the IP provided by upstream DHCP server otherwise it is an
> > invitation for trouble (both technical and possibly legal).
> > Are the 'other' interfaces in your internal networks? Then you should
> > change them to use different address block from that used in your
> > provider's network (there are many address blocks for private networks).
> > And/or you should talk to your admin and discuss the address policy,
> maybe
> > they can give you a fixed address.
> >
> > Best wishes
> > Eugene
> >
> >
> > -Original Message- From: s m
> > Sent: Thursday, July 11, 2013 2:19 PM
> > To: freebsd-questions
> > Subject: prevent ip conflict in dhcp client
> >
> >
> > hello all
> >
> > i have a question about dhcp client. i want to know if there is any way
> to
> > understand the ip address which is offered by server before it assigned
> to
> > the interface.
> > i have a freebsd system which one of its interfaces should get ip address
> > from dhcp server whereas other interfaces have ip addresses and their ip
> > address change many times. so i want to prevent ip conflict.  is there
> any
> > way to prevent ip conflict in this situation?
> > i think the best way is to know the ip address which is offered by dhcp
> > server before assigning it to interface  and check if it has conflict
> with
> > others or not. is it possible? if yes, how i can do this?
> >
> > any comments or hints are appreciated.
> > thanks in advance
> > SAM
> > __**_
> > freebsd-questions@freebsd.org mailing list
> > http://lists.freebsd.org/**mailman/listinfo/freebsd-**questions<
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions>
> > To unsubscribe, send any mail to "freebsd-questions-**
> > unsubscr...@freebsd.org "
> >
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscr...@freebsd.org"
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: [Bulk] FreeBSD upgrade woes (8.3 -> 8.4)

2013-07-11 Thread Mark Felder
On Thu, 11 Jul 2013 05:00:39 -0500, Eduardo Morras   
wrote:


Perhaps make buildkernel was compiled with -j >1, it's known to create a  
buggy kernel.


This is not true to my knowledge. If buildkernel produced bad kernels with  
-j>1 we'd not allow you to do that without jumping through hoops.

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


Re: prevent ip conflict in dhcp client

2013-07-11 Thread s m
thanks Eugene,
you're right but i forgot to say that my client acts like a router. i mean
none of interfaces should have ip address in same range (this is conflict
for me). i can manage each interface to get ip address from DHCP or
manually. so one interface may get ip address from dhcp server whereas all
others have ip addresses which are set manually.
for this situation, do you have any ideas to avoid ip conflict?
thanks again for your attention
SAM


On Thu, Jul 11, 2013 at 3:06 PM, Eugene  wrote:

> Hi Sam,
>
> Actually I think this is wrong approach. Correctly configured networks
> should be consistent and should not need such 'fixes'. Also you should
> observe the IP provided by upstream DHCP server otherwise it is an
> invitation for trouble (both technical and possibly legal).
> Are the 'other' interfaces in your internal networks? Then you should
> change them to use different address block from that used in your
> provider's network (there are many address blocks for private networks).
> And/or you should talk to your admin and discuss the address policy, maybe
> they can give you a fixed address.
>
> Best wishes
> Eugene
>
>
> -Original Message- From: s m
> Sent: Thursday, July 11, 2013 2:19 PM
> To: freebsd-questions
> Subject: prevent ip conflict in dhcp client
>
>
> hello all
>
> i have a question about dhcp client. i want to know if there is any way to
> understand the ip address which is offered by server before it assigned to
> the interface.
> i have a freebsd system which one of its interfaces should get ip address
> from dhcp server whereas other interfaces have ip addresses and their ip
> address change many times. so i want to prevent ip conflict.  is there any
> way to prevent ip conflict in this situation?
> i think the best way is to know the ip address which is offered by dhcp
> server before assigning it to interface  and check if it has conflict with
> others or not. is it possible? if yes, how i can do this?
>
> any comments or hints are appreciated.
> thanks in advance
> SAM
> __**_
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/**mailman/listinfo/freebsd-**questions
> To unsubscribe, send any mail to "freebsd-questions-**
> unsubscr...@freebsd.org "
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: prevent ip conflict in dhcp client

2013-07-11 Thread Eugene

Hi Sam,

Actually I think this is wrong approach. Correctly configured networks 
should be consistent and should not need such 'fixes'. Also you should 
observe the IP provided by upstream DHCP server otherwise it is an 
invitation for trouble (both technical and possibly legal).
Are the 'other' interfaces in your internal networks? Then you should change 
them to use different address block from that used in your provider's 
network (there are many address blocks for private networks).
And/or you should talk to your admin and discuss the address policy, maybe 
they can give you a fixed address.


Best wishes
Eugene


-Original Message- 
From: s m

Sent: Thursday, July 11, 2013 2:19 PM
To: freebsd-questions
Subject: prevent ip conflict in dhcp client

hello all

i have a question about dhcp client. i want to know if there is any way to
understand the ip address which is offered by server before it assigned to
the interface.
i have a freebsd system which one of its interfaces should get ip address
from dhcp server whereas other interfaces have ip addresses and their ip
address change many times. so i want to prevent ip conflict.  is there any
way to prevent ip conflict in this situation?
i think the best way is to know the ip address which is offered by dhcp
server before assigning it to interface  and check if it has conflict with
others or not. is it possible? if yes, how i can do this?

any comments or hints are appreciated.
thanks in advance
SAM
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" 


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


prevent ip conflict in dhcp client

2013-07-11 Thread s m
hello all

i have a question about dhcp client. i want to know if there is any way to
understand the ip address which is offered by server before it assigned to
the interface.
i have a freebsd system which one of its interfaces should get ip address
from dhcp server whereas other interfaces have ip addresses and their ip
address change many times. so i want to prevent ip conflict.  is there any
way to prevent ip conflict in this situation?
i think the best way is to know the ip address which is offered by dhcp
server before assigning it to interface  and check if it has conflict with
others or not. is it possible? if yes, how i can do this?

any comments or hints are appreciated.
thanks in advance
SAM
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: [Bulk] FreeBSD upgrade woes (8.3 -> 8.4)

2013-07-11 Thread David Noel
Ah. That very well might be it. I did call buildkernel with j > 1.

I'll boot an 8.4 memstick and replace the kernel.

Thanks,

-David

On 7/11/13, Eduardo Morras  wrote:
> On Thu, 11 Jul 2013 04:40:38 -0500
> David Noel  wrote:
>>
>> I didn't include the make buildworld or make buildkernel for the sake
>> of brevity but yes, I executed them prior to installworld and
>> installkernel.
>
> Perhaps make buildkernel was compiled with -j >1, it's known to create a
> buggy kernel. Check your make configuration. Adding a -B, like make -B -j N
> buildkernel may work and is fast if -j is set to number or processors, but
> it's safer do a make -j 1 buildkernel, same for buildworld.
>
> HTH
>
> ---   ---
> Eduardo Morras 
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: [Bulk] FreeBSD upgrade woes (8.3 -> 8.4)

2013-07-11 Thread Eduardo Morras
On Thu, 11 Jul 2013 04:40:38 -0500
David Noel  wrote:
> 
> I didn't include the make buildworld or make buildkernel for the sake
> of brevity but yes, I executed them prior to installworld and
> installkernel.

Perhaps make buildkernel was compiled with -j >1, it's known to create a buggy 
kernel. Check your make configuration. Adding a -B, like make -B -j N 
buildkernel may work and is fast if -j is set to number or processors, but it's 
safer do a make -j 1 buildkernel, same for buildworld.

HTH

---   ---
Eduardo Morras 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: [Bulk] FreeBSD upgrade woes (8.3 -> 8.4)

2013-07-11 Thread David Noel
On 7/11/13, Alexandre  wrote:
> On Thu, Jul 11, 2013 at 11:04 AM, David Noel 
> wrote:
>
>> I have 4 servers I'm upgrading from 8.3 to 8.4. Two of them went
>> without a hitch, two of them blew up in my face. The only difference
>> between the two is the ones that worked have a 2-disk ZFS mirror and
>> the ones that didn't have a 4-disk ZFS striped mirror configuration
>> (RAID10). They both use the GPT.
>>
>> After installworld && installkernel they made it through boot, but
>> right before the login prompt I'm getting a panic and stack dump. The
>> backtrace looks something like this (roughly):
>>
>> 0 kdb_backtrace
>> 1 panic
>> 2 trap_fatal
>> 3 trap_pfault
>> 4 trap
>> 5 calltrap
>> 6 vdev_mirror_child_select
>> 7 vdev_mirror_io_start
>> 8 zio_vdev_io_start
>> 9 zio_execute
>> 10 arc_read
>> 11 dbuf_read
>> 12 dbuf_findbp
>> 13 dbuf_hold_impl
>> 14 dbuf_hold
>> 15 dnode_hold_impl
>> 16 dmu_buf_hold
>> 17 zap_lockdir
>>
>> Does anyone have any idea what went wrong?
>>
>> Does anyone have any suggestions on how to get past this?
>>
>> Many thanks,
>>
>> -David
>
> Hi David,
>
> You wrote you execute the commands "make installworld && make
> installkernel" but the first command is wrong. You must execute first "make
> buildworld".
> All the steps are explained in /usr/src/Makefile
>
> Regards,
> Alexandre
>

I didn't include the make buildworld or make buildkernel for the sake
of brevity but yes, I executed them prior to installworld and
installkernel.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: [Bulk] FreeBSD upgrade woes (8.3 -> 8.4)

2013-07-11 Thread Alexandre
On Thu, Jul 11, 2013 at 11:04 AM, David Noel  wrote:

> I have 4 servers I'm upgrading from 8.3 to 8.4. Two of them went
> without a hitch, two of them blew up in my face. The only difference
> between the two is the ones that worked have a 2-disk ZFS mirror and
> the ones that didn't have a 4-disk ZFS striped mirror configuration
> (RAID10). They both use the GPT.
>
> After installworld && installkernel they made it through boot, but
> right before the login prompt I'm getting a panic and stack dump. The
> backtrace looks something like this (roughly):
>
> 0 kdb_backtrace
> 1 panic
> 2 trap_fatal
> 3 trap_pfault
> 4 trap
> 5 calltrap
> 6 vdev_mirror_child_select
> 7 vdev_mirror_io_start
> 8 zio_vdev_io_start
> 9 zio_execute
> 10 arc_read
> 11 dbuf_read
> 12 dbuf_findbp
> 13 dbuf_hold_impl
> 14 dbuf_hold
> 15 dnode_hold_impl
> 16 dmu_buf_hold
> 17 zap_lockdir
>
> Does anyone have any idea what went wrong?
>
> Does anyone have any suggestions on how to get past this?
>
> Many thanks,
>
> -David

Hi David,

You wrote you execute the commands "make installworld && make
installkernel" but the first command is wrong. You must execute first "make
buildworld".
All the steps are explained in /usr/src/Makefile

Regards,
Alexandre
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


FreeBSD upgrade woes (8.3 -> 8.4)

2013-07-11 Thread David Noel
I have 4 servers I'm upgrading from 8.3 to 8.4. Two of them went
without a hitch, two of them blew up in my face. The only difference
between the two is the ones that worked have a 2-disk ZFS mirror and
the ones that didn't have a 4-disk ZFS striped mirror configuration
(RAID10). They both use the GPT.

After installworld && installkernel they made it through boot, but
right before the login prompt I'm getting a panic and stack dump. The
backtrace looks something like this (roughly):

0 kdb_backtrace
1 panic
2 trap_fatal
3 trap_pfault
4 trap
5 calltrap
6 vdev_mirror_child_select
7 vdev_mirror_io_start
8 zio_vdev_io_start
9 zio_execute
10 arc_read
11 dbuf_read
12 dbuf_findbp
13 dbuf_hold_impl
14 dbuf_hold
15 dnode_hold_impl
16 dmu_buf_hold
17 zap_lockdir

Does anyone have any idea what went wrong?

Does anyone have any suggestions on how to get past this?

Many thanks,

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


Re: How to get file from nfs id

2013-07-11 Thread Frank Leonhardt

On 11/07/2013 06:47, Radek Krejc(a wrote:

Hello,

I have problem with heavy load of my nfsd server. There is connected about 70 
diskless machines, but in readonly mode. I catched traffic and get this:

21:00:39.715337 IP diskless-1.3297435097 > storage.nfs: 112 getattr fh
Unknown/A27801CEDE115FA30A005CD908007ABA4200570CDB51
21:00:39.716229 IP storage.nfs > diskless-1.3297435097: reply ok 112
getattr REG 444 ids 0/0 sz 64944
21:00:39.716463 IP diskless-1.3297435098 > storage.nfs: 112 getattr fh
Unknown/A27801CEDE115FA30A0043DE08007CBA4200570CDB51
21:00:39.719112 IP storage.nfs > diskless-1.3297435098: reply ok 112
getattr REG 444 ids 0/0 sz 82800
21:00:39.719453 IP diskless-1.3297435099 > storage.nfs: 112 getattr fh
Unknown/A27801CEDE115FA30A0043DE08007CBA4200570CDB51
21:00:39.721636 IP storage.nfs > diskless-1.3297435099: reply ok 112
getattr REG 444 ids 0/0 sz 82800

Why is the same machine requesting chmod of the same file and is there any way 
to find out name of file from this long id?

Thank you
Radek


Sorry - I don't think there's an easy answer to this but someone who 
knows more about nfsd may be along soon.


However, if no better idea turns up you could try using dtrace to 
monitor the underlying calls (or hack nfsd?). I have thought about doing 
this myself, but it is only available in new FreeBSD releases and the 
DTrace user guide (from Sun) is 60 pages long and gives me a headache. I 
know Linux people do something similar using SystemTap.


Is the attribute caching on the client set correctly? Or even working (bug?)

BTW, what you're seeing isn't unusual.

Regards, Frank.

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