[j-nsp] repartition HDD in RE-333-768

Martin T m4rtntns at gmail.com
Fri Jul 15 10:20:25 EDT 2016


Hi,

I have a situation on a remote live router where /dev/ad0s1a
partition(in FreeBSD terminology) on CF is larger than /dev/ad1s1a
partition on HDD. In addition /dev/ad0s1e partition is larger than
/dev/ad1s1e. This means that I'm not able to create a snapshot to
alternative media. What I need to do is "request system snapshot
partition", but this is not possible because /dev/ad1s1f is mounted on
/var. I could unmount the /var, but then the mgd is killed which means
that I can't execute "request system snapshot partition". Best method
I could come up with is to change the value of kern.geom.debugflags
temporarily from 0x0 to 0x10(sysctl kern.geom.debugflags=0x10) in
order to allow writes to MBR, wipe the MBR(dd if=/dev/zero of=/dev/ad1
bs=512 count=1) and then reload the router(reboot). During the boot it
will mount emergency /var to memory file-system and one is able to
execute "request system snapshot partition". Then again router needs
to be reloaded so that /dev/ad1s1f is mounted under /var and swap
space is used. This last step can be done using mount and swapon as
well.

However, is there some quicker or even non service-affective way to
solve this problem?


thanks,
Martin


More information about the juniper-nsp mailing list