I just installed Amahi and so far I'm quite impressed. I was looking for some type of easy-to-manage home server software when I came across this.
The Fedora 12 DVD installed without a hitch however I think I made a fundamental mistake. I only created 2 partitions; / and a swap. I didn't think to create a partition for data. Plus, I've moved several gigs of data to the hda already.
I'm adding a second hard drive so I was looking at Greyhole for share pooling. The wiki warns against including the root partition in the share pool. But, that's the only one I have other than the swap.
So, my question is this, is it possible to shrink the root partition and create a new partition using the resulting free space? Can I then move the shares to the new partition without having to reload all the data over again? I've done this in Windows but I'm pretty green with Linux.
Thanks!
Resizing and creating partitions
Re: Resizing and creatng partitions
The wiki warns against using the root partition in greyhole because if it fills up you can have some weird errors occur. Outside of that, there's no really earth-shattering reason not to.
Of course the correct way to fix this is the path that you're taking, but another way is to simply monitor the drive usage, which is a good practice anyway. There's an abundance of basic scripts out there that can do this for you e.g.
http://www.cyberciti.biz/tips/shell-scr ... space.html
If I were you, I'd install the second drive and move all the existing data across to that. Then remove it while you work on your first drive. This way, if things go wrong you can simply re-install.
Are you running Amahi headless or with a desktop?
Of course the correct way to fix this is the path that you're taking, but another way is to simply monitor the drive usage, which is a good practice anyway. There's an abundance of basic scripts out there that can do this for you e.g.
http://www.cyberciti.biz/tips/shell-scr ... space.html
If I were you, I'd install the second drive and move all the existing data across to that. Then remove it while you work on your first drive. This way, if things go wrong you can simply re-install.
Are you running Amahi headless or with a desktop?
Re: Resizing and creatng partitions
Thanks for the reply. I was thinking of doing that but wasn't quite sure how to go about it with Amahi. Would I just change the share location through the control panel? Then resize the / partition and create a new partition in the resulting free space?
Yes, I'm running it headless.
Yes, I'm running it headless.
Re: Resizing and creatng partitions
I re-read the wiki for adding a second hard drive to Amahi and it made sense to me this time. So here's what I'm going to try. I'll use gparted live CD to shrink the / partition then create a new partition in the resulting free space. I should then be able to use the wiki guide to mount the new partition and move the shares over to it.
It seems like this should work but if it doesn't I'll just wipe it and reinstall. The data can be recovered. Either way I'll report the results.
It seems like this should work but if it doesn't I'll just wipe it and reinstall. The data can be recovered. Either way I'll report the results.
Re: Resizing and creatng partitions
Well no joy at all. Gparted couldn't resize the partition because it's LVM and not supported. So, short of wiping the whole thing and starting over I'm stuck with keeping / in the share pool.
It would really make sense to put some kind of mention in the Amahi installer instructions about creating a partition other than / for shares if one wants to use Greyhole.
Since all this (Amahi, Greyhole, etc.) is free I really have no right to complain about what is really a small issue in a very fine effort so please just consider this constructive criticism from a grateful novice.
Thanks!!
It would really make sense to put some kind of mention in the Amahi installer instructions about creating a partition other than / for shares if one wants to use Greyhole.
Since all this (Amahi, Greyhole, etc.) is free I really have no right to complain about what is really a small issue in a very fine effort so please just consider this constructive criticism from a grateful novice.
Thanks!!
Re: Resizing and creatng partitions
I figured it was LVM, I think the instructions need to specify not to use LVM, if anything.
Unless you want to do a full re-install, have a read around the following:
http://www.tldp.org/HOWTO/LVM-HOWTO/
paying particular attention to vgdisplay, lvdisplay and lvreduce. It's woefully outdated, but the concepts are the same.
/edit:
off the top of my head, and assuming the result of vgdisplay and lvdisplay has / relative to /dev/vg00/lvol1. In this example, the partition is 200G and you want to reduce it to 20G, first you want to boot up into system maintenance mode, or if you can get / unmounted while running (you can on some systems, I don't know about Fedora though):
# remove 180G from the LV
lvresize -L -180G /dev/vg00/lvol1
# run a fsck on it
e2fsck -f /dev/vg00/lvol1
# resize the FS to the LV size
resize2fs /dev/vg00/lvol1
Then it should be mountable, and you'd use lvcreate to create a new lvol in the freed up space.
Note that while enlarging an LV is quite robust and safe, reducing the size of one is nowhere near as solid. This may be a case of cut your losses and reinstall...
Unless you want to do a full re-install, have a read around the following:
http://www.tldp.org/HOWTO/LVM-HOWTO/
paying particular attention to vgdisplay, lvdisplay and lvreduce. It's woefully outdated, but the concepts are the same.
/edit:
off the top of my head, and assuming the result of vgdisplay and lvdisplay has / relative to /dev/vg00/lvol1. In this example, the partition is 200G and you want to reduce it to 20G, first you want to boot up into system maintenance mode, or if you can get / unmounted while running (you can on some systems, I don't know about Fedora though):
# remove 180G from the LV
lvresize -L -180G /dev/vg00/lvol1
# run a fsck on it
e2fsck -f /dev/vg00/lvol1
# resize the FS to the LV size
resize2fs /dev/vg00/lvol1
Then it should be mountable, and you'd use lvcreate to create a new lvol in the freed up space.
Note that while enlarging an LV is quite robust and safe, reducing the size of one is nowhere near as solid. This may be a case of cut your losses and reinstall...
Re: Resizing and creating partitions
uhm, that's not the correct sequence 
first unmount the filesystem (run "telinit 1" first to go to single user mode), if possible. If this doesn't work (it's the root partition after all) you'll need to boot with a linux live distro and modify the LV from there.
then
then
then
remount the partition (mount -a); run "telinit 3" to go to multi-user networking mode - you shouldn't get any errors.
reboot to check if the system survives a normal reboot and you're done. On large disks this process may take a lot of time. It might be "easier" to do a complete reinstall, but you have to know how to work the partitioner if you want to use LVM.

first unmount the filesystem (run "telinit 1" first to go to single user mode), if possible. If this doesn't work (it's the root partition after all) you'll need to boot with a linux live distro and modify the LV from there.
then
Code: Select all
fsck -f /dev/<volumegroup name>/<logicalvolume name>
Code: Select all
resize2fs /dev/<volumegroup name>/<logicalvolume name> <desired size; e.g. 50G>
Code: Select all
lvresize -L <desired size; must be exactly equal to or more as above value> /dev/<volumegroup name>/<logicalvolume name>
reboot to check if the system survives a normal reboot and you're done. On large disks this process may take a lot of time. It might be "easier" to do a complete reinstall, but you have to know how to work the partitioner if you want to use LVM.
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD
Re: Resizing and creating partitions
Cheers for the correction - as I said, it was off the top of my headuhm, that's not the correct sequence

Re: Resizing and creating partitions
I just went through that process just 1 day before
so it was quite fresh. Though it's no fun to resize a 1.4 TB LV to around 850GB 


echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD
Re: Resizing and creating partitions
Of cause you can resize partition and create partition.
Resize partition can be realized by the Partition Manager, it can work flawlessly. Fortunately, it is free for use.
I used to resize partition through it, really worded well.
Then, after resize partition, then you can create partition.
The webpage I linked can help you, go and see.
http://www.extend-partition.com/resourc ... drive.html
Resize partition can be realized by the Partition Manager, it can work flawlessly. Fortunately, it is free for use.
I used to resize partition through it, really worded well.
Then, after resize partition, then you can create partition.
The webpage I linked can help you, go and see.

http://www.extend-partition.com/resourc ... drive.html
Who is online
Users browsing this forum: No registered users and 21 guests