From: Gabriel <jarod125@gmail.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: [linux-lvm] fsadm unable to resize LV if newsize is not specified
Date: Tue, 22 Dec 2009 22:19:19 +0200 [thread overview]
Message-ID: <4cd59bf50912221219j6cd0588dp6a207b332f25b41@mail.gmail.com> (raw)
Hi,
I tried using fsadm to resize a fs that resides on a LV, but I get the
following error:
root@ubuntu:~# fsadm -n -v -l resize /dev/myvg/root
shift: 397: can't shift that many
I used both 2.02.56 and 2.02.57(1) (from CVS).
If I specify newsize, I don't get the error.
However, when I specify newsize, it still does not behave as I would
expect: although I used the -n option, the LV was actually extended:
root@ubuntu:~# fsadm -n -v -l resize /dev/myvg/root 799G
fsadm: "ext3" filesystem found on "/dev/mapper/myvg-root"
fsadm: Device "/dev/mapper/myvg-root" size is 785979015168 bytes
fsadm: Parsing tune2fs -l "/dev/mapper/myvg-root"
Finding volume group myvg
Executing: fsadm --verbose check /dev/myvg/root
fsadm: "ext3" filesystem found on "/dev/mapper/myvg-root"
fsadm: Executing fsck /dev/mapper/myvg-root
fsck from util-linux-ng 2.16
e2fsck 1.41.9 (22-Aug-2009)
root: clean, 1048711/47972352 files, 181942908/191889408 blocks
Archiving volume group "myvg" metadata (seqno 32).
Extending logical volume root to 799,00 GiB
Found volume group "myvg"
Found volume group "myvg"
Loading myvg-root table (252:1)
Suspending myvg-root (252:1) with device flush
Found volume group "myvg"
Resuming myvg-root (252:1)
Creating volume group backup "/etc/lvm/backup/myvg" (seqno 33).
Logical volume root successfully resized
Executing: fsadm --verbose resize /dev/myvg/root 837812224K
fsadm: "ext3" filesystem found on "/dev/mapper/myvg-root"
fsadm: Device "/dev/mapper/myvg-root" size is 857919717376 bytes
fsadm: Parsing tune2fs -l "/dev/mapper/myvg-root"
fsadm: Resizing filesystem on device "/dev/mapper/myvg-root" to
857919717376 bytes (191889408 -> 209453056 blocks of 4096 bytes)
fsadm: Executing resize2fs /dev/mapper/myvg-root 209453056
resize2fs 1.41.9 (22-Aug-2009)
Please run 'e2fsck -f /dev/mapper/myvg-root' first.
fsadm: Resize ext3 failed
fsadm failed: 1
The filesystem was not resized, but it probably would have been, if
the error above would not show up.
A minor nuisance is the fact that you must use an integer for the
newsize value. Specifying a floating point number returns this:
root@ubuntu:~# fsadm -n -v -l resize /dev/myvg/root 799.3G
fsadm: "ext3" filesystem found on "/dev/mapper/myvg-root"
fsadm: Device "/dev/mapper/myvg-root" size is 857919717376 bytes
fsadm: Parsing tune2fs -l "/dev/mapper/myvg-root"
/sbin/fsadm: 406: arithmetic expression: expecting EOF: " 799.3 * 1073741824 "
reply other threads:[~2009-12-22 20:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4cd59bf50912221219j6cd0588dp6a207b332f25b41@mail.gmail.com \
--to=jarod125@gmail.com \
--cc=linux-lvm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).