Re: 9.0 crash, ssd or filesystem problem?

2012-11-17 Thread Gary Aitken
On 11/16/12 21:38, Warren Block wrote:
 On Fri, 16 Nov 2012, Gary Aitken wrote:
 
 On 11/16/12 12:10, Warren Block wrote:

 Additional SSD suggestions: when creating partitions, leave out the swap
 partition.  If you have lots of memory, leave out the /tmp partition. Add
 that extra space to the /usr partition.

 Format the UFS filesystems with -Ut, for soft updates and TRIM support.
 (Make sure your SSD supports TRIM, almost all do.)  (I don't use soft
 updates journaling.)

 Use dd(1) to make a zero-filled file on /usr somewhere, say /usr/swap.
 Make it the size you want swap to be, and do not make it a sparse file.
 Tell the system to use the swapfile in /etc/rc.conf:

swapfile=/usr/swap

 Use tmpfs for /tmp in /etc/fstab:

tmpfs/tmptmpfsrw,mode=0177700

When using the above in /etc/fstab to establish a tmp file, 
how does the size of /tmp get established?
Is it limited only by the available swap,
or is it possible to put an upper bound on it that is smaller than swap?

e.g. if I built it manually:
  mdconfig -a -t swap -s 1g -u 1
  newfs -U /dev/md1
  mount /dev/md1 /tmp
  chmod 1777 /tmp

wouldn't it be limited to 1g of swap space?

Gary
___
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: 9.0 crash, ssd or filesystem problem?

2012-11-16 Thread Gary Aitken
On 11/15/12 15:56, Warren Block wrote:
 On Thu, 15 Nov 2012, Gary Aitken wrote:
 
 Trying to rebuild ports, I'm consistently getting the following:

  ahcich1 Timeout on slot 13 port 0
  ^ slot varies
  g_vfs_done() ada0p6 [WRITE(offset=38838571008 length=4096)]error=6
 
 That seems familiar, maybe others have reported it.  Is this a motherboard
 controller, or add-in?

mobo.  Asus M4A89TD PRO/USB3
specs say AMD SB850 controller

 After a backup, I'd make sure the motherboard and controller BIOS are up to 
 date.  And also the SSD firmware.

Thanks for the reminder, I see there is a new one.

 ~$ gpart show ada0
 =   34  250069613  ada0  GPT  (119G)
 34128 1  freebsd-boot  (64k)
162   41943040 2  freebsd-ufs  (20G)  /
   419432021048576 3  freebsd-swap  (512M)swap
   429917788388608 4  freebsd-ufs  (4.0G) /var
   513803864194304 5  freebsd-ufs  (2.0G) /tmp
   55574690  192216088 6  freebsd-ufs  (91G)  /usr
  2477907782278869- free -  (1.1G)
 
 It would not cause this problem, but those partitions are not aligned.
 That would only affect speed, not reliability.

geezes, it's not even on a 4K boundary from the get-go; 
not sure how that happened.
let-alone the 1M boundary I just learned about.

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


Re: 9.0 crash, ssd or filesystem problem?

2012-11-16 Thread Warren Block

On Fri, 16 Nov 2012, Gary Aitken wrote:


~$ gpart show ada0
=   34  250069613  ada0  GPT  (119G)
34128 1  freebsd-boot  (64k)
   162   41943040 2  freebsd-ufs  (20G)  /
  419432021048576 3  freebsd-swap  (512M)swap
  429917788388608 4  freebsd-ufs  (4.0G) /var
  513803864194304 5  freebsd-ufs  (2.0G) /tmp
  55574690  192216088 6  freebsd-ufs  (91G)  /usr
 2477907782278869- free -  (1.1G)


It would not cause this problem, but those partitions are not aligned.
That would only affect speed, not reliability.


geezes, it's not even on a 4K boundary from the get-go;
not sure how that happened.
let-alone the 1M boundary I just learned about.


That's a normal install.  It's fine for 512-byte devices.  I have other 
suggestions too, but let's save that until the problem is fixed.

___
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: 9.0 crash, ssd or filesystem problem?

2012-11-16 Thread Gary Aitken

 ~$ gpart show ada0
 =   34  250069613  ada0  GPT  (119G)
 34128 1  freebsd-boot  (64k)
162   41943040 2  freebsd-ufs  (20G)  /
   419432021048576 3  freebsd-swap  (512M)swap
   429917788388608 4  freebsd-ufs  (4.0G) /var
   513803864194304 5  freebsd-ufs  (2.0G) /tmp
   55574690  192216088 6  freebsd-ufs  (91G)  /usr
  2477907782278869- free -  (1.1G)

 It would not cause this problem, but those partitions are not aligned.
 That would only affect speed, not reliability.

 geezes, it's not even on a 4K boundary from the get-go;
 not sure how that happened.
 let-alone the 1M boundary I just learned about.
 
 That's a normal install.  It's fine for 512-byte devices. 
 I have other suggestions too, but let's save that until the problem is fixed.

aaahhh.  Vague recollections of getting this to boot up first time around.

How about suggestions anyway, as I'm going to build an sata disk and move
things to that as part of the process to see what's wrong.  May as well get
it right-ish the first time; then repartition the SSD.

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


Re: 9.0 crash, ssd or filesystem problem?

2012-11-16 Thread Warren Block

On Fri, 16 Nov 2012, Gary Aitken wrote:




~$ gpart show ada0
=   34  250069613  ada0  GPT  (119G)
34128 1  freebsd-boot  (64k)
   162   41943040 2  freebsd-ufs  (20G)  /
  419432021048576 3  freebsd-swap  (512M)swap
  429917788388608 4  freebsd-ufs  (4.0G) /var
  513803864194304 5  freebsd-ufs  (2.0G) /tmp
  55574690  192216088 6  freebsd-ufs  (91G)  /usr
 2477907782278869- free -  (1.1G)


It would not cause this problem, but those partitions are not aligned.
That would only affect speed, not reliability.


geezes, it's not even on a 4K boundary from the get-go;
not sure how that happened.
let-alone the 1M boundary I just learned about.


That's a normal install.  It's fine for 512-byte devices.
I have other suggestions too, but let's save that until the problem is fixed.


aaahhh.  Vague recollections of getting this to boot up first time around.

How about suggestions anyway, as I'm going to build an sata disk and move
things to that as part of the process to see what's wrong.  May as well get
it right-ish the first time; then repartition the SSD.


Okay.  The disk setup article shows alignment and using GPT labels, so 
I'll skip those.


Additional SSD suggestions: when creating partitions, leave out the swap 
partition.  If you have lots of memory, leave out the /tmp partition. 
Add that extra space to the /usr partition.


Format the UFS filesystems with -Ut, for soft updates and TRIM support. 
(Make sure your SSD supports TRIM, almost all do.)  (I don't use soft 
updates journaling.)


Use dd(1) to make a zero-filled file on /usr somewhere, say /usr/swap. 
Make it the size you want swap to be, and do not make it a sparse file. 
Tell the system to use the swapfile in /etc/rc.conf:


  swapfile=/usr/swap

Use tmpfs for /tmp in /etc/fstab:

  tmpfs /tmptmpfs   rw,mode=01777   0   0

It's possible to limit the size, but not necessary.  This /tmp will be 
cleared on reboot.



Now: why?

Using a swapfile through the filesystem gives three advantages:

1. Disk space is not tied up in an unused swap partition.
2. Swap can be resized without repartitioning.
3. Swap goes through the filesystem, using TRIM, helping the SSD
   maintain performance.

/tmp as tmpfs is auto-sizing, efficient, and self-clearing on reboot. 
It doesn't tie up disk space in a mostly-unused partition.


I use tmpfs for /usr/obj also.  It doesn't improve speed, but reduces 
writes to SSD and is also self-clearing.

___
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: 9.0 crash, ssd or filesystem problem?

2012-11-16 Thread Gary Aitken
On 11/16/12 12:10, Warren Block wrote:

 ~$ gpart show ada0
 =   34  250069613  ada0  GPT  (119G)
 34128 1  freebsd-boot  (64k)
162   41943040 2  freebsd-ufs  (20G)  /
   419432021048576 3  freebsd-swap  (512M)swap
   429917788388608 4  freebsd-ufs  (4.0G) /var
   513803864194304 5  freebsd-ufs  (2.0G) /tmp
   55574690  192216088 6  freebsd-ufs  (91G)  /usr
  2477907782278869- free -  (1.1G)

 It would not cause this problem, but those partitions are not aligned.
 That would only affect speed, not reliability.

 geezes, it's not even on a 4K boundary from the get-go;
 not sure how that happened.
 let-alone the 1M boundary I just learned about.

 That's a normal install.  It's fine for 512-byte devices.
 I have other suggestions too, but let's save that until the problem is 
 fixed.

 aaahhh.  Vague recollections of getting this to boot up first time around.

After upgrading the mobo bios I re-partitioned and so far so good
although ports are messed up and I'll have to rebuild them.
Did not implement the suggestions below as I needed to get back up and 
figured it would take me a while to get it right.  Will do that on the 
new disk.

 How about suggestions anyway, as I'm going to build an sata disk and move
 things to that as part of the process to see what's wrong.  May as well get
 it right-ish the first time; then repartition the SSD.
 
 Okay.  The disk setup article shows alignment and using GPT labels, so
 I'll skip those.
 
 Additional SSD suggestions: when creating partitions, leave out the swap
 partition.  If you have lots of memory, leave out the /tmp partition. Add
 that extra space to the /usr partition.
 
 Format the UFS filesystems with -Ut, for soft updates and TRIM support.
 (Make sure your SSD supports TRIM, almost all do.)  (I don't use soft
 updates journaling.)
 
 Use dd(1) to make a zero-filled file on /usr somewhere, say /usr/swap.
 Make it the size you want swap to be, and do not make it a sparse file.
 Tell the system to use the swapfile in /etc/rc.conf:
 
swapfile=/usr/swap
 
 Use tmpfs for /tmp in /etc/fstab:
 
tmpfs/tmptmpfsrw,mode=0177700
 
 It's possible to limit the size, but not necessary.  This /tmp will be
 cleared on reboot.

Not necessary because it is constrained by the swap file size?

 Now: why?
 
 Using a swapfile through the filesystem gives three advantages:
 
 1. Disk space is not tied up in an unused swap partition.
 2. Swap can be resized without repartitioning.
 3. Swap goes through the filesystem, using TRIM, helping the SSD
 maintain performance.
 
 /tmp as tmpfs is auto-sizing, efficient, and self-clearing on reboot.
 It doesn't tie up disk space in a mostly-unused partition.
 
 I use tmpfs for /usr/obj also.  It doesn't improve speed, but reduces
 writes to SSD and is also self-clearing.

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


Re: 9.0 crash, ssd or filesystem problem?

2012-11-16 Thread Warren Block

On Fri, 16 Nov 2012, Gary Aitken wrote:


On 11/16/12 12:10, Warren Block wrote:


Additional SSD suggestions: when creating partitions, leave out the swap
partition.  If you have lots of memory, leave out the /tmp partition. Add
that extra space to the /usr partition.

Format the UFS filesystems with -Ut, for soft updates and TRIM support.
(Make sure your SSD supports TRIM, almost all do.)  (I don't use soft
updates journaling.)

Use dd(1) to make a zero-filled file on /usr somewhere, say /usr/swap.
Make it the size you want swap to be, and do not make it a sparse file.
Tell the system to use the swapfile in /etc/rc.conf:

   swapfile=/usr/swap

Use tmpfs for /tmp in /etc/fstab:

   tmpfs/tmptmpfsrw,mode=0177700

It's possible to limit the size, but not necessary.  This /tmp will be
cleared on reboot.


Not necessary because it is constrained by the swap file size?


Yes, but also because /tmp usually doesn't need much space.  On this 
desktop system, du shows all of /tmp is only 52K.

___
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: 9.0 crash, ssd or filesystem problem?

2012-11-15 Thread Adam Vande More
On Thu, Nov 15, 2012 at 1:18 PM, Gary Aitken free...@dreamchaser.orgwrote:

 Error 6 is ENXIO, device not configured; not sure exactly what that means.

 This machine has:
   16G   mem
0.5G swap
2G   /tmp
4G   /var
 Is any of that likely to be related to the problem?

 Given an addr in the failure error:
   g_vfs_done() ada0p6 [WRITE(offset=38838571008 length=4096)]error=6
 how does one relate that addr to the partitioning scheme?

 ~$ gpart show ada0
 =   34  250069613  ada0  GPT  (119G)
  34128 1  freebsd-boot  (64k)
 162   41943040 2  freebsd-ufs  (20G)  /
419432021048576 3  freebsd-swap  (512M)swap
429917788388608 4  freebsd-ufs  (4.0G) /var
513803864194304 5  freebsd-ufs  (2.0G) /tmp
55574690  192216088 6  freebsd-ufs  (91G)  /usr
   2477907782278869- free -  (1.1G)

 Thanks for any insights,


Sounds like you have bad hardware.  Drive, cable, controller etc.  Probably
wouldn't hurt to do a fsck either.


-- 
Adam Vande More
___
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: 9.0 crash, ssd or filesystem problem?

2012-11-15 Thread Steve O'Hara-Smith
On Thu, 15 Nov 2012 13:30:43 -0600
Adam Vande More amvandem...@gmail.com wrote:

 Sounds like you have bad hardware.  Drive, cable, controller etc.
 Probably wouldn't hurt to do a fsck either.

*After* identifying and fixing the hardware problem, otherwise you
may make things worse.

-- 
Steve O'Hara-Smith at...@sohara.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: 9.0 crash, ssd or filesystem problem?

2012-11-15 Thread Warren Block

On Thu, 15 Nov 2012, Gary Aitken wrote:


Trying to rebuild ports, I'm consistently getting the following:

 ahcich1 Timeout on slot 13 port 0
 ^ slot varies
 g_vfs_done() ada0p6 [WRITE(offset=38838571008 length=4096)]error=6


That seems familiar, maybe others have reported it.  Is this a 
motherboard controller, or add-in?


After a backup, I'd make sure the motherboard and controller BIOS are up 
to date.  And also the SSD firmware.



~$ gpart show ada0
=   34  250069613  ada0  GPT  (119G)
34128 1  freebsd-boot  (64k)
   162   41943040 2  freebsd-ufs  (20G)  /
  419432021048576 3  freebsd-swap  (512M)swap
  429917788388608 4  freebsd-ufs  (4.0G) /var
  513803864194304 5  freebsd-ufs  (2.0G) /tmp
  55574690  192216088 6  freebsd-ufs  (91G)  /usr
 2477907782278869- free -  (1.1G)


It would not cause this problem, but those partitions are not aligned.
That would only affect speed, not reliability.
___
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