OpenIndina: resize an iSCSI LUN exported to Microsoft Windows 2008

Just as a reference for future needs. To resize a zvol exported as an iSCSI LUN to a Windows OS, you need to change the zvol size, then change the “iSCSI backend” the LUN changed size and then do a disk rescan on your Windows initiator. Commands are: zfs set volsize=1T tank/volume sbdadm modify-lu -s 1T Then on Windows, go to Server manager, choose Storage, right click on Disk management and select rescan....

July 21, 2013

ZFS bug in FreeBSD and FreeNAS

After a few weeks using FreeNAS 8.3.1, I noticed I could not create new volumes because the pool was out of space. The problem was that I should have had enough space, by a long shot. In fact, one of my “block” volumes was taking space more than twice it’s size. I had other volumes that seemed unaffected (or less affected), the only difference was that the problematic volume had volblocksize=8k set ....

July 15, 2013

Freenas 8.3 boot issues

I’ve just got my hands on a new server to store backups and archived files before being sent offsite, and it wouldn’t boot off my USB key. Even after many dd, dd with skip and FreeNAS installations, I was getting a “GPT table corrupt” message. Finally, the fix was easy enough: boot FreeNAS installation CD and choose Shell instead of Install type gpart show , it listed my device and that GPT table was corrupt type gpart destroy -F return to the menu choose Install when it’s finished, go back to the shell type gpart show again to check that it’s not corrupt anymore reboot enjoy your FreeNAS That’s it....

May 30, 2013

OpenIndiana : créer une target iSCSI

Encore quelques steps simples mais qu’on ne fait pas tous les jours: pkg install SUNWiscsit svcadm enable -r svc:/network/iscsi/target:default zfs create -V 10G tank/myiscsilun sbdadm create-lu /dev/zvol/rdsk/tank/myiscsilun itadm create-target -a none -n iqn.1986-03.com.sun:hostname-tank-myiscsilun -l hostname-tank-myiscsilun stmfadm offline-target iqn.1986-03.com.sun:hostname-tank-myiscsilun stmfadm create-hg myhostgroup stmfadm add-hg-member -g myhostgroup iqn.1991-05.com.microsoft:myhost stmfadm create-tg mytargetgroup stmfadm add-tg-member -g mytargetgroup iqn.1986-03.com.sun:hostname-tank-myiscsilun stmfadm online-target iqn.1986-03.com.sun:hostname-tank-myiscsilun stmfadm add-view -n 0 -t mytargetgroup -h myhostgroup <GUID from step 4> Et voilà....

March 4, 2012

OpenIndiana: convertir le root pool en mirror

Plutôt simple. Dans mon cas, j’ai deux disques: c2t0d0 et c2t2d0 . J’ai installé OpenIndiana sur c2t0d0 et je veux créer un mirror en y ajoutant c2t2d0 . créer une table de partition solaris sur le nouveau disque (vierge en principe): format > choisir c2t2d0 > fdisk > yes copier la table de partition de disque installé sur le nouveau disque: prtvtoc /dev/rdsk/c2t0d0s2 | fmthard -s - /dev/rdsk/c2t2d0s2 ajouter le nouveau disque au root pool (ça crée automatiquement un mirror, ce qu’on cherche): zpool attach -f rpool c2t0d0s0 c2t2d0s0 Attendre que la synchro se fasse (vérifier avec zpool status)....

January 8, 2012