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

Martin T m4rtntns at gmail.com
Fri Jul 15 11:31:15 EDT 2016


Hi,

on a second thought, "request system partition hard-disk" and then
"request system reboot" seems to work as well in that case:

root at m5> request system partition hard-disk
WARNING: Could not read disklabel for s1.
WARNING: Default sizes will be used for hard disk partitions.

WARNING:   The hard disk is about to be partitioned.  The contents
/* output removed for brevity */


This did not work on my test box where MBR was wiped:

root at mx480> request system partition hard-disk
mount: /dev/ad1s1e : No such file or directory
ERROR: Can't access hard disk, aborting partition.

root at mx480>


With this method only one reload is required.


thanks,
Martin

On 7/15/16, Martin T <m4rtntns at gmail.com> wrote:
> 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