Re: How to create 2 versions of a port
On 10/02/2012 05:20, Fbsd8 wrote: I maintain a port that accesses the release distribution files. Now with 9.0 having a different path /i386/i386 and the files being compressed first with tar and then again with xz I need to change the port to access the new layout and file format. I would like to leave the current version in the ports as is which works fine with the 8.x world and add a second version that only works with 9.0 and newer. Question is how do i change the port description of the current port to say it supports 8.x with out re-adding the complete port again? I know I have to add the new port version that supports ge 9.0. Not a precise analogy, but take a look at: http://www.freebsd.org/cgi/cvsweb.cgi/ports/www/p5-RT-Authen-ExternalAuth/Makefile?rev=1.8;content-type=text%2Fx-cvsweb-markup This is an add-on module for RT which had (at the time) to adapt to the radically different layouts between rt-3.6.x and rt-3.8.x In your case, look at ${OSVERSION} to switch between different behaviours: .if ${OSVERSION} = 90 # FreeBSD 9.x and above ... .else # FreeBSD 8.x and below ... .endif Or you can have two different ports, and just use a test on ${OSVERSION} to say if the port is appropriate on that version: .if ${OSVERSION} = 90 BROKEN= only supported for FreeBSD 8.x or below .endif and in the other port: .if ${OSVERSION} 90 BROKEN= only supported for FreeBSD 9.x or above .endif Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: portshaker, listing updates and skipping broken/removed ports
Antonio Olivares olivares14...@gmail.com writes: Dear folks, I have a question regarding portshaker. I have successfully used Warren Block's script to make updates. http://www.wonkity.com/~wblock/docs/html/portupgrade.html #!/bin/sh /usr/sbin/portsnap fetch update \ /usr/local/sbin/portmaster -L --index-only | egrep '(ew|ort) version|total install' How can I do the same with portshaker command? snip Instead of running portsnap you can just use portshaker: something like `portshaker -UIM' from the top of my head. I don't have access to a system with portshaker on it atm (man portshaker is your friend). But the idea is that you can tell portshaker to fetch updates for all trees (including the official FreeBSD ports), and merge the trees. In any case `man portshaker' is your friend. 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
UTF-8 Support broken from ports update
Hello questions! In late january I updated all ports (portmaster --no-confirm -d -G -a) and after the update I lost UTF-8, wide character compatibility in irssi, vim and mutt and such-like. In fact, I can write åäö in terminal (echo manages to print them for instance) but I am unable to read the åäö that other systems write and also when I send my UTF-8 characters to other systems they only seem them as garbled. Using systemwide login.conf as such: :umask=022:\ :charset=UTF-8:\ :lang=en_US.UTF-8: and env tells me MM_CHARSET=UTF-8 LC_MONETARY=sv_SE.UTF-8 LANG=en_US.UTF-8 Ideas? Cheers, Love ___ 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
Resetting RAID1 drive as Non-RAID
I have a FreeBSD 9.0 server with an Intel RAID card that has two array mirrors of which one has failed. The remote host was not responding and had it reset to find in the RAID utility one of the drives had failed one of the RAID 1 arrays. Perhaps I shouldn't have, but I told the utility to use the drive again and it added back to the array with the 'Rebuild' message on the array, which means to rebuild the array within the OS. I went into the system as single user mode and did a 'fsck -y' on all the /etc/fstab mounts... backup# cat /etc/fstab # DeviceMountpoint FStype Options DumpPass# /dev/ar0s1b noneswapsw 0 0 /dev/ar0s1a / ufs rw 1 1 /dev/ar0s1f /home ufs rw 2 2 /dev/ar0s1d /usrufs rw 2 2 /dev/ar0s1e /varufs rw 2 2 #/dev/ar1s1d/data ufs rw,userquota,groupquota2 2 /dev/acd0 /cdrom cd9660 ro,noauto 0 0 The drive that failed is in the ar1 array. I can mount /data in single user mode and see all files fine, but it continues to report INCORRECT BLOCK COUNT messages and UNEXPECTED SOFT UPDATE INCONSISTENCY errors as well as allocated frags marked free and reports CLEAN no matter how many times I run fsck on the drive. I can mount the /data partition in normal mode, but will receive errors about 'lock order reversal' when doing umount on the drive or it will lock the system after several minutes with panic error if left mounted. Assuming my problem is that the drive needs to be replaced, now that the drive is in the array again, the utility no longer indicates which drive is bad. I believe I remember which it was, but not 100% sure. Is there a way to determine which physical drive is bad using FreeBSD? If able to reset to Non-RAID, would that allow FreeBSD to mount the DEGRADED array and continue to access to the data or does the drive need to be pulled in order to possibly satisfy FreeBSD to allow me to mount RAID-1 array DEGRADED? In the end, I am hoping to mount this array with the one drive until I can get the replacement drive installed. Thanks for any help, I realize some of this is related to the Intel RAID, just wanted to see if someone was familiar with how to recover from such a situation. ___ 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: 'rm' Can not delete files
So what do I change if I want to increase the shell's file limit? I use bash 4. And by the way, for me, part of the normal installation of a new FBSD box is to make certain changes. For example, for uniq -c I use %06 instead of %d because this way I can sort the output. Things like that. I never learned a shell language. I suppose no one is as dumb as someone who choose's not to learn, so, what's the right one. csh?, because I do a lot of scientific work?, or should I be looking at another? On Wed, Feb 8, 2012 at 10:25 PM, andrew clarke m...@ozzmosis.com wrote: On Tue 2012-02-07 23:17:16 UTC+, RW (rwmailli...@googlemail.com) wrote: On Tue, 07 Feb 2012 22:14:56 + Matthew Seaman wrote: ls -1 | xargs rm but be aware that that wont work for filenames with spaces. In addition, I don't believe it solves the OP's initial problem of the argument list being too long! You'd probably need to use the xargs -n switch here. The above will also try to 'rm' directories, which won't work. Instead I would use 'find': find . -type f -depth 1 -delete This will also work with filenames with spaces. Or the scenic route, using xargs, with one rm per file (slower): find . -type f -depth 1 -print0 | xargs -n1 -0 rm -f (The scenic route is useful if you want to do something else with the files instead of deleting them with rm.) Regards Andrew ___ 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: 'rm' Can not delete files
On 02/11/12 01:34, Henry Olyer wrote: So what do I change if I want to increase the shell's file limit? I don't think you can. It's not a shell limit. It's a limit to the number of arguments the command itself will take. As said, the shell expands '*' to a list of files as the argument, and rm is limited to the number of arguments it will parse. I use bash 4. And by the way, for me, part of the normal installation of a new FBSD box is to make certain changes. For example, for uniq -c I use %06 instead of %d because this way I can sort the output. Things like that. I never learned a shell language. I suppose no one is as dumb as someone who choose's not to learn, so, what's the right one. csh?, because I do a lot of scientific work?, or should I be looking at another? There's not really much difference in this factor for shell types; as for changes you'd have to hack the command's (say rm) code. As mentioned, I'd use the find -delete combination. On Wed, Feb 8, 2012 at 10:25 PM, andrew clarkem...@ozzmosis.com wrote: On Tue 2012-02-07 23:17:16 UTC+, RW (rwmailli...@googlemail.com) wrote: On Tue, 07 Feb 2012 22:14:56 + Matthew Seaman wrote: ls -1 | xargs rm but be aware that that wont work for filenames with spaces. In addition, I don't believe it solves the OP's initial problem of the argument list being too long! You'd probably need to use the xargs -n switch here. The above will also try to 'rm' directories, which won't work. Instead I would use 'find': find . -type f -depth 1 -delete This will also work with filenames with spaces. Or the scenic route, using xargs, with one rm per file (slower): find . -type f -depth 1 -print0 | xargs -n1 -0 rm -f (The scenic route is useful if you want to do something else with the files instead of deleting them with rm.) Regards Andrew ___ 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: 'rm' Can not delete files
On Fri, Feb 10, 2012 at 10:51 AM, Da Rock freebsd-questi...@herveybayaustralia.com.au wrote: On 02/11/12 01:34, Henry Olyer wrote: So what do I change if I want to increase the shell's file limit? I don't think you can. It's not a shell limit. It's a limit to the number of arguments the command itself will take. As said, the shell expands '*' to a list of files as the argument, and rm is limited to the number of arguments it will parse. I use bash 4. And by the way, for me, part of the normal installation of a new FBSD box is to make certain changes. For example, for uniq -c I use %06 instead of %d because this way I can sort the output. Things like that. I never learned a shell language. I suppose no one is as dumb as someone who choose's not to learn, so, what's the right one. csh?, because I do a lot of scientific work?, or should I be looking at another? There's not really much difference in this factor for shell types; as for changes you'd have to hack the command's (say rm) code. As mentioned, I'd use the find -delete combination. I think the only thing that would give you this sort of pseudo-granularity of MAX_ARGS (and ARG_MAX) control at run-time is xargs with the -s and -n options ... a play on andrew's earlier example: find . -type f -depth 1 -print0 | xargs -n99 -0 -s8192 -c5 rm -- or some such, depending on your needs, I believe in most situations this particular invocation will also out-perform find ... -delete. On Wed, Feb 8, 2012 at 10:25 PM, andrew clarkem...@ozzmosis.com wrote: On Tue 2012-02-07 23:17:16 UTC+, RW (rwmailli...@googlemail.com) wrote: On Tue, 07 Feb 2012 22:14:56 + Matthew Seaman wrote: ls -1 | xargs rm but be aware that that wont work for filenames with spaces. In addition, I don't believe it solves the OP's initial problem of the argument list being too long! You'd probably need to use the xargs -n switch here. The above will also try to 'rm' directories, which won't work. Instead I would use 'find': find . -type f -depth 1 -delete This will also work with filenames with spaces. Or the scenic route, using xargs, with one rm per file (slower): find . -type f -depth 1 -print0 | xargs -n1 -0 rm -f (The scenic route is useful if you want to do something else with the files instead of deleting them with rm.) Regards Andrew __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscribe@**freebsd.orgfreebsd-questions-unsubscr...@freebsd.org __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org -- regards, matt ___ 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: 'rm' Can not delete files
On Fri, Feb 10, 2012 at 11:04 AM, Matthew Story matthewst...@gmail.comwrote: On Fri, Feb 10, 2012 at 10:51 AM, Da Rock freebsd-questi...@herveybayaustralia.com.au wrote: On 02/11/12 01:34, Henry Olyer wrote: So what do I change if I want to increase the shell's file limit? I don't think you can. It's not a shell limit. It's a limit to the number of arguments the command itself will take. As said, the shell expands '*' to a list of files as the argument, and rm is limited to the number of arguments it will parse. I use bash 4. And by the way, for me, part of the normal installation of a new FBSD box is to make certain changes. For example, for uniq -c I use %06 instead of %d because this way I can sort the output. Things like that. I never learned a shell language. I suppose no one is as dumb as someone who choose's not to learn, so, what's the right one. csh?, because I do a lot of scientific work?, or should I be looking at another? There's not really much difference in this factor for shell types; as for changes you'd have to hack the command's (say rm) code. As mentioned, I'd use the find -delete combination. I think the only thing that would give you this sort of pseudo-granularity of MAX_ARGS (and ARG_MAX) control at run-time is xargs with the -s and -n options ... a play on andrew's earlier example: find . -type f -depth 1 -print0 | xargs -n99 -0 -s8192 -c5 rm -- the -c5 here should read -P5 ... apologies. or some such, depending on your needs, I believe in most situations this particular invocation will also out-perform find ... -delete. On Wed, Feb 8, 2012 at 10:25 PM, andrew clarkem...@ozzmosis.com wrote: On Tue 2012-02-07 23:17:16 UTC+, RW (rwmailli...@googlemail.com) wrote: On Tue, 07 Feb 2012 22:14:56 + Matthew Seaman wrote: ls -1 | xargs rm but be aware that that wont work for filenames with spaces. In addition, I don't believe it solves the OP's initial problem of the argument list being too long! You'd probably need to use the xargs -n switch here. The above will also try to 'rm' directories, which won't work. Instead I would use 'find': find . -type f -depth 1 -delete This will also work with filenames with spaces. Or the scenic route, using xargs, with one rm per file (slower): find . -type f -depth 1 -print0 | xargs -n1 -0 rm -f (The scenic route is useful if you want to do something else with the files instead of deleting them with rm.) Regards Andrew __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscribe@**freebsd.orgfreebsd-questions-unsubscr...@freebsd.org __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org -- regards, matt -- regards, matt ___ 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: 'rm' Can not delete files
ls -1 | xargs rm but be aware that that wont work for filenames with spaces. True. Can't do that using ls to generate the list of filenames as there is no option to generate a null-separated list amongst ls's multitudinous collection. In addition, I don't believe it solves the OP's initial problem of the argument list being too long! You'd probably need to use the xargs -n switch here. Go and read the xargs(1) man page carefully. xargs is specifically designed to avoid arglist overflows. Or the scenic route, using xargs, with one rm per file (slower): find . -type f -depth 1 -print0 | xargs -n1 -0 rm -f (The scenic route is useful if you want to do something else with the files instead of deleting them with rm.) In this case, if you're going to call rm repeatedly with only one arg, then xargs is pretty pointless. You might as well do: find . -type f -depth 1 -exec rm -f '{}' ';' but let's not leave people in any doubt that this is not the best option. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: 'rm' Can not delete files
On Fri, Feb 10, 2012 at 10:34:20AM -0500, Henry Olyer wrote: So what do I change if I want to increase the shell's file limit? You don't want to diddle the shell. Use the correct UNIX utilities such as - for, xargs or find - in this case as have been suggested by other responders. That is the way it is done (and done better) in UNIX. I use bash 4. OK. So?? I never learned a shell language. I suppose no one is as dumb as someone who choose's not to learn, so, what's the right one. csh?, because I do a lot of scientific work?, or should I be looking at another? Probably doesn't matter that much what type of work you are doing. It matters more what the users of a system tend to use. In FreeBSD it is tcsh which is basically an extension of csh. Actually, nowdays on FreeBSD, csh is just a link to tcsh anyway. On Lunix, I think most people use bash, so if you are there, do that. There are some small differences that are meaningful depending on what kind of scripting you are doing. But, mostly it doesn't matter a lot. jerry On Wed, Feb 8, 2012 at 10:25 PM, andrew clarke m...@ozzmosis.com wrote: On Tue 2012-02-07 23:17:16 UTC+, RW (rwmailli...@googlemail.com) wrote: On Tue, 07 Feb 2012 22:14:56 + Matthew Seaman wrote: ls -1 | xargs rm but be aware that that wont work for filenames with spaces. In addition, I don't believe it solves the OP's initial problem of the argument list being too long! You'd probably need to use the xargs -n switch here. The above will also try to 'rm' directories, which won't work. Instead I would use 'find': find . -type f -depth 1 -delete This will also work with filenames with spaces. Or the scenic route, using xargs, with one rm per file (slower): find . -type f -depth 1 -print0 | xargs -n1 -0 rm -f (The scenic route is useful if you want to do something else with the files instead of deleting them with rm.) Regards Andrew ___ 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: 'rm' Can not delete files
On 10/02/2012 16:04, Matthew Story wrote: find . -type f -depth 1 -print0 | xargs -n99 -0 -s8192 -c5 rm -- or some such, depending on your needs, I believe in most situations this particular invocation will also out-perform find ... -delete. Why would you believe that? find ... -delete calls unlink(2) directly on each file it finds as it searches the directory tree given that it matches the other find predicates. Whereas find ... -print0 | xargs ... rm ... involves a whole complicated sequence of find doing the same searching and matching job, then marshalling lists of filenames, piping them between processes, then xargs exec(2)ing rm with chunks of that arglist; each rm invocation then finally ... calling unlink(2) on each of the named files. Actually, I doubt you'ld see much difference above the noise in the speed of either of those two commands: they're both going to spend the vast majority of the time waiting for disk IO, and that's common to any way of doing this job. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: Resetting RAID1 drive as Non-RAID
On 2/10/2012 7:15 AM, Robert Fitzpatrick wrote: I have a FreeBSD 9.0 server with an Intel RAID card that has two array mirrors of which one has failed. The remote host was not responding and had it reset to find in the RAID utility one of the drives had failed one of the RAID 1 arrays. Perhaps I shouldn't have, but I told the utility to use the drive again and it added back to the array with the 'Rebuild' message on the array, which means to rebuild the array within the OS. I went into the system as single user mode and did a 'fsck -y' on all the /etc/fstab mounts... backup# cat /etc/fstab # DeviceMountpoint FStype Options DumpPass# /dev/ar0s1b noneswapsw 0 0 /dev/ar0s1a / ufs rw 1 1 /dev/ar0s1f /home ufs rw 2 2 /dev/ar0s1d /usrufs rw 2 2 /dev/ar0s1e /varufs rw 2 2 #/dev/ar1s1d/data ufs rw,userquota,groupquota2 2 /dev/acd0 /cdrom cd9660 ro,noauto 0 0 The drive that failed is in the ar1 array. I can mount /data in single user mode and see all files fine, but it continues to report INCORRECT BLOCK COUNT messages and UNEXPECTED SOFT UPDATE INCONSISTENCY errors as well as allocated frags marked free and reports CLEAN no matter how many times I run fsck on the drive. I can mount the /data partition in normal mode, but will receive errors about 'lock order reversal' when doing umount on the drive or it will lock the system after several minutes with panic error if left mounted. Assuming my problem is that the drive needs to be replaced, now that the drive is in the array again, the utility no longer indicates which drive is bad. I believe I remember which it was, but not 100% sure. Is there a way to determine which physical drive is bad using FreeBSD? If able to reset to Non-RAID, would that allow FreeBSD to mount the DEGRADED array and continue to access to the data or does the drive need to be pulled in order to possibly satisfy FreeBSD to allow me to mount RAID-1 array DEGRADED? In the end, I am hoping to mount this array with the one drive until I can get the replacement drive installed. Thanks for any help, I realize some of this is related to the Intel RAID, just wanted to see if someone was familiar with how to recover from such a situation. ___ 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 Using smartctl might be able to tell you which drive had a problem. It's not a guarantee though. Try the simple method, open up the case, unplug one drive and boot. If it works, you pulled the right drive. If it doesn't, try the other instead. If neither drive works right, attempt to update your backup asap. ___ 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: FreeBSD 9, GPT and gmirror
On Thu, 09 Feb 2012 07:02:29 -0800 per...@pluto.rain.com wrote: Janos Dohanics w...@3dresearch.com wrote: 1. The Guided partitioning doesn't suggest any more to create /var, /tmp, /usr, etc. file systems. Is it really the recommendation to go with just / ? Depends on who you ask :) and on your intended usage. 2. Is there a way to use the old sysinstall to install FreeBSD 9? Not using the standard distribution IIUC. You might want to look at http://druidbsd.sf.net/ [...] This may be just what I need - thank you. -- Janos Dohanics ___ 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: FreeBSD 9, GPT and gmirror
On Thu, 09 Feb 2012 20:20:03 +0100 Michael Cardell Widerkrantz m...@hack.org wrote: Janos Dohanics w...@3dresearch.com, 2012-02-08 19:42 (+0100): 4. Also, with GPT, one has to be in single user mode to synchronize disks - correct? I think the guide you linked to: http://blather.michaelwlucas.com/archives/1071 meant that you have to be in single user mode until you have edited /etc/fstab to point to the mirror, otherwise you wouldn't boot with root on the mirror. The synchronization between the disks works fine in multi-user mode as well. I have two 2 TiB disks in gmirror set up just like that. Synchronization was done running in multi-user. You are right - just removed and then re-inserted a component in one of the mirrors and the mirror synchronized fine in multi-user mode. -- Janos Dohanics ___ 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
istgt sessions / connections
Can anyone here explain the MaxSessions and MaxConnections setting for istgt? Let's say I have the following: 6 servers 8 LUNs 2 Paths to each LUN Is that... 96 sessions? 96 connections? It's very unclear what is meant by session and connection. Thanks, Mark ___ 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
Removal Attempt of Directory under ZFS causes Kernel Panic
We have a ZFS file system under FreeBSD9.0 running on a virtual machine which had been running flawlessly for a bit over a month when I discovered that I had copied our home directory into /usr/home such that we had /usr/home/home. As root, I cd'd to /usr/home and then typed rm -r home at which point the kernel panicked after removing most of this bogus home directory. It got to one particular user's subdirectory, worked normally for a bit and then that's when the kernel panicked. What we found were normal symlinks and files that, if you make any attempt to delete them or touch them, provoke the kernel panic and crash. If you mount the file system on a rescue disk, it crashes that. We've tried mounting on a debian rescue disk that supported zfs and it didn't crash, but hung. A coworker ran the debug version of our kernel and it complained about values being out of bounds for the several files in question. Basically, in the roughly 20 years of working with unix systems, I have never once seen anything like this. We don't think it has to do with the virtual machine because you can trigger the disaster only by trying to remove the specific files. everything else appears to be working normally including creating and deleting other files and directories. My gut feeling is that it is related to zfs. The bogus home directory was an attempt by me to rsync from the actual hardware system to the virtual system back in November and every file came out owned by root. I got the rsync working properly and forgot about this home/home directory until yesterday when I realized the mistake and tried to delete it. Does this sound familiar to anybody? This is the first zfs installation I have used and I am not real wild about trying it again if we can't solve this mystery. We can't seem to duplicate the problem. Any ideas are appreciated. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ 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: Removal Attempt of Directory under ZFS causes Kernel Panic
On Fri, February 10, 2012 11:43 am, Martin McCormick wrote: Does this sound familiar to anybody? This is the first zfs installation I have used and I am not real wild about trying it again if we can't solve this mystery. We can't seem to duplicate the problem. Any ideas are appreciated. Nothing sounds familiar, but as a first step in debugging most ZFS issues, what does a `zpool scrub`, `zpool status -v` output? (Expect the scrub to take a while; depending on speed/size of your disks and system, it could be several hours, and it will run in the background.) Daniel T. Staal --- This email copyright the author. Unless otherwise noted, you are expressly allowed to retransmit, quote, or otherwise use the contents for non-commercial purposes. This copyright will expire 5 years after the author's death, or in 30 years, whichever is longer, unless such a period is in excess of local copyright law. --- ___ 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: Removal Attempt of Directory under ZFS causes Kernel Panic
You will see a message on this group from Ryan Frederick who is a coworker of mine and who also posted a question about this same issue. There was a little confusion about which FreeBSD support group had been asked so my question and his are about the same machine. He submitted the stack trace so hopefully somebody can give us an idea as to how this happened. Thank you again. Martin McCormick ___ 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
Kernel Panic on 9.0-RELEASE When Attempting to Remove Files
I'm attempting to remove a number of old files within a directory that was rsynced over from another box. However a number of files (old symlinks and regular files in this instance) cause a kernel panic when attempting to remove them using rm or unlink. This is the panic message output: Fatal trap 12: page fault while in kernel mode cpuid = 1; apic id = 01 fault virtual address = 0x160 fault code = supervisor read data, page not present instruction pointer = 0x20:0x81476306 stack pointer = 0x28:0xff811aacf880 frame pointer = 0x28:0xff811aacf940 code segment= base 0x0, limit 0xf, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags= interrupt enabled, resume, IOPL = 0 current process = 4729 (rm) trap number = 12 panic: page fault cpuid = 1 KDB: stack backtrace: #0 0x808680fe at kdb_backtrace+0x5e #1 0x80832cb7 at panic+0x187 #2 0x80b18400 at trap_fatal+0x290 #3 0x80b18749 at trap_pfault+0x1f9 #4 0x80b18c0f at trap+0x3df #5 0x80b0313f at calltrap+0x8 #6 0x80b7d694 at VOP_REMOVE_APV+0x34 #7 0x808cb4fd at kern_unlinkat+0x32d #8 0x80b17cf0 at amd64_syscall+0x450 #9 0x80b03427 at Xfast_syscall+0xf7 And this is the backtrace from kgdb: #0 doadump (textdump=Variable textdump is not available. ) at pcpu.h:224 #1 0x808327f5 in kern_reboot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:442 #2 0x80832ca1 in panic (fmt=Variable fmt is not available. ) at /usr/src/sys/kern/kern_shutdown.c:607 #3 0x80b18400 in trap_fatal (frame=0xc, eva=Variable eva is not available. ) at /usr/src/sys/amd64/amd64/trap.c:819 #4 0x80b18749 in trap_pfault (frame=0xff811aacf7d0, usermode=0) at /usr/src/sys/amd64/amd64/trap.c:735 #5 0x80b18c0f in trap (frame=0xff811aacf7d0) at /usr/src/sys/amd64/amd64/trap.c:474 #6 0x80b0313f in calltrap () at /usr/src/sys/amd64/amd64/exception.S:228 #7 0x81476306 in zfs_freebsd_remove (ap=Variable ap is not available. ) at /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c:1842 #8 0x80b7d694 in VOP_REMOVE_APV (vop=Variable vop is not available. ) at vnode_if.c:1333 #9 0x808cb4fd in kern_unlinkat (td=0xfe00046cb8c0, fd=-100, path=0x7fffdd73 Address 0x7fffdd73 out of bounds, pathseg=UIO_USERSPACE, oldinum=0) at vnode_if.h:575 #10 0x80b17cf0 in amd64_syscall (td=0xfe00046cb8c0, traced=0) at subr_syscall.c:131 #11 0x80b03427 in Xfast_syscall () at /usr/src/sys/amd64/amd64/exception.S:387 #12 0x0008009315fc in ?? () This particular system is a VM running on a VMWare ESXi hypervisor. So far I haven't had any luck in finding a cause. Ryan ___ 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: Kernel Panic on 9.0-RELEASE When Attempting to Remove Files
In response to the related thread started by Martin McCormick we did run a `zpool scrub` on the zpool, and the scrub completed successfully with no repairs performed. I successfully tried importing the zpool in Linux using the native Linux ZFS module. However attempting to remove the files via Linux results in `rm` either being killed or hanging. Ryan On 02/10/2012 10:43 AM, Ryan Frederick wrote: I'm attempting to remove a number of old files within a directory that was rsynced over from another box. However a number of files (old symlinks and regular files in this instance) cause a kernel panic when attempting to remove them using rm or unlink. This is the panic message output: Fatal trap 12: page fault while in kernel mode cpuid = 1; apic id = 01 fault virtual address = 0x160 fault code = supervisor read data, page not present instruction pointer = 0x20:0x81476306 stack pointer = 0x28:0xff811aacf880 frame pointer = 0x28:0xff811aacf940 code segment = base 0x0, limit 0xf, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 4729 (rm) trap number = 12 panic: page fault cpuid = 1 KDB: stack backtrace: #0 0x808680fe at kdb_backtrace+0x5e #1 0x80832cb7 at panic+0x187 #2 0x80b18400 at trap_fatal+0x290 #3 0x80b18749 at trap_pfault+0x1f9 #4 0x80b18c0f at trap+0x3df #5 0x80b0313f at calltrap+0x8 #6 0x80b7d694 at VOP_REMOVE_APV+0x34 #7 0x808cb4fd at kern_unlinkat+0x32d #8 0x80b17cf0 at amd64_syscall+0x450 #9 0x80b03427 at Xfast_syscall+0xf7 And this is the backtrace from kgdb: #0 doadump (textdump=Variable textdump is not available. ) at pcpu.h:224 #1 0x808327f5 in kern_reboot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:442 #2 0x80832ca1 in panic (fmt=Variable fmt is not available. ) at /usr/src/sys/kern/kern_shutdown.c:607 #3 0x80b18400 in trap_fatal (frame=0xc, eva=Variable eva is not available. ) at /usr/src/sys/amd64/amd64/trap.c:819 #4 0x80b18749 in trap_pfault (frame=0xff811aacf7d0, usermode=0) at /usr/src/sys/amd64/amd64/trap.c:735 #5 0x80b18c0f in trap (frame=0xff811aacf7d0) at /usr/src/sys/amd64/amd64/trap.c:474 #6 0x80b0313f in calltrap () at /usr/src/sys/amd64/amd64/exception.S:228 #7 0x81476306 in zfs_freebsd_remove (ap=Variable ap is not available. ) at /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c:1842 #8 0x80b7d694 in VOP_REMOVE_APV (vop=Variable vop is not available. ) at vnode_if.c:1333 #9 0x808cb4fd in kern_unlinkat (td=0xfe00046cb8c0, fd=-100, path=0x7fffdd73 Address 0x7fffdd73 out of bounds, pathseg=UIO_USERSPACE, oldinum=0) at vnode_if.h:575 #10 0x80b17cf0 in amd64_syscall (td=0xfe00046cb8c0, traced=0) at subr_syscall.c:131 #11 0x80b03427 in Xfast_syscall () at /usr/src/sys/amd64/amd64/exception.S:387 #12 0x0008009315fc in ?? () This particular system is a VM running on a VMWare ESXi hypervisor. So far I haven't had any luck in finding a cause. Ryan ___ 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[2]: 'rm' Can not delete files
Здравствуйте, Da. Вы писали 10 февраля 2012 г., 17:51:59: DR On 02/11/12 01:34, Henry Olyer wrote: So what do I change if I want to increase the shell's file limit? DR I don't think you can. It's not a shell limit. It's a limit to the DR number of arguments the command itself will take. As said, the shell DR expands '*' to a list of files as the argument, and rm is limited to the DR number of arguments it will parse. Mya be it would be better in program do not process options 'all at once'. but instead process them one by one: get next option, remove file, get next option, remove file for $i in (@options) do delete_file( $i ) I use bash 4. And by the way, for me, part of the normal installation of a new FBSD box is to make certain changes. For example, for uniq -c I use %06 instead of %d because this way I can sort the output. Things like that. I never learned a shell language. I suppose no one is as dumb as someone who choose's not to learn, so, what's the right one. csh?, because I do a lot of scientific work?, or should I be looking at another? DR There's not really much difference in this factor for shell types; as DR for changes you'd have to hack the command's (say rm) code. DR As mentioned, I'd use the find -delete combination. On Wed, Feb 8, 2012 at 10:25 PM, andrew clarkem...@ozzmosis.com wrote: On Tue 2012-02-07 23:17:16 UTC+, RW (rwmailli...@googlemail.com) wrote: On Tue, 07 Feb 2012 22:14:56 + Matthew Seaman wrote: ls -1 | xargs rm but be aware that that wont work for filenames with spaces. In addition, I don't believe it solves the OP's initial problem of the argument list being too long! You'd probably need to use the xargs -n switch here. The above will also try to 'rm' directories, which won't work. Instead I would use 'find': find . -type f -depth 1 -delete This will also work with filenames with spaces. Or the scenic route, using xargs, with one rm per file (slower): find . -type f -depth 1 -print0 | xargs -n1 -0 rm -f (The scenic route is useful if you want to do something else with the files instead of deleting them with rm.) Regards Andrew -- С уважением, Коньков mailto:kes-...@yandex.ru ___ 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: 'rm' Can not delete files
Matthew == Matthew Seaman m.sea...@infracaninophile.co.uk writes: Matthewfind . -type f -depth 1 -exec rm -f '{}' ';' Matthew but let's not leave people in any doubt that this is not the Matthew best option. However... find . -type f -depth 1 -exec rm -f {} + Might very well be a great option. Well, not for something that is also like -delete, but for other things that would have formerly required -print0 | xargs -0... this is apparently a fairly recent (and welcome!) modification to find. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.posterous.com/ for Smalltalk discussion ___ 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
Removal of content from the mailing list
Who should I talk to about removing a thread from the mailing list? ___ 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: Removal of content from the mailing list
On Fri, Feb 10, 2012 at 10:03:46AM +0800, yt wrote: Who should I talk to about removing a thread from the mailing list? As has been mentioned many times in the lists - it's a lost cause. These lists are archived, mirrored and otherwise duplicated hundreds or even thousands of times around the world. There is no way to get something removed from all of that - even if there was a procedure for getting it off the main list. jerry ___ 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: Removal of content from the mailing list
On 2/9/12, yt corvusborea...@gmail.com wrote: Who should I talk to about removing a thread from the mailing list? With the countless number of mirrors this list has, it's pretty much impossible. -Modulok- ___ 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
Wireless Problem
Hi, I'm struggling with my wireless cards couple days and I can't figure out what's wrong. Following I'm under FreeBSD 9.0 RELEASE and ever since I've used it I can't connect to any wireless network. I've got Atheros NIC and under every other OS it works fine, even earlier when I were under FreeBSD 7.2 it worked well, but now I got weird issues. I read a lot of it. I followed handbook with no success. I can connect to the network (no difference if it secured or not) i get IP from DHCP but I can't even ping my router. All drivers are loaded, my /etc/wpa_supplicant.conf is all right, I even add a line to the /etc/resolve.conf. I've reinstalled FreeBSD 9.0 and first thing I wanted to check was my wireless and unfortunately, it's the same, not working, same problem. Does the FreeBSD9.0 has any hidden firewall which block my ping ? My router is find. Firstly, I thought I was a bug then I bought another NIC with Realtek 8187 chipset and things look the same. Both cards can scan networks with results, and they seem to work proper so any ideas what can be wrong ? ___ 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: Wireless Problem
On Fri, Feb 10, 2012 at 1:58 PM, zaklinaczcipek128 zaklinaczcipek...@o2.plwrote: Hi, I'm struggling with my wireless cards couple days and I can't figure out what's wrong. Following I'm under FreeBSD 9.0 RELEASE and ever since I've used it I can't connect to any wireless network. I've got Atheros NIC and under every other OS it works fine, even earlier when I were under FreeBSD 7.2 it worked well, but now I got weird issues. I read a lot of it. I followed handbook with no success. I can connect to the network (no difference if it secured or not) i get IP from DHCP but I can't even ping my router. All drivers are loaded, my /etc/wpa_supplicant.conf is all right, I even add a line to the /etc/resolve.conf. I've reinstalled FreeBSD 9.0 and first thing I wanted to check was my wireless and unfortunately, it's the same, not working, same problem. Does the FreeBSD9.0 has any hidden firewall which block my ping ? My router is find. Firstly, I thought I was a bug then I bought another NIC with Realtek 8187 chipset and things look the same. Both cards can scan networks with results, and they seem to work proper so any ideas what can be wrong ? ___ 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 Hi, I think if you're getting IP from DHCP then it's a routing issue. ie, # netstat -r # route add default 192.168.0.1 -- Waitman Gobble San Jose California USA ___ 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: 'rm' Can not delete files
On Fri 2012-02-10 16:12:06 UTC+, Matthew Seaman (m.sea...@infracaninophile.co.uk) wrote: In addition, I don't believe it solves the OP's initial problem of the argument list being too long! You'd probably need to use the xargs -n switch here. Go and read the xargs(1) man page carefully. xargs is specifically designed to avoid arglist overflows. Ah, I grepped for 'limit' and 'overflow', didn't see anything applicable, and didn't notice the -s switch. That it avoids arglist overflows should perhaps be written more obviously in the man page (though I'm not sure how...) Or the scenic route, using xargs, with one rm per file (slower): find . -type f -depth 1 -print0 | xargs -n1 -0 rm -f (The scenic route is useful if you want to do something else with the files instead of deleting them with rm.) In this case, if you're going to call rm repeatedly with only one arg, then xargs is pretty pointless. You might as well do: find . -type f -depth 1 -exec rm -f '{}' ';' but let's not leave people in any doubt that this is not the best option. True, but I can never remember the syntax for -exec. :-) Regards Andrew ___ 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
ACK/NAK timeout
Hi, I have the following config: 1. DG43GT motherboard with 4GB memory 2. br10i SAS adapter 3. 16x Toshiba SAS drives connected to expander backplane. I am able to create a zfs pool ok without any errors but as soon as I do a scrub on that pool I get tons of scsi errors. Here is my dmesg output: http://pastebin.com/81AUsG6q (da3:mpt0:0:12:0): READ(6). CDB: 8 0 b2 f1 6f 0 (da3:mpt0:0:12:0): CAM status: SCSI Status Error (da3:mpt0:0:12:0): SCSI status: Check Condition (da3:mpt0:0:12:0): SCSI sense: ABORTED COMMAND asc:4b,3 (ACK/NAK timeout) I have a similar setup with desktop SATA drives and I see no issues. I have tried replacing motherboard and SAS adapter but no luck. I have already tried following in my loader.conf hw.pci.enable_msix=0 hw.pci.enable_msi=0 Any help would be appreciated. Thanks. ___ 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