- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Whacked the /usr filesystem with inadvertant lvred...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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
тАО01-13-2010 01:38 PM
тАО01-13-2010 01:38 PM
Whacked the /usr filesystem with inadvertant lvreduce. Any way to recover?
LVM
Instead of
resize2fs
lvreduce
I ran the commands in the wrong order and reduced first. The OS gave me a chance to not do it, but I was in robot mode and did not listen.
Now I get I/O errors all over the place on /usr
Filesystem at /dev/vg00/lvol3 is mounted on /usr; on-line resizing required
On-line shrinking from 26214400 to 2621440 not supported.
The lvm command produce errors.
Is the system a lost cause or can I recover it?
How?
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-13-2010 01:46 PM
тАО01-13-2010 01:46 PM
Re: Whacked the /usr filesystem with inadvertant lvreduce. Any way to recover?
I have a backup of /usr available.
Thinking how to fix this without an OS reinstall.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-13-2010 10:13 PM
тАО01-13-2010 10:13 PM
Re: Whacked the /usr filesystem with inadvertant lvreduce. Any way to recover?
Do you have enough space to create one more partition?
Try to reboot and go in to the single user mode.
Create a new lv and mount it to /usr and restore your /usr backup.
Change the fstab to mount the new lv as /usr.
Reboot the server.
Manoj K
Manoj K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2010 01:37 AM
тАО01-14-2010 01:37 AM
Re: Whacked the /usr filesystem with inadvertant lvreduce. Any way to recover?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2010 02:26 AM
тАО01-14-2010 02:26 AM
Re: Whacked the /usr filesystem with inadvertant lvreduce. Any way to recover?
1) Installed via console a new OS to another partition, as you suggested, though before I looked back here.
2) Volume groups were sensed by the install. used vgcan next.
3) lvscan
4) mount the damaged /usr file system to verify the data was there.
5) umount the file system
6) e2fsck the file system
7) lvextend the logical volume back to hits original size.
8) mount it to check again.
9) umount (probably not necessary)
10) e2fsck again
11) resize2fs to desired size
12) lvreduce to same size
12) mount and check again.
13) fix /etc/fstab to remove the logical volume and file system I used to install the OS (It was mostly empty, one backup fs).
14) mounted /boot of the original install as /boot
15) mount /dev/sda1 /boot
16)grub-install --root-directory /boot /dev/sda
17) reboot and verify system functionality.
Lucky. No data lost.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2010 02:38 AM
тАО01-14-2010 02:38 AM
Re: Whacked the /usr filesystem with inadvertant lvreduce. Any way to recover?
16)grub-install --root-directory /boot /dev/sda
to
16)grub-install --root-directory / /dev/sda
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com