LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-05-2012, 07:57 PM   #1
samopal
LQ Newbie
 
Registered: Aug 2007
Posts: 14

Rep: Reputation: 0
exporting the whole filesystem and putting it back on


Dear community,

I'm installing a new linux server and I've made a terrible mistake... wrong partitioning. Now my df -h output looks like this:
/dev/sda1 68G /
udev 16G /dev
tmpfs 6.3G /run
none 5.0M /run/lock
none 16G /run/shm
cgroup 16G /sys/fs/cgroup

which is unfortunate, because this OS is a hypervisor for VMs in virtualbox.
Is there a way to just back it up easily to for example NAS shared folder, make a new (single) partition and put everything back on? would it work if I just copy the files out, re-partition and copy them back in (using a live distro for example)

note: this is a 180GB ssd drive, I originally made 100gb available, but I will expand usable space to 130gb and want to use almost all of it for VMs...

Last edited by samopal; 10-05-2012 at 08:01 PM.
 
Old 10-05-2012, 08:01 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,517
Blog Entries: 2

Rep: Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018
Are you sure that you don't already have a single partition? None of your mounted file-systems besides /dev/sda1 is on a disk.
Please post the output of
Code:
parted -l
launched as root.
 
Old 10-05-2012, 08:07 PM   #3
samopal
LQ Newbie
 
Registered: Aug 2007
Posts: 14

Original Poster
Rep: Reputation: 0
here are the partitions:
Code:
Model: LSI RAID 5/6 SAS 6G (scsi)
Disk /dev/sda: 107GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  73.1GB  73.0GB  primary   ext4            boot
 2      73.1GB  107GB   34.3GB  extended
 5      73.1GB  107GB   34.3GB  logical   linux-swap(v1)
maybe if I grab partition1 with clonezilla, save it, wipe the whole sda and create a new partition and upload the image there, it will work correctly, right?
edit: my plan is to have 130gb and no swap, I have a plenty of RAM on that one (32gb, ~20gb will be used now)

Last edited by samopal; 10-05-2012 at 08:24 PM.
 
Old 10-05-2012, 08:46 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,517
Blog Entries: 2

Rep: Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018
Yes, that should work.
 
1 members found this post helpful.
Old 10-05-2012, 09:47 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,203

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
swapoff, delete sda5, then delete sda2.
Do your backup, use gparted liveCD to expand sda1 into the freed up space.
Fix bootloader and fstab in need.

Done.
 
1 members found this post helpful.
Old 10-06-2012, 01:31 AM   #6
samopal
LQ Newbie
 
Registered: Aug 2007
Posts: 14

Original Poster
Rep: Reputation: 0
Smile

well, I would need to expand raid logical volume as well.. but I'll manage now,
thank you for hints!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
exporting 'nodev' filesystem over nfs android_online Linux - Kernel 0 05-01-2007 10:14 PM
Exporting a filesystem sidra Linux - Networking 2 10-17-2006 08:49 PM
security keeps putting me back jamaas Mandriva 0 05-12-2004 09:40 AM
Putting a filesystem on an external USB Hard Drive Ryknow215 Linux - Hardware 7 01-17-2004 06:33 PM
exporting root filesystem via NFS jakiel Linux - Newbie 1 07-18-2003 03:32 AM


All times are GMT -5. The time now is 01:18 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration