Re: mounted ext2 fs causes bad shutdown
On Tue, Feb 01, 2005 at 07:58:34AM -0600, Eric Kjeldergaard wrote: One of the many ways to do the same thing without the bugs could be: # extfs=$(mount | grep '^/.*(ext2fs,' | awk '{print $1}') Actually, better than that would be extfs=$(mount -t ext2fs | awk '{print $1;}') Or even just replace the whole thing with umount -a -t ext2fs While we're at it, isn't awk a bit of overkill? Seems that the following would do: extfs=$(mount -t ext2fs | cut -d ' ' -f1) How about save a few more bytes and do: extfs=`mount -text2fs|cut -d\ -f` But umount -a -text2fs is the shortest version since it doesn't even need a loop, it does everything in one command. Every cycle counts :p -- If I write a signature, my emails will appear more personalised. -- I sense much NT in you. NT leads to Bluescreen. Bluescreen leads to downtime. Downtime leads to suffering. NT is the path to the darkside. Powerful Unix is. Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: mounted ext2 fs causes bad shutdown
On Tue, Feb 01, 2005 at 07:53:42AM +0200, Giorgos Keramidas wrote: On 2005-02-01 05:16, Oliver Fuchs [EMAIL PROTECTED] wrote: On Mon, 31 Jan 2005, Loren M. Lang wrote: On a FreeBSD 5.3 system of mine that is dual boot with linux I have my linux home partition which is ext3fs mounted on freebsd. Anytime I reboot or halt freebsd while it is mounted, freebsd fails to sync all it's buffers. You first have to umount the linux partition. I have this uncommented in my /etc/rc.shutdown (I have it from the list): #extfs=`eval mount | grep ext2fs | awk '{print $1 }'` #for _elem in $extfs; do # echo -n Unmounting ext2/ext3 filesystems: # umount -a -t ext2fs # echo -n $_elem #done # #echo '.' #exit 0 What you have is not correct. A more correct approach would be to actually *USE* the _elem iterator in the loop, instead of just echoing it. There is also a bug lurking in there. The script prints the Unmounting message once for each unmounted filesystem. One of the many ways to do the same thing without the bugs could be: # extfs=$(mount | grep '^/.*(ext2fs,' | awk '{print $1}') Actually, better than that would be extfs=$(mount -t ext2fs | awk '{print $1;}') Or even just replace the whole thing with umount -a -t ext2fs # if [ -n ${extfs} ]; then # echo -n Unmounting ext2/ext3 filesystems: # for _elem in ${extfs} ;do # umount ${_elem} echo -n ${_elem} # done # echo '.' # fi # unset extfs ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] -- I sense much NT in you. NT leads to Bluescreen. Bluescreen leads to downtime. Downtime leads to suffering. NT is the path to the darkside. Powerful Unix is. Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: mounted ext2 fs causes bad shutdown
One of the many ways to do the same thing without the bugs could be: # extfs=$(mount | grep '^/.*(ext2fs,' | awk '{print $1}') Actually, better than that would be extfs=$(mount -t ext2fs | awk '{print $1;}') Or even just replace the whole thing with umount -a -t ext2fs While we're at it, isn't awk a bit of overkill? Seems that the following would do: extfs=$(mount -t ext2fs | cut -d ' ' -f1) Every cycle counts :p -- If I write a signature, my emails will appear more personalised. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: mounted ext2 fs causes bad shutdown
On Mon, 31 Jan 2005 03:04:32 -0800, Loren M. Lang [EMAIL PROTECTED] wrote: On a FreeBSD 5.3 system of mine that is dual boot with linux I have my linux home partition which is ext3fs mounted on freebsd. Anytime I reboot or halt freebsd while it is mounted, freebsd fails to sync all it's buffers. The first message Syncing disks, vnodes remaining, starts out at around 5 or 10 and descreases to 0, then the message Syncing disks, buffers remaining... starts at 7 and stays at 7 the whole time untill freebsd gives up and reboots or halts anyways. Whenever I first unmount the ext2fs, the vnodes remaining message comes up as usually, but the buffers remains never does and freebsd just reboots normally. I could modify the shutdown scripts to unmount the fs manually I suppose, but I'd like to solve the real problem. P.S. I'd love to debug this myself, but I'm not very familiar with the freebsd source code yet, and I'm not sure how to use a debugger on it yet. Any pointers would be appreciated. Well, there is a PR on this (I don't remember which, but I found it via a google search for the same problem with ext2fs. For lack of a better solution at the time, I put a umount in rc.shutdown. -- If I write a signature, my emails will appear more personalised. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: mounted ext2 fs causes bad shutdown
On Mon, 31 Jan 2005, Loren M. Lang wrote: On a FreeBSD 5.3 system of mine that is dual boot with linux I have my linux home partition which is ext3fs mounted on freebsd. Anytime I reboot or halt freebsd while it is mounted, freebsd fails to sync all it's buffers. The first message Syncing disks, vnodes remaining, starts out at around 5 or 10 and descreases to 0, then the message Syncing disks, buffers remaining... starts at 7 and stays at 7 the whole time untill freebsd gives up and reboots or halts anyways. Whenever I first unmount the ext2fs, the vnodes remaining message comes up as usually, but the buffers remains never does and freebsd just reboots normally. I could modify the shutdown scripts to unmount the fs manually I suppose, but I'd like to solve the real problem. You first have to umount the linux partition. I have this uncommented in my /etc/rc.shutdown (I have it from the list): # Insert other shutdown procedures here #extfs=`eval mount | grep ext2fs | awk '{print $1 }'` #for _elem in $extfs; do # echo -n Unmounting ext2/ext3 filesystems: # umount -a -t ext2fs # echo -n $_elem #done # #echo '.' #exit 0 Oliver -- ... don't touch the bang bang fruit ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: mounted ext2 fs causes bad shutdown
On 2005-02-01 05:16, Oliver Fuchs [EMAIL PROTECTED] wrote: On Mon, 31 Jan 2005, Loren M. Lang wrote: On a FreeBSD 5.3 system of mine that is dual boot with linux I have my linux home partition which is ext3fs mounted on freebsd. Anytime I reboot or halt freebsd while it is mounted, freebsd fails to sync all it's buffers. You first have to umount the linux partition. I have this uncommented in my /etc/rc.shutdown (I have it from the list): #extfs=`eval mount | grep ext2fs | awk '{print $1 }'` #for _elem in $extfs; do # echo -n Unmounting ext2/ext3 filesystems: # umount -a -t ext2fs # echo -n $_elem #done # #echo '.' #exit 0 What you have is not correct. A more correct approach would be to actually *USE* the _elem iterator in the loop, instead of just echoing it. There is also a bug lurking in there. The script prints the Unmounting message once for each unmounted filesystem. One of the many ways to do the same thing without the bugs could be: # extfs=$(mount | grep '^/.*(ext2fs,' | awk '{print $1}') # if [ -n ${extfs} ]; then # echo -n Unmounting ext2/ext3 filesystems: # for _elem in ${extfs} ;do # umount ${_elem} echo -n ${_elem} # done # echo '.' # fi # unset extfs ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]