off-line resizing?
The FAQ reads:
--cut: http://www.nilfs.org/en/faq.html --
5. Can I resize NILFS volumes ?
Yes, you can both enlarge and shrink NILFS volumes with nilfs-resize command. This feature is available on Linux 3.0 and later. Resizing for unmounted file systems are not supported at present.
For details, please see the man page of nilfs-resize(8).
--cut: http://www.nilfs.org/en/faq.html --
Unfortunately, I don't plan to switch my “production” hosts to Linux 3 yet. However, for the purposes I want to give NILFS a try I can assume that I can easily umount the volume whenever I need to resize it, to run whatever user-space code necessary.
Thus, I'm curious, are there any plans to implement “off-line” NILFS resizing?
TIA.
Signature · 6 lines
FSF associate member #7257 np. Дождь — ДДТ -- To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
SGksDQpPbiBXZWQsIDEzIEp1biAyMDEyIDIzOjA2OjU0ICswNzAwLCBJdmFuIFNobWFrb3Ygd3Jv dGU6DQo+IAlUaGUgRkFRIHJlYWRzOg0KPiANCj4gLS1jdXQ6IGh0dHA6Ly93d3cubmlsZnMub3Jn L2VuL2ZhcS5odG1sIC0tDQo+ICAgIDUuIENhbiBJIHJlc2l6ZSBOSUxGUyB2b2x1bWVzID8NCj4g DQo+ICAgICAgIFllcywgeW91IGNhbiBib3RoIGVubGFyZ2UgYW5kIHNocmluayBOSUxGUyB2b2x1 bWVzIHdpdGgNCj4gICAgICAgbmlsZnMtcmVzaXplIGNvbW1hbmQuICBUaGlzIGZlYXR1cmUgaXMg YXZhaWxhYmxlIG9uIExpbnV4IDMuMCBhbmQNCj4gICAgICAgbGF0ZXIuICBSZXNpemluZyBmb3Ig dW5tb3VudGVkIGZpbGUgc3lzdGVtcyBhcmUgbm90IHN1cHBvcnRlZCBhdA0KPiAgICAgICBwcmVz ZW50Lg0KPiANCj4gICAgICAgRm9yIGRldGFpbHMsIHBsZWFzZSBzZWUgdGhlIG1hbiBwYWdlIG9m IG5pbGZzLXJlc2l6ZSg4KS4NCj4gLS1jdXQ6IGh0dHA6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ptb2R1bGVzIHN1cHBvcnRpbmcgb25saW5lLXJlc2l6 aW5nIGFyZSBhdmFpbGFibGUgZnJvbToNCg0KICBodHRwOi8vd3d3Lm5pbGZzLm9yZy9lbi9wa2df Y2VudG9zLmh0bWwuDQoNCkZvciBvdGhlciBMaW51eCBkaXN0cm9zLCB0aGUgc3RhbmRhbG9uZSBr bW9kIG1heSBiZSBhcHBsaWNhYmxlIHdpdGggb3INCndpdGhvdXQgY3VzdG9taXppbmcgdGhlIHNv dXJjZSBjb2RlLiAgaXQgaGFzIGEgZ2x1ZSBjb2RlIHRvIHN1cHBvcnQNCm11bHRpcGxlIGtlcm5l bCB2ZXJzaW9ucy4gIEZvciByZWZlcmVuY2UsIHRoZSBzb3VyY2UgY29kZSBvZiB0aGUNCnN0YW5k YWxvbmUga21vZCBpcyBhdmFpbGFibGUgYXQ6DQoNCiAgZ2l0Oi8vZ2l0aHViLmNvbS9uaWxmcy1k ZXYvbmlsZnMyLWttb2QtY2VudG9zNi5naXQNCg0KDQoNCldpdGggcmVnYXJkcywNClJ5dXN1a2Ug S29uaXNoaQ0KDQo+IC0tIA0KPiBGU0YgYXNzb2NpYXRlIG1lbWJlciAjNzI1NwlucC4g0JTQvtC2 0LTRjCDigJQg0JTQlNCiDQo+IA0KPiAtLQ0KPiBUbyB1bnN1YnNjcmliZSBmcm9tIHRoaXMgbGlz dDogc2VuZCB0aGUgbGluZSAidW5zdWJzY3JpYmUgbGludXgtbmlsZnMiIGluDQo+IHRoZSBib2R5 IG9mIGEgbWVzc2FnZSB0byBtYWpvcmRvbW9Admdlci5rZXJuZWwub3JnDQo+IE1vcmUgbWFqb3Jk b21vIGluZm8gYXQgIGh0dHA6Ly92Z2VyLmtlcm5lbC5vcmcvbWFqb3Jkb21vLWluZm8uaHRtbA0K --
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Ryusuke Konishi writes:
On Wed, 13 Jun 2012 23:06:54 +0700, Ivan Shmakov wrote:
[…]
Quoted 8 lines
Quoted 7 lines
Unfortunately, I don't plan to switch my “production” hosts to Linux 3 yet. However, for the purposes I want to give NILFS a try I can assume that I can easily umount the volume whenever I need to resize it, to run whatever user-space code necessary.
Thus, I'm curious, are there any plans to implement “off-line” NILFS resizing?
Quoted 6 lines
Implementing Off-line resizing is a bit tough task because it requires a user space library to read internal meta data of the nilfs file system and append updated blocks to it. This is almost equivalent to implementing kernel functions of nilfs in user land.
So, we have no concrete schedule now.
ACK, thanks.
I wonder, how complicated this task would be? In particular, do I need to alter all the segments to resize filesystem, or only specific ones? Also, are these internal metadata records just “a bunch of C structs”, or something more complex?
[…]
Quoted 6 lines
For other Linux distros, the standalone kmod may be applicable with or without customizing the source code. it has a glue code to support multiple kernel versions. For reference, the source code of the standalone kmod is available at:
git://github.com/nilfs-dev/nilfs2-kmod-centos6.git
ACK, thanks.
Signature · 6 lines
FSF associate member #7257 -- To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · Ivan Shmakov
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Ryusuke Konishi writes:
On Wed, 13 Jun 2012 23:06:54 +0700, Ivan Shmakov wrote:Thus, I'm curious, are there any plans to implement “off-line” NILFS resizing?
Implementing Off-line resizing is a bit tough task because it requires a user space library to read internal meta data of the nilfs file system and append updated blocks to it. This is almost equivalent to implementing kernel functions of nilfs in user land.
Quoted 8 lines
Quoted 1 line
So, we have no concrete schedule now.
ACK, thanks.
I wonder, how complicated this task would be? In particular, do I need to alter all the segments to resize filesystem, or only specific ones? Also, are these internal metadata records just “a bunch of C structs”, or something more complex?
This needs at least the following tasks:
1) Update two super blocks to increase/decrease the number of total segments and the device size. (easy)
2) Update segment usage information to adjust free segment count of nilfs_sufile_header struct (sh_ncleansegs) which is written in the segment usage file. (Sadly not easy)
3) If truncating in-use segments, relocating blocks and updating disk address translation information are also needed. (very hard)
For reference, a discussion on this topic is found in the archives of the list:
http://marc.info/?t=128419843600003&r=1&w=2
Regards,
Ryusuke Konishi
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
user-level toolkit for off-line operations
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Ryusuke Konishi writes:
On Thu, 14 Jun 2012 11:22:17 +0700, Ivan Shmakov wrote:
Ryusuke Konishi writes:
[…]
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Implementing Off-line resizing is a bit tough task because it requires a user space library to read internal meta data of the nilfs file system and append updated blocks to it.
… I guess that a user-level toolkit akin to e2fsprogs would be handy anyway. (Shouldn't there be an fsck(8) for NILFS, BTW?)
Other than resizing, there could be a feature to “split” a filesystem — take one or more “snapshot” checkpoints and make a copy of the parts of the filesystem “reachable” from these checkpoints on a distinct block device (perhaps of a differing size), which seems like one more way to do backups.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
This is almost equivalent to implementing kernel functions of nilfs in user land.
[…]
Quoted 10 lines
Quoted 4 lines
I wonder, how complicated this task would be? In particular, do I need to alter all the segments to resize filesystem, or only specific ones? Also, are these internal metadata records just “a bunch of C structs”, or something more complex?
This needs at least the following tasks:
1) Update two super blocks to increase/decrease the number of total segments and the device size. (easy)
Quoted 6 lines
2) Update segment usage information to adjust free segment count of
nilfs_sufile_headerstruct (sh_ncleansegs) which is written in the segment usage file. (Sadly not easy)3) If truncating in-use segments, relocating blocks and updating disk address translation information are also needed. (very hard)
ACK. (Fortunately, I'm not that interested in shrinking filesystems right now.)
Quoted 4 lines
For reference, a discussion on this topic is found in the archives of the list:
ACK, thanks! I hope to take a closer look at this problem within two weeks or so.
(JFTR: those reading via Gmane may access the thread via either of [1, 2]; the first message in the thread is [3].)
[1] http://comments.gmane.org/gmane.comp.file-systems.nilfs.user/397
[2] http://thread.gmane.org/gmane.comp.file-systems.nilfs.user/397/focus=1686
[3] news:BAEFA5609CC3AB4BAE1625CAD4C27E5C02986E1D-qPLjlnsG5hmCmmEZ8mJCX7uPtZ6Ynr+y@public.gmane.orga.com
Signature · 6 lines
FSF associate member #7257 -- To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html