What is the freebsd-swap partition.

Status
Not open for further replies.

Joe Goldthwaite

Dabbler
Joined
Jan 12, 2016
Messages
38
Hi,

I've been trying to figure out why my array seems to be one disk short on space. I understand the TB on the drive means 1,000,000,000,000 bytes and that at TB on the computer is 1,099,511,627,776 bytes. Even after adjusting for that, it still seems like I'm short.

I've got a FreeNas system with 12 3tb HGST NAS drives in a raid-z2 format. By my calculations that should give me 27.285 TB of space. I've got a single pool and the storage tab shows it as 24.4 TiB.

I did a "gpart show" trying to figure out how much actual space I was getting from each drive. I noticed that every drive on my system has a 2gb partition for "freebsd-swap". Here's drive ada10;

=> 34 5860533101 ada10 GPT (2.7T)
34 94 - free - (47k)
128 4194304 1 freebsd-swap (2.0G)
4194432 5856338696 2 freebsd-zfs (2.7T)
5860533128 7 - free - (3.5k)

I understand what a swap file is but I wouldn't think that freebsd would need or even use 2gb of swap space on each of the 12 hard drives on my system. I had FreeNAS build the pool and this was it's default partition layout. Is there are reason for it? Does freenas use that swapfile for anything? Just curious.

Joe Goldthwaite.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
It's not a swap "file". It's a swap partition. The swap partition is an encrypted, by default 2GB slice, taken from each disk in each vdev, which can be used by the system if RAM goes under duress. It almost never will, but, if it needs it, and swap is not there, serious panics can result.

As for your math, I get precisely what you have...****IF**** the pool is RAID-Z3, or you are missing one of the hard drives. Can I see the output to
Code:
zpool status -v
and
Code:
camcontrol devlist
?
 

Joe Goldthwaite

Dabbler
Joined
Jan 12, 2016
Messages
38
When I created the pool by selecting all 12 drives it kept trying to default to raidz3. I had to manually switch it back to raidz2. It was also telling me that my choice wasn't optimal but the link didn't explain why and I couldn't find anything in the documentation about it. The status shows it as a raidz2 but it does seem to be short on space. Maybe it's a bug in my version - FreeNAS-9.2.1.9-RELEASE-x64.

Here's what zpool status -v gives me;

Code:
# zpool status -v                                                                                                    

  pool: mediapool                                                                                                                 
state: ONLINE                                                                                                                    
  scan: scrub repaired 118G in 3h35m with 0 errors on Sat May 21 00:30:24 2016                                                    
config:                                                                                                                           
                                                                                                                                  
        NAME                                            STATE     READ WRITE CKSUM                                                
        mediapool                                       ONLINE       0     0     0                                                
          raidz2-0                                      ONLINE       0     0     0                                                
            gptid/7e6c4759-18c6-11e6-ab02-d05099c0e151  ONLINE       0     0     0                                                
            gptid/7ee42905-18c6-11e6-ab02-d05099c0e151  ONLINE       0     0     0                                                
            gptid/7f58f955-18c6-11e6-ab02-d05099c0e151  ONLINE       0     0     0                                                
            gptid/7fcca980-18c6-11e6-ab02-d05099c0e151  ONLINE       0     0     0                                                
            gptid/803c4308-18c6-11e6-ab02-d05099c0e151  ONLINE       0     0     0                                                
            gptid/80b426ce-18c6-11e6-ab02-d05099c0e151  ONLINE       0     0     0                                                
            gptid/812604ab-18c6-11e6-ab02-d05099c0e151  ONLINE       0     0     0                                                
            gptid/819c0843-18c6-11e6-ab02-d05099c0e151  ONLINE       0     0     0                                                
            gptid/821917e4-18c6-11e6-ab02-d05099c0e151  ONLINE       0     0     0                                                
            gptid/828a7a5a-18c6-11e6-ab02-d05099c0e151  ONLINE       0     0     0                                                
            gptid/82f80b47-18c6-11e6-ab02-d05099c0e151  ONLINE       0     0     0                                                
            gptid/836c36bb-18c6-11e6-ab02-d05099c0e151  ONLINE       0     0     0                                                
                                                                                                                                  
errors: No known data errors                                                                                                      
#


Here's the camcontrol output;
Code:
# camcontrol devlist
<HGST HDN724030ALE640 MJ8OA5E0> at scbus0 target 0 lun 0 (pass0,ada0)
<HGST HDN724030ALE640 MJ8OA5E0> at scbus1 target 0 lun 0 (pass1,ada1)
<HGST HDN724030ALE640 MJ8OA5E0> at scbus2 target 0 lun 0 (pass2,ada2)
<HGST HDN724030ALE640 MJ8OA5E0> at scbus3 target 0 lun 0 (pass3,ada3)
<HGST HDN724030ALE640 MJ8OA5E0> at scbus4 target 0 lun 0 (pass4,ada4)
<HGST HDN724030ALE640 MJ8OA5E0> at scbus5 target 0 lun 0 (pass5,ada5)
<Marvell Console 1.01> at scbus9 target 0 lun 0 (pass6)
<HGST HDN724030ALE640 MJ8OA5E0> at scbus10 target 0 lun 0 (pass7,ada6)
<HGST HDN724030ALE640 MJ8OA5E0> at scbus11 target 0 lun 0 (pass8,ada7)
<HGST HDN724030ALE640 MJ8OA5E0> at scbus12 target 0 lun 0 (pass9,ada8)
<HGST HDN724030ALE640 MJ8OA5E0> at scbus13 target 0 lun 0 (pass10,ada9)
<HGST HDN724030ALE640 MJ8OA5E0> at scbus14 target 0 lun 0 (pass11,ada10)
<HGST HDN724030ALE640 MJ8OA5E0> at scbus15 target 0 lun 0 (pass12,ada11)
<SanDisk Ultra Fit 1.00> at scbus17 target 0 lun 0 (pass13,da0)
#

 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Definitely looks like it's properly set up.

What does
Code:
zpool list
say?
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
my choice wasn't optimal but the link didn't explain why
Yes, I believe that message is about certain sweet spots that can theoretically occur when vdevs of particular types have a certain number of drives that are commensurate with some number modulo 4 or something. It can be safely ignored, I think it has nothing to do with space, only a small performance gain.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421

Joe Goldthwaite

Dabbler
Joined
Jan 12, 2016
Messages
38
zpool list says;
Code:
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
mediapool 32.5T 3.12T 29.4T 9% 1.00x ONLINE /mnt


zfs list;
Code:
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
mediapool 2.38T 22.0T 2.38T /mnt/mediapool
mediapool/.system 3.01M 22.0T 402K /mnt/mediapool/.system
mediapool/.system/cores 329K 22.0T 329K /mnt/mediapool/.system/cores
mediapool/.system/rrd-f6da24756e2f4dee86c3a9c9fb75829f 329K 22.0T 329K /mnt/mediapool/.system/rrd-f6da24756e2f4dee86c3a9c9f
b75829f
mediapool/.system/samba4 1.05M 22.0T 1.05M /mnt/mediapool/.system/samba4
mediapool/.system/syslog-f6da24756e2f4dee86c3a9c9fb75829f 941K 22.0T 941K /mnt/mediapool/.system/syslog-f6da24756e2f4dee86c3a9
c9fb75829f
#
 

Joe Goldthwaite

Dabbler
Joined
Jan 12, 2016
Messages
38
27TB does seem correct. https://jsfiddle.net/Biduleohm/paq5u7z5/1/embedded/result/

I highly doubt it's a bug. I'd be interested in zfs list and zpool list output.

Also why aren't you using the newest freenas?

That calculator is neat. It would have saved me a lot of time. 27TB is what I'm looking for but it looks like I've only got 24.4. "zpool list" shows the correct number for all the drives but "zfs list" looks like it's missing one.

I couldn't get FreeNAS 9.10 to install. 9.2 installed without a hitch. I was going to try and upgrade it but I haven't gotten to it yet.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
You need to post the output of those commands here using code tags. Also post gpart list output.
Edit: woops email didn't display your whole post.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
What is your full hardware specs? How are the disks connected and what controller.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
"zpool list" shows the correct number for all the drives but "zfs list" looks like it's missing one.
No sir, "zpool list" shows raw, pre-parity, sizes. I was more concerned if you had an "EXPANDSZ" field in there, which you do not. This is fun times. HEre's a bunch of very experienced FreeNAS guys, and something very obvious is obviously wrong with something generally easy, like "size of pool", and we're all floundering trying to figure this out.

Can we see
Code:
zfs get all mediapool
?
 

Joe Goldthwaite

Dabbler
Joined
Jan 12, 2016
Messages
38
This device is running the Asrock C2750D4i motherboard with 12 HGST 3TB drives plugged directly into the motherboard. It's got 16gb of RAM and is booting off of a 16gb Sandisk UltraFit USB drive.

Code:
% zpool get all mediapool
NAME  PROPERTY  VALUE  SOURCE
mediapool  size  32.5T  -
mediapool  capacity  10%  -
mediapool  altroot  /mnt  local
mediapool  health  ONLINE  -
mediapool  guid  809193974901911041  default
mediapool  version  -  default
mediapool  bootfs  -  default
mediapool  delegation  on  default
mediapool  autoreplace  off  default
mediapool  cachefile  /data/zfs/zpool.cache  local
mediapool  failmode  continue  local
mediapool  listsnapshots  off  default
mediapool  autoexpand  on  local
mediapool  dedupditto  0  default
mediapool  dedupratio  1.00x  -
mediapool  free  29.1T  -
mediapool  allocated  3.39T  -
mediapool  readonly  off  -
mediapool  comment  -  default
mediapool  expandsize  0  -
mediapool  freeing  0  default
mediapool  feature@async_destroy  enabled  local
mediapool  feature@empty_bpobj  active  local
mediapool  feature@lz4_compress  active  local
mediapool  feature@multi_vdev_crash_dump  enabled  local
mediapool  feature@spacemap_histogram  active  local
mediapool  feature@enabled_txg  active  local
mediapool  feature@hole_birth  active  local
mediapool  feature@extensible_dataset  enabled  local
mediapool  feature@bookmarks  enabled  local
%
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
This device is running the Asrock C2750D4i motherboard with 12 HGST 3TB drives plugged directly into the motherboard. It's got 16gb of RAM and is booting off of a 16gb Sandisk UltraFit USB drive.

Code:
% zpool get all mediapool
NAME  PROPERTY  VALUE  SOURCE
mediapool  size  32.5T  -
mediapool  capacity  10%  -
mediapool  altroot  /mnt  local
mediapool  health  ONLINE  -
mediapool  guid  809193974901911041  default
mediapool  version  -  default
mediapool  bootfs  -  default
mediapool  delegation  on  default
mediapool  autoreplace  off  default
mediapool  cachefile  /data/zfs/zpool.cache  local
mediapool  failmode  continue  local
mediapool  listsnapshots  off  default
mediapool  autoexpand  on  local
mediapool  dedupditto  0  default
mediapool  dedupratio  1.00x  -
mediapool  free  29.1T  -
mediapool  allocated  3.39T  -
mediapool  readonly  off  -
mediapool  comment  -  default
mediapool  expandsize  0  -
mediapool  freeing  0  default
mediapool  feature@async_destroy  enabled  local
mediapool  feature@empty_bpobj  active  local
mediapool  feature@lz4_compress  active  local
mediapool  feature@multi_vdev_crash_dump  enabled  local
mediapool  feature@spacemap_histogram  active  local
mediapool  feature@enabled_txg  active  local
mediapool  feature@hole_birth  active  local
mediapool  feature@extensible_dataset  enabled  local
mediapool  feature@bookmarks  enabled  local
%
Sir. **ZFS* get all. not zpool get all. If you please.
 

Joe Goldthwaite

Dabbler
Joined
Jan 12, 2016
Messages
38
Well, I decided that I'd try upgrading to 9.10 and then play around with building the pool. It's confusing. I built a raidz2-0 pool. When I was creating it, it was telling me I'd end up with 27tb. In looking at the storage size, it was showing 24tb. With all the different numbers showing up, it's hard to tell which one is correct.

The last thing I did was to check the file size through the network share. I've got a shared directory on the main mediapool directory called "media". When I check the size of the "media" share on the Mac by right clicking on it and selecting "get info", it shows the space as 26.3 TB. So even though the storage tab shows 24TB, I know there's actually at least 26.3. I'm not going to worry about it anymore.

Thanks for the help everyone. I really appreciate it.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
This device is running the Asrock C2750D4i motherboard with 12 HGST 3TB drives plugged directly into the motherboard. It's got 16gb of RAM and is booting off of a 16gb Sandisk UltraFit USB drive.

Code:
% zpool get all mediapool
NAME  PROPERTY  VALUE  SOURCE
mediapool  size  32.5T  -
mediapool  capacity  10%  -
mediapool  altroot  /mnt  local
mediapool  health  ONLINE  -
mediapool  guid  809193974901911041  default
mediapool  version  -  default
mediapool  bootfs  -  default
mediapool  delegation  on  default
mediapool  autoreplace  off  default
mediapool  cachefile  /data/zfs/zpool.cache  local
mediapool  failmode  continue  local
mediapool  listsnapshots  off  default
mediapool  autoexpand  on  local
mediapool  dedupditto  0  default
mediapool  dedupratio  1.00x  -
mediapool  free  29.1T  -
mediapool  allocated  3.39T  -
mediapool  readonly  off  -
mediapool  comment  -  default
mediapool  expandsize  0  -
mediapool  freeing  0  default
mediapool  feature@async_destroy  enabled  local
mediapool  feature@empty_bpobj  active  local
mediapool  feature@lz4_compress  active  local
mediapool  feature@multi_vdev_crash_dump  enabled  local
mediapool  feature@spacemap_histogram  active  local
mediapool  feature@enabled_txg  active  local
mediapool  feature@hole_birth  active  local
mediapool  feature@extensible_dataset  enabled  local
mediapool  feature@bookmarks  enabled  local
%
The 4 marvell se9230 ports will not work with freenas so you can just unplug those now.

If you build a pool of a smaller size does it work correctly?
 

Joe Goldthwaite

Dabbler
Joined
Jan 12, 2016
Messages
38
The 4 marvell se9230 ports will not work with freenas so you can just unplug those now.

My experience has been different. I've got two working NAS devices in addition to this one. The first one has 12x2tb drives. The 2nd one has 9x3tb drives. This new one has 12x3tb drives. I've been using the marvel ports with all of them and haven't run into any issues. Are people experiencing problems with the marvell chipset? I had to return the motherboard because two of the ports would stop working after some time. They were devices ada0 and ada1. I don't

If you build a pool of a smaller size does it work correctly?

Not really. I built one with 11 drives and it showed 22tb. I built another one with all 12 but using a raidz3 format and it also showed 22tb.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
My experience has been different. I've got two working NAS devices in addition to this one. The first one has 12x2tb drives. The 2nd one has 9x3tb drives. This new one has 12x3tb drives. I've been using the marvel ports with all of them and haven't run into any issues. Are people experiencing problems with the marvell chipset? I had to return the motherboard because two of the ports would stop working after some time. They were devices ada0 and ada1. I don't



Not really. I built one with 11 drives and it showed 22tb. I built another one with all 12 but using a raidz3 format and it also showed 22tb.
Lol try searching the forums for marvell. There are zero reports of them working, you are the first to mention this and yours will have timeout issues when you run a scrub or put it under load.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Lol try searching the forums for marvell. There are zero reports of them working, you are the first to mention this and yours will have timeout issues when you run a scrub or put it under load.
Not zero, but experiences are undeniably negative for most users of the four-port controllers. The two-port ones are sucky, but usable.
 

Joe Goldthwaite

Dabbler
Joined
Jan 12, 2016
Messages
38
Not zero, but experiences are undeniably negative for most users of the four-port controllers. The two-port ones are sucky, but usable.

Thanks for the tip guys. I did some searching on the forum and I found a firmware update from Asrock that's supposed to help with the Marvell controller issues. I guess I've been lucky since I haven't had any issues. I applied the patch so maybe that will help keep me lucky.

Does anyone have a suggestion for a PCI controller with 4 SATA ports.
 
Status
Not open for further replies.
Top