Extending the / file system (SVM)


 
Thread Tools Search this Thread
Operating Systems Solaris Extending the / file system (SVM)
# 1  
Old 10-09-2014
Extending the / file system (SVM)

Hi,

I currently have a Solaris 10 server with the / root file system using SVM. Here is the information of the current setup.

Code:
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d0         3.0G   635M   2.3G    22%    /
 
bash-3.2# metastat d0
d0: Mirror
    Submirror 0: d10
      State: Okay         
    Submirror 1: d20
      State: Okay         
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 6309120 blocks (3.0 GB)
d10: Submirror of d0
    State: Okay         
    Size: 6309120 blocks (3.0 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c0t0d0s0          0     No            Okay   Yes 
 
d20: Submirror of d0
    State: Okay         
    Size: 6309120 blocks (3.0 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c0t1d0s0          0     No            Okay   Yes 
 
Device Relocation Information:
Device   Reloc  Device ID
c0t0d0   Yes    id1,sd@n5000c50012e2ffef
c0t1d0   Yes    id1,sd@n5000c50012e304df

In order to expand the / root file system, I think I'll have to create another mirror set (d7) using another pair of slices (c0t0d0s7, c0t01d0s7). I have read several cases that growfs cannot grow the mounted / file system??

Code:
metainit d71 1 1 c0t0d0s7
metainit d72 1 1 c0t1d0s7
metainit d7 -m d71
metattach d7 d72
newfs /dev/md/rdsk/d7

Mount and copy contents

Code:
mount /dev/md/dsk/d7 /mnt
ufsdump -0uf - / | (cd /mnt/ && ufsrestore -f - )
umount /mnt


Install bootblock

Code:
installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/md/rdsk/d7

Update the vfstab and system

Code:
cp /etc/vfstab /etc/vfstab.bak
cp /etc/system /etc/system.bak
 
metaroot /dev/md/rdsk/d7
 
mount /dev/md/dsk/d7 /mnt
# copy the new vfstab and system
cp /etc/system /mnt/etc/system
cp /etc/vfstab /mnt/etc/vfstab
umount /mnt
 
# restore the original vfstab and system
mv /etc/system.bak /etc/system; mv /etc/vfstab.bak /etc/vfstab

Since the boot disk is located on the same disk but different slices (s0 before, s7 now), do i have to make any changes to the boot-device from OBP? (setenv boot-device {dev})


And I have installed the boot block to slice s7 (d7). Slice s0 (d0) should also have a boot block and this would confuse the boot process the slice to boot from. How do overcome this issue?


Thanks,

Last edited by MR.bean; 10-09-2014 at 04:25 AM..
# 2  
Old 10-09-2014
I think for only expanding the existing / (without freeing the s0 slices) you can just add the two new slices:
Code:
metattach d10 c0t0d0s7
metattach d20 c0t1d0s7
metastat
growfs /dev/md/rdsk/d0

All online (growfs should be run during low traffic hours).
Because it is appended to the existing slices, you do not need to install another boot block.
# 3  
Old 10-10-2014
Quote:
Originally Posted by MadeInGermany
I think for only expanding the existing / (without freeing the s0 slices) you can just add the two new slices:
Code:
metattach d10 c0t0d0s7
metattach d20 c0t1d0s7
metastat
growfs /dev/md/rdsk/d0

All online (growfs should be run during low traffic hours).
Because it is appended to the existing slices, you do not need to install another boot block.
Thanks. I wish that method worked, but executing your first step metattach d10 c0t0d0s7 gave me an error saying cannot expand root file system.

I ended up installing virtualbox and tried my method I posted, and with a bit of adjustment (installgrub instead of installboot, update boot archive), it worked out. Below in red is the adjustment I've made.



Code:
metainit d71 1 1 c0t0d0s7
metainit d72 1 1 c0t1d0s7
metainit d7 -m d71
metattach d7 d72
newfs /dev/md/rdsk/d7

Mount and copy contents

Code:
mount /dev/md/dsk/d7 /mnt
ufsdump -0uf - /dev/md/rdsk/d0 | (cd /mnt/ && ufsrestore -xf - )
umount /mnt


Install Grub, update boot archive, etc

Code:
installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c0t0d0s7
installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c0t1d0s7
 
bootadm update-archive -f -R /mnt
 
 
mount /dev/md/dsk/d7 /mnt
 
# modify /mnt/boot/grub/menu.lst and change it to the new root volume
title active
root (hd0,0,a) <- change a (s0) to h (s7)
 
# modify /mnt/boot/solaris/bootenv.rc and change it to the new root volume
# before bootpath=/pci@7b,0/pci1022,7458@11/pci1000,3060@2/sd@0,0:a
# after bootpath=/pci@7b,0/pci1022,7458@11/pci1000,3060@2/sd@0,0:h
 
metaroot -R /mnt /dev/md/rdsk/d7
umount /mnt

# 4  
Old 10-10-2014
You just duplicated what live upgrade can do. Look at the man pages for live_upgrade, lucreate and luactivate.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Extending swap space

I've to install Oracle binaries (I'm oracle DBA) and for that I've extend swap space in my home computer. My situation is like this. # parted -s /dev/sda print free Model: ATA VBOX HARDDISK (scsi) Disk /dev/sda: 38.7GB Sector size (logical/physical): 512B/512B Partition Table: msdos ... (1 Reply)
Discussion started by: Mukul Sharma
1 Replies

2. HP-UX

Extending file system in HP-UX

Hi Guys, Hope everyone is doing great. We've few servers on HP-UX. I'm not sure of extending file systems in HP-UX. Please help me. It could be helpful If you provide the commmand basing on the details below. Thanks in Advance. # hostname ******* # date Sun Sep 7 14:39:59 EDT 2014 #... (2 Replies)
Discussion started by: vamshigvk475
2 Replies

3. Red Hat

LVM- extending PV

Hi All, I have one VG on single PV /dev/sda3 with two LV Physically after /dev/sda3 i have 40G unallocated I want to extend /dev/sda3 + 40G and extend its VG, then extend last LV in VG to take new free space What is correct procedure? // I cannot create second PV after /dev/sda3 because of... (5 Replies)
Discussion started by: kactech
5 Replies

4. Solaris

How to extend an existing file system using SVM in solaris 10

Hi All I want to extend this file system to 120Gb: df -h /xyz Filesystem size used avail capacity Mounted on /dev/md/dsk/d80 98G 35G 62G 37% /xyzand the NetApp admin is going to give me an LUN with 22Gb. This file system is mounted on: metastat d80... (1 Reply)
Discussion started by: fretagi
1 Replies

5. Solaris

Growing a file system-SVM

Hi gurus Im a newbie in solaris..I need to extend file system space in solaris 10 which is using SVM..I have a file system /pin02 which is 93% full n needs to be extended..only 3.6 gb avail space left..the file system is not mirrored...normal ufs file system only..can u please tel me t... (6 Replies)
Discussion started by: madanmeer
6 Replies

6. AIX

Extending filesystems

Hi to all i want to increase the /usr size. but, it is mirrored on hdisk0 and hdisk1. i know that chfs will work, but i am not confident about mirroring. can anyone tell me the procedure. thanks (2 Replies)
Discussion started by: honeym210
2 Replies

7. Solaris

extending /var in solaris 10

Hi all, i need to extend /var file system on my solaris 10 box /var is part of rootdg current size 2GB Required size 6GB layout mirror veritas 4.1 solaris 5.10 pls let me know the steps and the procedure to follow. regards Ajay S (2 Replies)
Discussion started by: ajays
2 Replies

8. UNIX for Dummies Questions & Answers

how to mount a file system of a remote machine to local file system

Hi friends, In my case, there are serveral PCs running Linux in a LAN. I would like to to mount the directory /A_river of machine-A to the file system of another machine machine-B so that I can access files in that directory. I do not know how to do this. The situation is complicated by... (2 Replies)
Discussion started by: cy163
2 Replies

9. Programming

extending netfilter...plz help

Hello friends i'm trying to extend iptables to include a target by which we can change the packet type field of a packet. For this i created a kernel module and a userspace extension. Now i face the problem that when i try to invoke iptable with the target i created i get an error message saying... (1 Reply)
Discussion started by: Rakesh Ranjan
1 Replies

10. Programming

Help in extending netfilter

Hi everybody, I have to write a module for matching in netfilter , extending the netfilter but I'm facing some problems can somebody guide me in that. I know that I need to write matching module working in kernel space and a program in userspace. I went through the HOWTO on netfilter-hacking but... (0 Replies)
Discussion started by: Trusted Penguin
0 Replies
Login or Register to Ask a Question