[DRBD-user] Shrinking Filesystem
CA Lists
lists at creativeanvil.com
Fri Jun 22 18:32:51 CEST 2007
> On Fri, Jun 22, 2007 at 09:24:09AM -0500, CA Lists wrote:
>> I have two iSCSI targets that I have drbd 8.0.3 running on (CentOS 5). I'm
>> using OCFS2 on my nodes. My question is, which filesystem do I need to
>> shrink for DRBD? Do I want to shrink the iSCSI disk on the nodes
>> (/dev/sdb1), the actual block device on both iSCSI targets (/dev/sdb), or
>> the drbd device on the iSCSI targets (/dev/drbd0)? And can I do this after I
>> have used OCFS2 to format the disk? Thanks,
>
>
> ===== situation without drbd: =====
>
> |- ~/.../~ - /dev/some/storage -- ~/.../~ -----------------------------|
>
> ===== situation with drbd, and external drbd metadata: =====
>
> completely transparent wrt. /dev/some/storage,
> no need to change anything. you just have to have some other block
> device available for drbd meta data.
>
>
> |- ~/.../~ - /dev/drbd0 -- ~/.../~ -----------------------------|
> |- ~/.../~ - /dev/some/storage -- ~/.../~ -----------------------------|
>
> |- drbd-md: /dev/other/storage -|
>
>
> ===== situation with drbd, and internal drbd meta data: =====
>
> |- ~/.../~ - /dev/drbd0 -- ~/.../~ -------|- drbd-md: INTERNAL -|
> |- ~/.../~ - /dev/some/storage -- ~/.../~ -----------------------------|
> |.....................|
> these are the last
> blocks of your
> /dev/some/storage
> so if you had
> any useful
> data here,
> make sure you move
> it away before you
> overwrite this area
> with drbd meta data
>
> depending on what has been there (file system, partition, lv),
> there are different means to do so.
There was nothing on the drives at all. In a chicken-before-egg type of
situation, since I don't have /dev/sdb mounted anywhere on the iSCSI
targets, I thought I would need to get OCFS2 up and running on one of the
nodes and format the drive to be able to do anything with it. Then, I found
out ocfs2 provides no way to shrink a filesystem.
I found this and am trying to follow it:
http://www.gossamer-threads.com/lists/drbd/users/9161
I have no way to get the "Block count" and "Block size" via tune2fs since
it's ocfs2 not ext2/ext3. However, is the value from "df" useful at all?
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb1 975699648 1224960 974474688 1% /data
Cat /proc/partitions | grep 'drbd0' shows
147 0 975670156 drbd0
So, /proc/partitions shows a number that is 29492 smaller, which means bad
things, right? In other words, I need to probably re-make the ocfs2 file
system to be smaller, correct?
Thanks for the help.
>
>
> hth.
>
More information about the drbd-user
mailing list