Changes for page ZFS Administration - Appendix B - Using USB Drives
Last modified by Drunk Monkey on 2024-09-01 11:33
From version
1.5


edited by Drunk Monkey
on 2024-09-01 11:32
on 2024-09-01 11:32
Change comment:
There is no comment for this version
To version
2.1

edited by Drunk Monkey
on 2024-09-01 11:33
on 2024-09-01 11:33
Change comment:
There is no comment for this version
Summary
Details
- Page properties
-
- Content
-
... ... @@ -10,7 +10,9 @@ 10 10 11 11 Lastly, the L2ARC //should// be read intensive. However, it can also be write intensive if you don't have enough room in your ARC and L2ARC to store all the requested data. If this is the case, you'll be constantly writing to your L2ARC. For USB drives without wear leveling algorithms, you'll chew through the drive quickly, and it will be dead in no time. If this is your case, you could store only metadata, rather than the actual data block pages in the L2ARC. You can do this with the following: 12 12 13 -{{{# zfs set secondarycache=metadata pool}}} 13 +{{code language="bash session"}} 14 +# zfs set secondarycache=metadata pool 15 +{{/code}} 14 14 15 15 You can set this pool-wide, or per dataset. In the case outlined above, I would certainly do it pool-wide, which each dataset will inherit by default. 16 16 ... ... @@ -18,7 +18,8 @@ 18 18 19 19 To this up, it's rather straight forward. Just identify what the drives are, by using their unique identifiers, then add them to the pool: 20 20 21 -{{{# ls /dev/disk/by-id/usb-* | grep -v part 23 +{{code language="bash session"}} 24 +# ls /dev/disk/by-id/usb-* | grep -v part 22 22 /dev/disk/by-id/usb-Kingston_DataTraveler_G3_0014780D8CEBEBC145E80163-0:0@ 23 23 /dev/disk/by-id/usb-Kingston_DataTraveler_SE9_00187D0F567FEC2090007621-0:0@ 24 24 /dev/disk/by-id/usb-Kingston_DataTraveler_SE9_00248121ABD5EC2070002E70-0:0@ ... ... @@ -26,21 +26,24 @@ 26 26 /dev/disk/by-id/usb-_USB_DISK_Pro_070B2605FA99D033-0:0@ 27 27 /dev/disk/by-id/usb-_USB_DISK_Pro_070B2607A029C562-0:0@ 28 28 /dev/disk/by-id/usb-_USB_DISK_Pro_070B2608976BFD58-0:0@ 29 -}} }32 +{{/code}} 30 30 31 31 So, there are my seven drives that I outlined at the beginning of the post. So, to add them to the system as L2ARC drives, just run the following command: 32 32 33 -{{{# zpool add -f pool cache usb-Kingston_DataTraveler_G3_0014780D8CEBEBC145E80163-0:0\ 36 +{{code language="bash session"}} 37 +# zpool add -f pool cache usb-Kingston_DataTraveler_G3_0014780D8CEBEBC145E80163-0:0\ 34 34 usb-Kingston_DataTraveler_SE9_00187D0F567FEC2090007621-0:0\ 35 35 usb-Kingston_DataTraveler_SE9_00248121ABD5EC2070002E70-0:0\ 36 36 usb-Kingston_DataTraveler_SE9_00D0C9CE66A2EC2070002F04-0:0\ 37 37 usb-_USB_DISK_Pro_070B2605FA99D033-0:0\ 38 38 usb-_USB_DISK_Pro_070B2607A029C562-0:0\ 39 -usb-_USB_DISK_Pro_070B2608976BFD58-0:0}}} 43 +usb-_USB_DISK_Pro_070B2608976BFD58-0:0 44 +{{/code}} 40 40 41 41 Of course, these are the unique identifiers for my USB drives. Change them as necessary for your drives. Now that they are installed, are they filling up? 42 42 43 -{{{# zpool iostat -v 48 +{{code language="bash session"}} 49 +# zpool iostat -v 44 44 pool alloc free read write read write 45 45 ------------------------------------------------------------ ----- ----- ----- ----- ----- ----- 46 46 pool 695G 1.13T 21 59 53.6K 457K ... ... @@ -64,7 +64,8 @@ 64 64 usb-_USB_DISK_Pro_070B2605FA99D033-0:0 1.08G 6.36G 0 0 1.18K 67.0K 65 65 usb-_USB_DISK_Pro_070B2607A029C562-0:0 1.76G 5.68G 0 1 2.48K 109K 66 66 usb-_USB_DISK_Pro_070B2608976BFD58-0:0 1.20G 6.24G 0 0 530 38.8K 67 ------------------------------------------------------------- ----- ----- ----- ----- ----- -----}}} 73 +------------------------------------------------------------ ----- ----- ----- ----- ----- ----- 74 +{{/code}} 68 68 69 69 Something important to understand here, is the drives do not need to be all the same size. You can mix and match as you have on hand. Of course, the more space you can give to the cache, the better off you'll be. 70 70