- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- e2fsadm works fine from command line but fails whe...
Operating System - Linux
1822142
Members
3446
Online
109640
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2005 01:20 AM
тАО07-26-2005 01:20 AM
I'm running linux redhat E3 update 4. Kernel is 2.4.21. When I run /sbin/e2fsadm -L-5g /dev/vg00/backup from the command line it works great. But when I run this within a script I get:
/sbin/e2fsadm -L-5g /dev/vg00/backup
e2fsck 1.32 (09-Nov-2002)
e2fsck: need terminal for interactive repair
I've tried to use -n to skip the e2fsck but then I get 'must run e2fsck first'. If I add e2fsck before my e2fsadm command in the script, e2fsck runs fine but then e2fsadm still comes back with 'must run e2fsck first'. Ultimately, what I want to happen is that my /sbin/e2fsadm -L-5g /dev/vg00/backup runs fine within the script.
/sbin/e2fsadm -L-5g /dev/vg00/backup
e2fsck 1.32 (09-Nov-2002)
e2fsck: need terminal for interactive repair
I've tried to use -n to skip the e2fsck but then I get 'must run e2fsck first'. If I add e2fsck before my e2fsadm command in the script, e2fsck runs fine but then e2fsadm still comes back with 'must run e2fsck first'. Ultimately, what I want to happen is that my /sbin/e2fsadm -L-5g /dev/vg00/backup runs fine within the script.
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2005 01:46 AM
тАО07-26-2005 01:46 AM
Solution
From the man page:
-n Avoid the filesystem check before the resize operation. A filesystem check is mandatory before resize2fs(8), but is optional for ext2resize(8), and is not allowed for ext2online(8) because the filesystem is mounted.
By default, for mounted filesystems e2fsadm will look for resize2fs first, and failing that it will look for ext2resize. For mounted filesystems it will try to run ext2online.
So, maybe its trying to use resize2fs. You have the following options:
Use idependent commands to accomplish the task, e2fsck(8), lvextend(8), lvreduce(8), and resize2fs(8), ext2resize(8),ext2online(8).
Umount first the filesystem and remove the resize2fs command.
-n Avoid the filesystem check before the resize operation. A filesystem check is mandatory before resize2fs(8), but is optional for ext2resize(8), and is not allowed for ext2online(8) because the filesystem is mounted.
By default, for mounted filesystems e2fsadm will look for resize2fs first, and failing that it will look for ext2resize. For mounted filesystems it will try to run ext2online.
So, maybe its trying to use resize2fs. You have the following options:
Use idependent commands to accomplish the task, e2fsck(8), lvextend(8), lvreduce(8), and resize2fs(8), ext2resize(8),ext2online(8).
Umount first the filesystem and remove the resize2fs command.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2010 12:11 PM
тАО11-30-2010 12:11 PM
Re: e2fsadm works fine from command line but fails when in script
.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP