-   Linux - General (
-   -   exporting the whole filesystem and putting it back on (

samopal 10-05-2012 07:57 PM

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...

TobiSGD 10-05-2012 08:01 PM

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

parted -l
launched as root.

samopal 10-05-2012 08:07 PM

here are the partitions:

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)

TobiSGD 10-05-2012 08:46 PM

Yes, that should work.

syg00 10-05-2012 09:47 PM

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.


samopal 10-06-2012 01:31 AM

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

All times are GMT -5. The time now is 02:53 AM.