LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-06-2012, 12:20 AM   #1
Sum1
Member
 
Registered: Jul 2007
Distribution: Fedora, CentOS, and would like to get back to Gentoo
Posts: 332

Rep: Reputation: 30
Possible to do live repartition and software raid install -- no reboot?


Hello Group,

I have Slackware 13.37 server with 2 x 500 Gig hard drives (/dev/sda and /dev/sdb) running in RAID1 using mdadm software raid. I'm running out of space with my current partition configuration:

Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/root              99G   93G  4.5G  96% /
proc                     0     0     0   -  /proc
sysfs                    0     0     0   -  /sys
usbfs                    0     0     0   -  /proc/bus/usb
/dev/md2               60G   58G  1.5G  98% /mnt/arc_mon
/dev/md3               60G   58G  718M  99% /mnt/arc_tue
/dev/md4               60G   59G     0 100% /mnt/arc_wed
/dev/md5               60G   60G     0 100% /mnt/arc_thu
/dev/md6               60G   57G  2.2G  97% /mnt/arc_fri
/dev/md7               60G   57G  2.2G  97% /mnt/arc_sat
/dev/md8              3.0G   69M  2.9G   3% /mnt/arc_test
tmpfs                 2.0G     0  2.0G   0% /dev/shm
I want Swap and Root partition (/dev/md0 and /dev/md1) left as they are; but try the following without rebooting --

I want to use mdadm --remove to delete /dev/md2 through /dev/md8;
Then use fdisk to delete primary and logical partitions that correspond to /dev/md2 through /dev/md8;
Then create new partitions, build new RAID1 arrays, install EXT4 filesystem, mount, and populate with data.

Can I do this without rebooting or damaging the the root partition?
It is critical the server remains "up" and Samba server clients remain connected on the root filesystem.

All guidance, tips, or how-to's are greatly appreciated.
Thank you for your time and patience.

I've included the current hard drive partitions too:

Code:
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x97120150

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63     4112639     2056288+  fd  Linux raid autodetect
/dev/sda2   *     4112640   213841214   104864287+  fd  Linux raid autodetect
/dev/sda3       213841215   339694424    62926605   fd  Linux raid autodetect
/dev/sda4       339694425   976768064   318536820    5  Extended
/dev/sda5       339694488   465547634    62926573+  fd  Linux raid autodetect
/dev/sda6       465547698   591400844    62926573+  fd  Linux raid autodetect
/dev/sda7       591400908   717254054    62926573+  fd  Linux raid autodetect
/dev/sda8       717254118   843107264    62926573+  fd  Linux raid autodetect
/dev/sda9       843107328   968960474    62926573+  fd  Linux raid autodetect
/dev/sda10      968960538   975274019     3156741   fd  Linux raid autodetect

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd3e6af24

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63     4112639     2056288+  fd  Linux raid autodetect
/dev/sdb2   *     4112640   213841214   104864287+  fd  Linux raid autodetect
/dev/sdb3       213841215   339694424    62926605   fd  Linux raid autodetect
/dev/sdb4       339694425   976768064   318536820    5  Extended
/dev/sdb5       339694488   465547634    62926573+  fd  Linux raid autodetect
/dev/sdb6       465547698   591400844    62926573+  fd  Linux raid autodetect
/dev/sdb7       591400908   717254054    62926573+  fd  Linux raid autodetect
/dev/sdb8       717254118   843107264    62926573+  fd  Linux raid autodetect
/dev/sdb9       843107328   968960474    62926573+  fd  Linux raid autodetect
/dev/sdb10      968960538   975274019     3156741   fd  Linux raid autodetect
 
Old 07-06-2012, 10:30 AM   #2
Sum1
Member
 
Registered: Jul 2007
Distribution: Fedora, CentOS, and would like to get back to Gentoo
Posts: 332

Original Poster
Rep: Reputation: 30
Looks like a job for parted and partprobe.
Sorry for the extra forum static -- for some reason I didn't bump into these with my initial round of search terms and phrases.

Now, all I need is the courage to give it a try on a live production server. [shiver]
 
Old 07-12-2012, 06:11 AM   #3
Sum1
Member
 
Registered: Jul 2007
Distribution: Fedora, CentOS, and would like to get back to Gentoo
Posts: 332

Original Poster
Rep: Reputation: 30
I wanted to report back on the results.
In my case, after using fdisk to make partition changes, partprobe reported:

Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy). As a result, it may not reflect all of your changes until after reboot.

My root partition was unharmed and continued function normally; but, I couldn't use the newly created partitions and install filesystems until rebooting.
 
  


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
Software RAID 1 with multiple arrays: mounts not honoured after reboot Gerard Lally Slackware 4 02-19-2012 09:01 AM
mdadm software raid problem after every reboot agurkas Linux - General 3 08-04-2010 09:53 AM
software raid - device rearrangement after reboot when drives are disconnected rtspitz Linux - Hardware 5 07-08-2007 08:00 PM
Non-destructive RAID repartition (FC3) ice_hockey Linux - Hardware 1 08-05-2005 06:38 AM
Software raid 5 always missing 1 disk after reboot birkinshawc Linux - Hardware 0 05-20-2004 10:57 PM

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

All times are GMT -5. The time now is 07:57 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