>>> On 1/25/2016 at 10:00 AM, Ram Jam <[email protected]> wrote: 
> New to the list. Extremely new to Linux and Z systems.
> 
> I need to expand the / filesystem on a server running SLES 11.3 (under z/VM 
> 6.3)
> 
> The server was built by my predecessor to the specifications outlined in the 
> Virtualization Cookbook for SLES 11.(/dev/dasda1 with 384 MB).
> / is rapidly approaching 100%
> Since / is not on LVM, how can I expand the / filesystem?
> I am thankful for any help or nudges in the right direction.

Others have set you on the path to resolving your current situation.  As you 
noticed, however, upgrading to SLES12 could be a much bigger problem with a 
relatively small root file system.  Partly this is due to grub2 now being used, 
which puts a fair amount of "stuff" under /boot/grub2.

The easiest way around this is to move to a different, larger, piece of disk 
for your root file system.
1. Allocate a new minidisk to the guest.
2. Bring it online to the system using chccwdev -e.
3. Run dasdfmt on it
4. Run fdasd on it
5. Run mkfs on it
6. Mount the file system, perhaps on /mnt
7. Change to /mnt (cd /mnt)
8. Use rsync to copy the root file system to this mountpoint
8a. rsync -lPprvtaxS / .
     You can leave the "v" off it you don't like watching the files fly by on 
your terminal.

At this point you have an exact copy of your root file system, EXCEPT for the 
fact that the pointers to the kernel, initrd, and parms have been written to it 
yet.  Before you do that, check things like /etc/zipl.conf and /etc/fstab to 
make sure that you have entries in them like /dev/disk/by-path and NOT 
/dev/dasda1, /dev/dasdb1, etc.  If you do, change them 
_to_the_virtual_device_number_of_your_existing_root_file_system.  NOT the 
current virtual device number it's has.  The reason for this is, you're going 
to have the z/VM systems programmer change the virtual device numbers so that 
your new minidisk will be the same as your current one, and the current one 
will be changed to something else until you're sure you can get rid of it.

You don't have /boot as a separate file system, so to continue:
9. Bind mount /dev, /proc, and /sys on /mnt:
9a. for fs in dev proc sys; do mount --bind /$fs /mnt/$fs; done
10. Chroot to /mnt
11. Run zipl
12. Make sure it finishes successfully.
13. Exit from the chroot
14. Unmount the file systems
14a. for fs in dev proc sys; do umount /mnt/$fs; done
15. Unmount the new root: umount /mnt
16. Shut down the guest: shutdown -h now
17. Logoff the guest
18. Have your z/VM systems programmer switch the virtual devices numbers for 
the old and new root file systems
19. Boot your system from the same virtual device number as before.

When you come up, you should have your larger file system in place.  Once 
you're satisfied that things look OK, you can detach the old minidisk and have 
the z/VM systems programmer remove it from the CP directory.

Disclaimer: I just typed this off the top of my head.  I haven't actually done 
it in quite a while, but I believe it should work as desired.  It's 
non-destructive so you can always go back to your previous setup.


Mark Post

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to