LinuxQuestions.org
Help answer threads with 0 replies.
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 10-15-2007, 06:31 AM   #1
Clemente
Member
 
Registered: Aug 2003
Distribution: Debian, Ubuntu
Posts: 188

Rep: Reputation: 30
Is resize2fs safe?


Hi all,

what do you think about resize2fs? This tool can be used to resize a ext2/3 filesystem. I did not find any hint, that the use of resize2fs is risky in sense of data loss.

But I remember from my old windows time, that people always warned to make backups before resizing any partition.
I know that partition and filesystem are two seperate things. The partition is a raid 5 array and I want to add some devices with mdadm. After adding them, I think about resize2fs to get the filesystem using the larger partition.

Thank you for sharing your opinion,
Clemente
 
Old 10-15-2007, 08:12 AM   #2
Slick666
Member
 
Registered: Feb 2006
Distribution: Ubuntu 8.04; Debian Etch
Posts: 167

Rep: Reputation: 33
Check out

http://www.linuxquestions.org/linux/..._Recovery_Tips

I've always liked ReiserFS and have used it for a long time. It has known to have some issues with the file system recovery but in day to day operations I've NEVER had a problem. It's a Journaled file system and I have recovered from the occasional power failure (also known as tripping over the cord) without error. If your really worried about data security I would suggest you rely more on a good backup scheme rather than any particular file system.

Hope this helps
 
Old 10-15-2007, 08:44 AM   #3
Clemente
Member
 
Registered: Aug 2003
Distribution: Debian, Ubuntu
Posts: 188

Original Poster
Rep: Reputation: 30
Hi Slick,

thanks for your answer - in fact I often thought about ext3 vs reiser. And I never did get a real decision. ;-)

In this case, my worries are about filesystem stability, but the stability of the filesystems resizing program (resize2fs).

The situation is as following:
I have a server with a 1TB raid 5 device and a second 1TB raid 5 device for dayly backups.
Unfortunately these devices become too small, so I have to add some storage space. If possible, I would like to do it without creating a complete new filesystem (and all the work with copying the files, providing some temporarily space for these backups and so on).
Another reason for a "hot" resize is the fact, that the data growth on this server is not predictable. I don't want to do all the copy work every one or two months. ;-)
The guy that pays for all the hdd devices doesn't give me the hardware for a _really_ big device.

Linux software raid provides hot-adding and resizing a raid 5 device. And ext3 (as well as reiser) supports resizing the "living" filesystem. Both features allow hot-adding devices.

It is just, that I am worried about this filesystem resizing operation. I don't really want to risk a total data loss due to a risky resize program.

Greets,
Clemente
 
Old 10-15-2007, 10:34 AM   #4
Slick666
Member
 
Registered: Feb 2006
Distribution: Ubuntu 8.04; Debian Etch
Posts: 167

Rep: Reputation: 33
Sorry for reading your message so quickly. I think I understand the situation better. I operate an 840GB Raid5 with a networked off site backup and have happed on this once before.

What I would recommend before doing anything is buy two 500GB hds ($100 each) and a usb to IDE (or SATA) and making a static backup of the data before doing ANYTHING. You might be able to get away with the mirrored server but if this resizing takes any significant amount of time or trickery you run the risk of that raid going down with no redundancy. So for the money I would make a quick static backup.

In terms of expanding your raid I'm assuming you had a hardware Raid5 card with 1 logical drive (at 1 TB) and your replacing your drives with a larger set to increase your overall size. What I would do is keep the file system the same and add another partition. If the type of data your storing allows it. My raid has two primary partitions right now. I'm fortunate in that I store a lot of small files in many sub folders so when one directory got too big to fit all on one partition I moved one large sub-folder to the other partition and made a symbolic link back to the other drive. This approach might work for you as well depending on the type and size of the data files your storing.

The only time I've tried to expand a file system was using the parted libraries and that had a seg-fault at 700GB. (thank god for Backups ) so I would avoid the problem all together if possible.
 
Old 09-02-2008, 04:47 PM   #5
dadenn
LQ Newbie
 
Registered: May 2008
Posts: 1

Rep: Reputation: 0
Cool Is resize2fs safe?

Hi Clement,

The inherent danger in resizing a partition is generally with trying to make it smaller. When making it larger, it is much less dangerous. That being said, a full backup of the data before beginning your journey is HIGHLY advisable. Remember, 90% of all administrators that leave their jobs involuntarily do so because of irrevocable loss of data.

Daniel

Last edited by dadenn; 09-02-2008 at 04:48 PM.
 
Old 09-02-2008, 05:18 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Anybody that uses a tool like gparted to resize partitions uses something like resize2fs "under the covers" to also resize the filesystem. Gets done all the time without problem.
But it usually ain't done on terabytes of (the companys) data.

All the above advice seems sensible ... see my sigline.
 
  


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
How to resize /usr with resize2fs and LVM2 shadow5277 Red Hat 2 08-15-2005 01:20 AM
Is it safe ? Alex_jacobson Solaris / OpenSolaris 2 03-02-2005 01:24 PM
resize2fs nooch Red Hat 2 02-25-2005 09:42 PM
workaround for parted bug using fdisk and resize2fs carneros Linux - Newbie 2 10-05-2004 12:52 AM
working around PARTED bug 90894 using fdisk and resize2fs carneros Red Hat 0 07-29-2004 02:42 PM

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

All times are GMT -5. The time now is 10:54 PM.

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