LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-10-2012, 07:41 PM   #1
devUnix
Member
 
Registered: Oct 2010
Posts: 606

Rep: Reputation: 59
Re-Sizing a File System / Partition


Hi!


If we re-size (by that I here mean reducing size not increasing) a File System / Partition using utilities, such as parted, then can the data on that partition be lost?

We can reduce the size of an LVM similarly. However, is there any likelihood that the data would not be available after re-sizing the partition?

Last edited by devUnix; 03-10-2012 at 08:01 PM.
 
Old 03-10-2012, 08:17 PM   #2
[GOD]Anck
Member
 
Registered: Dec 2003
Location: The Netherlands
Distribution: Slackware
Posts: 171

Rep: Reputation: 35
Quote:
Originally Posted by devUnix View Post
Hi!


If we re-size (by that I here mean reducing size not increasing) a File System / Partition using utilities, such as parted, then can the data on that partition be lost?

We can reduce the size of an LVM similarly. However, is there any likelihood that the data would not be available after re-sizing the partition?
There is always some risk involved, have backups! I'd say the safest way is to first shrink the filesystem (while it is not mounted) using whatever tool comes with it (resize2fs for ext*) to slightly less than the final intended size, then shrink the underlying device to the intended size, and then grow the filesystem to occupy all of said device.
 
Old 03-10-2012, 08:18 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
There is always the potential to lose data.
Read the documentation.

Generally things like [g]parted are safe, but depends on the filesystem. LVM is a real problem.
Best to resize the filesystem using native tools (if available) then the partition.

Best of all is decent backups.
 
Old 03-10-2012, 08:38 PM   #4
devUnix
Member
 
Registered: Oct 2010
Posts: 606

Original Poster
Rep: Reputation: 59
I have tried increasing the size of a partition / an LVM without any loss to the present data. But, well, this one I just tried using parted's resize command and ended up corrupting the partition and then eventually had to remove it permanently. Well, I am not in trouble. It's a local test VM whose backup I had taken before doing any R&D on it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Re-sizing an NTFS partition Entwicklung Linux - Newbie 12 06-16-2010 09:42 PM
Partition sizing on 3.5TB RAID file server Sheepdisease Debian 27 12-01-2009 07:03 PM
re-sizing existing partition on RHEL 4 khalil_noura Linux - Newbie 1 10-29-2008 02:28 AM
Re-sizing a partition.. ranjitcool Linux - Software 4 12-23-2006 06:11 PM
Partition sizing dummy Linux - Newbie 4 11-04-2002 08:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration