roundrobinknowledge
Dabbler
- Joined
- Feb 13, 2017
- Messages
- 12
Hi, I am a long time reader first time poster. I made a BIG mistake on a FreeNAS setup. I used a USB flash drive for the (zil/slog) and now I need to remove it.
I followed this post to set it up in the terminal instead of using the web gui
https://forums.freenas.org/index.php?threads/how-to-add-an-slog.16766/
this is the instruction form the post I used
"
Here we go:
"
I read in some thread if you do this type of stuff the web gui won't know what you did so I am assuming I will have to remove the USB using the terminal
Here is the status of the pool
From what I understand but unsure of is using this command to fix it
if I use that command will it break my FreeNAS setup or destroy my pool?
I followed this post to set it up in the terminal instead of using the web gui
https://forums.freenas.org/index.php?threads/how-to-add-an-slog.16766/
this is the instruction form the post I used
"
Here we go:
- I had this SSD set up as a whole-disk separate log because that's the way the FreeNAS interface does things and this is my second installation. I needed to delete the existing partition first.
- First, I checked DMESG output to find the name of the SSD device:
less /var/run/dmesg.boot
. It turns out it was ada0 - Next, I checked the partitions/slices on the drive to see what was up.
gpart show ada0
- The display was confusing - the name of the device, a free section, then the freebsd-zfs partition, then another free bit. That formatted one was actually partition one, so
gpart delete -i1 ada0
removed it. What does i stand for? No idea. - <-- If you are installing a new, unformatted SSD, then everything above this line is stuff you didn't have to do. -->
- Now I needed to create the partition. I guessed at a size of 2 gigs, so I used this command:
gpart add -t freebsd-zfs -l slog -s 2G -b 1M ada0
. "slog" there is the name of the partition I'm creating. The 1M is an offset, so now the first 1M of the drive is free, then there's a 2G freebsd-zfs partition, then the rest of the drive is free. - From there, I needed to add it to the pool. The name of my pool is nas1mirror, so the command was
zpool add nas1mirror log /dev/gpt/slog
. nas1mirror and slog will probably differ for everyone else, because those are names I chose. Maybe you'll use tank and ZIL or something.
zpool status nas1mirror
showed the SLOG was up and running as part of the Zpool."
I read in some thread if you do this type of stuff the web gui won't know what you did so I am assuming I will have to remove the USB using the terminal
Here is the status of the pool
Code:
/mnt/freenas1# zpool status freenas1 pool: freenas1 state: ONLINE scan: scrub repaired 0 in 1h25m with 0 errors on Sun Feb 26 01:25:03 2017 config: NAME STATE READ WRITE CKSUM freenas1 ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 gptid/ba631a65-f9ce-11e5-aae3-a0369f3e7304 ONLINE 0 0 0 gptid/bb0eca1e-f9ce-11e5-aae3-a0369f3e7304 ONLINE 0 0 0 mirror-1 ONLINE 0 0 0 gptid/bbbc152e-f9ce-11e5-aae3-a0369f3e7304 ONLINE 0 0 0 gptid/bc6a0ea4-f9ce-11e5-aae3-a0369f3e7304 ONLINE 0 0 0 logs gpt/slog ONLINE 0 0 0 errors: No known data errors
From what I understand but unsure of is using this command to fix it
zpool remove freenas1 slog
if I use that command will it break my FreeNAS setup or destroy my pool?
Last edited by a moderator: