Can I shrink current ZPOOL to fit on a smaller drive via dd?

Status
Not open for further replies.
Joined
Jun 21, 2016
Messages
7
Here is my situation. I am running a FreeNAS setup on a system that uses a proprietary data cartridge that consists of (x4) 1TB SSDs. I am using ZFS and RAID0 for the drives. This gives me more than enough storeage for the files I am keeping (roughly 2.8TB). I am not really concern with redundancy as I have another system running as a backup. This is not my design, it is something that my company has implemented and I am being tasked with dealing with it.

The issue I have run across is that the vendor of the data cartridges recently updated/changed drive models inside of the cartridge. The old drive is about 110,838,016 bytes larger as compared with the newer drives. So when I use "dd if=/dev/sdc of=/dev/sdg bs=512", it gives me an error at the end saying that there was not enough free space on the destination to copy. Since I am only using up 2.8TB of data on a ZPOOL with roughly 3.8TB of available space, can I adjust the size of the larger partition without loosing data? This would allow me to copy data like I need to from the larger drive to the small one.

Any help would be appreciated as I am VERY new to FreeNAS, ZPOOLs and ZFS. Thanks in advance.

- Jeremy G.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
No, there are no workarounds. But if you use a second pool, you can replicate to it, making for an easier process.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
I'm confused why you are trying to replace a working cartridge (what is that anyway) with a small version. And if you have a backup, just replicate from that to the new cartridge.
 

Magius

Explorer
Joined
Sep 29, 2016
Messages
70
I know this guy's pain all too well. For density, lock-in, and other reasons a lot of vendors are moving towards cartridges/magazines with proprietary interfaces containing 4-12 (or whatever) otherwise standard drives inside. So instead of something like a 24-bay hot swap chassis with plastic sleds that you screw to whatever bare drives, it might be a chassis that accepts 2 or 4 proprietary magazines, and each magazine is just a custom-shaped metal shell around ordinary 2.5" drives, often with a proprietary connector on the back. Once you're bought in, the only way to switch is to forklift upgrade and kiss your investment in media goodbye, but they have whole pitches on why this is "better" for you: Higher density, more rugged, easier to carry 2 magazines off a flight line or ship than 12 or more hard drives, etc.

In any case, if you put all that aside, what he's getting bitten by is the vendor's change from one drive model to another inside the cartridge. Presumably they did this without changing the part number of the cartridge itself, and poor Jeremy is stuck trying to make it work. :) We all know that's a huge no-no (look at the Kingston RAM debacle) but since this sounds like a business situation, at least in my industry, you would generally prevent this from happening by levying language in the PO or an attached SOW.

Unfortunately, the question about shrinking has been answered as well as it can be, as have the options for copying, so I can't add anything on that front. Good luck!
 

styno

Patron
Joined
Apr 11, 2016
Messages
466
Don't use dd or cp for this, just create a new pool on the new devices and use zfs send to replicate to the new pool.

If needed you can export/import the new pool afterwards and have it renamed to the original pool name.
 
Joined
Jun 21, 2016
Messages
7
I know this guy's pain all too well. For density, lock-in, and other reasons a lot of vendors are moving towards cartridges/magazines with proprietary interfaces containing 4-12 (or whatever) otherwise standard drives inside. So instead of something like a 24-bay hot swap chassis with plastic sleds that you screw to whatever bare drives, it might be a chassis that accepts 2 or 4 proprietary magazines, and each magazine is just a custom-shaped metal shell around ordinary 2.5" drives, often with a proprietary connector on the back. Once you're bought in, the only way to switch is to forklift upgrade and kiss your investment in media goodbye, but they have whole pitches on why this is "better" for you: Higher density, more rugged, easier to carry 2 magazines off a flight line or ship than 12 or more hard drives, etc.

In any case, if you put all that aside, what he's getting bitten by is the vendor's change from one drive model to another inside the cartridge. Presumably they did this without changing the part number of the cartridge itself, and poor Jeremy is stuck trying to make it work. :) We all know that's a huge no-no (look at the Kingston RAM debacle) but since this sounds like a business situation, at least in my industry, you would generally prevent this from happening by levying language in the PO or an attached SOW.

Unfortunately, the question about shrinking has been answered as well as it can be, as have the options for copying, so I can't add anything on that front. Good luck!

That is pretty much the deal I am having to work with. :mad:
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
Status
Not open for further replies.
Top